On Tuesday 22 January 2008 17:43, Len de Vlaming wrote:
> > float/bfloat?
> >
> > (%i1) sqrt(2);
> > (%o1) sqrt(2)
> > (%i2) float(%o1);
> > (%o2) 1.414213562373095
>
> Okay, I'll jump in and show my ignorance to the world. Can someone
> please explain (using small words) to this non-mathematician what the
> distinction is between floats and bigfloats, and why one would select
> one over the other? I've pored over the documentation but have not been
> able to divine an answer simple enough for me to grasp.
bfloat is an arbitrary precision type with fpprec significant digits:
(%i1) float(%pi);
(%o1) 3.141592653589793
(%i2) bfloat(%pi);
(%o2) 3.141592653589793b0
(%i3) fpprec : 100;
(%o3) 100
(%i4) float(%pi);
(%o4) 3.141592653589793
(%i5) bfloat(%pi);
(%o5)
3.1415926535897932384626433832795028841971693993751058209749445923078164\
06286208998628034825342117068b0
See the Maxima Manual, section 10 ("Floating Point").
--
Alexey Beshenov <al at beshenov.ru>
http://beshenov.ru/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.math.utexas.edu/pipermail/maxima/attachments/20080122/c8e743f5/attachment.pgp