Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How To Increase Precision in Scilab

4,698 views
Skip to first unread message

Vincent Newell

unread,
Jun 29, 2010, 1:57:51 PM6/29/10
to
Is there any way to get Scilab to use more significant digits? I need
something that can hold all of the data up to 10^12, but SciLab seems
to only hold 8 digits. How do I get it to display with more accuracy?

philippe

unread,
Jun 29, 2010, 3:06:59 PM6/29/10
to
Hi Vincent,

Vincent Newell a écrit :


> Is there any way to get Scilab to use more significant digits? I need
> something that can hold all of the data up to 10^12, but SciLab seems
> to only hold 8 digits. How do I get it to display with more accuracy?

use the "format" function :

-->%pi
%pi =

3.1415927

-->format('v',20)

-->%pi
%pi =

3.14159265358979312


philippe

SG

unread,
Jun 29, 2010, 7:49:51 PM6/29/10
to
On 29 juin, 21:06, philippe <rou...@sfr.fr> wrote:
> Hi Vincent,

>
> -->format('v',20)
>
> -->%pi
>  %pi  =
>
>     3.14159265358979312

Arrgg:-)

%eps =
2.220D-16

// > 1e-20

help number_properties

Samuel

Francis

unread,
Jun 30, 2010, 9:17:55 AM6/30/10
to

Scilab uses double precision numbers:
http://en.wikipedia.org/wiki/Double_precision_floating-point_format.
When printing the number scilab uses a standard format usually 8
digits, but in the calculations it definitively uses double precision
unless you changed it (not sure you can do single precision in scilab).

janaagel...@gmail.com

unread,
Oct 14, 2015, 7:14:38 AM10/14/15
to
Scilab 6 comes with int64 and uint64 - 18 digits
--> a=10^12;
--> disp(int64(a));
1000000000000


J
0 new messages