全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:2204
推到 Plurk!
推到 Facebook!

XE5 Android 裝置相容性

 
cuteman0725
一般會員


發表:7
回覆:6
積分:2
註冊:2007-09-27

發送簡訊給我
#1 引用回覆 回覆 發表時間:2013-09-21 15:36:18 IP:112.104.xxx.xxx 訂閱
測試的手機列表

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

發送簡訊給我
#2 引用回覆 回覆 發表時間:2013-09-21 17:54:27 IP:218.173.xxx.xxx 未訂閱
看到一些老手測試新的 XE5, 感覺Delphi 又活起來了,我也把對岸的一篇文章, 轉貼進來
http://www.th7.cn/Program/delphi/201309/150429.shtml Delphi XE5的Android開發平台搭建
leveon
資深會員


發表:30
回覆:389
積分:303
註冊:2012-02-12

發送簡訊給我
#3 引用回覆 回覆 發表時間:2013-09-22 21:27:28 IP:111.240.xxx.xxx 訂閱
 Cool~
ANR並不多 感覺起來 似乎多半是權限或路徑問題
希望Delphi能多加油囉~
cuteman0725
一般會員


發表:7
回覆:6
積分:2
註冊:2007-09-27

發送簡訊給我
#4 引用回覆 回覆 發表時間:2013-09-23 01:56:01 IP:112.104.xxx.xxx 訂閱
還有更簡單的測試方法

這個網站可以把你開發出的 apk 檔案用 300多個不同的手機平台測試

https://www.apkudo.com

如果有申請 google play 開發人員帳號

那麼到
https://www.apkudo.com/developers.html

把 apk 上傳後,就會開始測試。




leveon
資深會員


發表:30
回覆:389
積分:303
註冊:2012-02-12

發送簡訊給我
#5 引用回覆 回覆 發表時間:2013-09-23 22:37:44 IP:111.240.xxx.xxx 訂閱
 再請教一下 
Delphi在以往的win32環境
存在嚴重的浮點精度問題

var
a:Double;
begin
a := 0.01;
if a = 0.01 then showmessage('Same') else
showmessage( 'not the Same');
在LLVM 下
這個現象在Android 是不是已經不存在?
Coffee
版主


發表:31
回覆:878
積分:561
註冊:2006-11-15

發送簡訊給我
#6 引用回覆 回覆 發表時間:2013-10-05 16:02:23 IP:111.249.xxx.xxx 訂閱
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');
在LLVM 下
這個現象在Android 是不是已經不存在?
------
不論是否我發的文,在能力範圍皆很樂意為大家回答問題。
為了補我的能力不足之處,以及讓答案可以被重複的使用,希望大家能儘量以公開的方式問問題。
在引述到我的文時自然會儘量替各位想辦法,謝謝大家!
sryang
尊榮會員


發表:39
回覆:762
積分:920
註冊:2002-06-27

發送簡訊給我
#7 引用回覆 回覆 發表時間:2013-10-05 19:23:07 IP:59.127.xxx.xxx 訂閱
浮點數本來就不是精確的數字,你的用法是不了解浮點數的錯誤用法

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');
在LLVM 下
這個現象在Android 是不是已經不存在?
------
歡迎參訪 "腦殘賤貓的備忘錄" http://maolaoda.blogspot.com/
編輯記錄
sryang 重新編輯於 2013-10-05 19:32:53, 註解 無‧
sryang 重新編輯於 2013-10-05 19:42:59, 註解 無‧
leveon
資深會員


發表:30
回覆:389
積分:303
註冊:2012-02-12

發送簡訊給我
#8 引用回覆 回覆 發表時間:2013-10-05 20:32:07 IP:111.248.xxx.xxx 訂閱
浮點數的存放原理我是知道的
但各家的編譯器對浮點數規格也不盡相同

那段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');
在LLVM 下
這個現象在Android 是不是已經不存在?
leveon
資深會員


發表:30
回覆:389
積分:303
註冊:2012-02-12

發送簡訊給我
#9 引用回覆 回覆 發表時間:2013-10-08 17:49:06 IP:111.241.xxx.xxx 訂閱
用 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');
在LLVM 下
這個現象在Android 是不是已經不存在?
系統時間:2024-04-25 21:36:38
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!