[Scilab-users] Increase Computing Precision beyon Double // Big Integers?
Sandro Hardy
sandro.hardy at kom.tu-darmstadt.de
Fri Jun 28 10:26:10 CEST 2013
Hello everyone,
is it there a way to increase the computing precision in Scilab beyond
the regular "double precision"?
In Scilab this example gives me a wrong result:
-->290017/10000
ans =
29.001699999999999590727
R is more accurate (Matlab also):
> 290017/10000
[1] 29.0017
In R I can even increase the precison:
> options(digits=10)
Is this also possible with Scilab?
Similar question for big numbers, is there a "standard" solution for
this (BigIntegers)?
In Scilab:
-->a=635037699992127443
a =
635037699992127488.
-->b=635037699992127444
b =
635037699992127488.
-->a-b
ans =
0.
I would expect a warning, but I get get a wrong result. At least the
output gives me the hint, that the variable was not set accurately.
The solution is called bigz in R (VPI in Matlab) and work like this:
> a=as.bigz('635037699992127443');
> b=as.bigz('635037699992127444');
> a-b
Big Integer ('bigz') :
[1] -1
Thanks in advance for any hints.
Sandro
--
Sandro Hardy, M.Sc.
Multimedia Communications Lab (KOM)
http://www.kom.tu-darmstadt.de
Technische Universitaet Darmstadt
Dept. of Electrical Engineering & Information Technology
tel: +49 6151 16 75164 fax: +49 6151 16 6152
E-Mail: Sandro.Hardy at kom.tu-darmstadt.de
postal address: TU Darmstadt, FB 18, KOM, Rundeturmstr. 10, S320/106
D-64283 Darmstadt, Germany
More information about the users
mailing list