フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

why are all java types returned as double

1 回表示 (過去 30 日間)
Samuel Lazerson
Samuel Lazerson 2016 年 7 月 19 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
In the documentation for the Java interface, it stipulates that scalars returned from Java routines are converted to double precision floats (<http://www.mathworks.com/help/matlab/matlab_external/handling-data-returned-from-a-java-method.html)>. This includes double precision integers. This is problematic as double precision (int64/long) integers cannot accurately be represented by double precision floats. Now if array's are returned, then the types returned seem appropriate. My question is twofold: Why are scalars uniformly cast to double precision floats, but arrays not? Is there anything I can do to have a Java scalar long properly returned as an int64 in Matlab?

回答 (0 件)

この質問は閉じられています。

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by