XE5 Android 裝置相容性 |
|
cuteman0725
一般會員 發表:7 回覆:6 積分:2 註冊:2007-09-27 發送簡訊給我 |
測試的手機列表
https://docs.google.com/spreadsheet/ccc?key=0AoEN2CEsVvJ0dGhVaWJEdWRJTVYzZ1NKT2NoQkF4N3c&usp=sharing Devices tested: 118 Failed to install: 10 Locked up: 3 Successfully ran: 105 Success rate: 89% - See more at: http://delphi.org/2013/09/delphi-xe5-android-device-compatibility/#sthash.LiheLRTE.dpuf HTC 全過(華碩、宏碁也過了) 三星, LG, Sony 幾隻不行 其他的就看內容了。 幫人測試時可以參考 |
fred
一般會員 發表:14 回覆:40 積分:10 註冊:2002-06-15 發送簡訊給我 |
|
leveon
資深會員 發表:30 回覆:389 積分:303 註冊:2012-02-12 發送簡訊給我 |
|
cuteman0725
一般會員 發表:7 回覆:6 積分:2 註冊:2007-09-27 發送簡訊給我 |
還有更簡單的測試方法
這個網站可以把你開發出的 apk 檔案用 300多個不同的手機平台測試 https://www.apkudo.com 如果有申請 google play 開發人員帳號 那麼到 https://www.apkudo.com/developers.html 把 apk 上傳後,就會開始測試。 |
leveon
資深會員 發表:30 回覆:389 積分:303 註冊:2012-02-12 發送簡訊給我 |
|
Coffee
版主 發表:31 回覆:878 積分:561 註冊:2006-11-15 發送簡訊給我 |
Though no any official or any spec/textbook has been defined, but we'll considered that double as a float-point value and lots of them implemented by IEEE754, so they are not garanted to have exactly two value that are given the same expresssion.
That says, you have a and b are both double and give 0.01 as their initial value, but they are not exactly 0.01000000000000 as you want, and not a bug. So you need to use or implement fixed-point type yourself and remember not to compare to a float-point value. ===================引 用 leveon 文 章=================== 再請教一下 Delphi在以往的win32環境 存在嚴重的浮點精度問題 var a:Double; begin a := 0.01; if a = 0.01 then showmessage('Same') else showmessage( 'not the Same'); 這個現象在Android 是不是已經不存在?
------
不論是否我發的文,在能力範圍皆很樂意為大家回答問題。 為了補我的能力不足之處,以及讓答案可以被重複的使用,希望大家能儘量以公開的方式問問題。 在引述到我的文時自然會儘量替各位想辦法,謝謝大家! |
sryang
尊榮會員 發表:39 回覆:762 積分:920 註冊:2002-06-27 發送簡訊給我 |
浮點數本來就不是精確的數字,你的用法是不了解浮點數的錯誤用法
var a: double a := 0.01; if a = 0.01 then // 錯誤用法 if abs(a - 0.01) < 1E-16 then // 正確用法 要比較到 1 的負多少次方,要看浮點數的精度而定 double 的精確位數是 15 到 16 位數,所以只要兩數相減的絕對值小於 1E-16 就可以認為是相等 single 的精確位數是 7 到 8 位數,所以比較的值就改成 1E-8 ===================引 用 leveon 文 章=================== 再請教一下 Delphi在以往的win32環境 存在嚴重的浮點精度問題 var a:Double; begin a := 0.01; if a = 0.01 then showmessage('Same') else showmessage( 'not the Same'); 這個現象在Android 是不是已經不存在?
------
歡迎參訪 "腦殘賤貓的備忘錄" http://maolaoda.blogspot.com/ |
leveon
資深會員 發表:30 回覆:389 積分:303 註冊:2012-02-12 發送簡訊給我 |
浮點數的存放原理我是知道的
但各家的編譯器對浮點數規格也不盡相同 那段Code在VC 上是ok的 沒說Delphi錯 只能說規格上不如別人 當然 這樣寫原本就不是安全的Code ===================引 用 sryang 文 章=================== 浮點數本來就不是精確的數字,你的用法是不了解浮點數的錯誤用法 var a: double a := 0.01; if a = 0.01 then // 錯誤用法 if abs(a - 0.01) < 1E-16 then // 正確用法 要比較到 1 的負多少次方,要看浮點數的精度而定 double 的精確位數是 15 到 16 位數,所以只要兩數相減的絕對值小於 1E-16 就可以認為是相等 single 的精確位數是 7 到 8 位數,所以比較的值就改成 1E-8 ===================引 用 leveon 文 章=================== 再請教一下 Delphi在以往的win32環境 存在嚴重的浮點精度問題 var a:Double; begin a := 0.01; if a = 0.01 then showmessage('Same') else showmessage( 'not the Same'); 這個現象在Android 是不是已經不存在? |
leveon
資深會員 發表:30 回覆:389 積分:303 註冊:2012-02-12 發送簡訊給我 |
用 Extended 應該會是 0.01 只是效率比較慢
只是不知Delphi在ARM上有沒有用軟浮點? ===================引 用 Coffee 文 章=================== Though no any official or any spec/textbook has been defined, but we'll considered that double as a float-point value and lots of them implemented by IEEE754, so they are not garanted to have exactly two value that are given the same expresssion. That says, you have a and b are both double and give 0.01 as their initial value, but they are not exactly 0.01000000000000 as you want, and not a bug. So you need to use or implement fixed-point type yourself and remember not to compare to a float-point value. ===================引 用 leveon 文 章=================== 再請教一下 Delphi在以往的win32環境 存在嚴重的浮點精度問題 var a:Double; begin a := 0.01; if a = 0.01 then showmessage('Same') else showmessage( 'not the Same'); 這個現象在Android 是不是已經不存在? |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |