Float precision in case of irrational numbers (Sqrt)

Túry Péter tp at eposta.hu
Tue Jan 27 12:05:23 CET 2004


Hi all,

I try to solve a simple math problem which needs high precision 
computation (50 or 100 or so digits). I see that integer computation 
is "infinitly precise". And I think this can be the case for rational 
numbers too. But what about irrational ones? I need to compare two very 
big number's square roots. 

How can I control the precision? Or how can I ensure (or at least 
check) whether they seem to be equal/unequal only because of some 
inaccuracy or they are really equal/unequal?

Another question: Can I convert a similarly very big float (which is 
turned out to be integer) into an int? When I tried it (with 
FloatToInt), I got a warning saying "truncation to signed 32 bit 
integer" -- or something similar.

TIA:
Peter Tury
-
Please send submissions to users at mozart-oz.org
and administriva mail to users-request at mozart-oz.org.
The Mozart Oz web site is at http://www.mozart-oz.org/.
Please send bug reports to bugs at mozart-oz.org.





More information about the mozart-users mailing list