Replies: 1 comment 5 replies
|
Yes, in Adept ulongs are not automatically converted into doubles (the conversion is explicit because it loses precision). This also avoid the ambiguity between and |
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
It seems Adept doesn't do automatic type casting. For example, both
aandbareulong. I want to print the result ofa/bas floating point number so I used:printf('%.20f\n', (a as double)/b))Doesn't work. It will error with:
error: Incompatible types 'double' and 'ulong'I have to cast
btodouble, too:printf('%.20f\n', (a as double)/(b as double))Btw, this will work fine in C:
printf('%.20f\n',(double)a/b))All reactions