> 
> (1) -> (0.11::FLOAT)^10
> 
>    (1)  0.25937424600999999999E-9
>                                                                   Type: Float
> (2) -> (0.11::DFLOAT)^10
> 
>    (2)  2.5937424600999977e-10
>                                                             Type: DoubleFloat
> 
> Should we try to make them have same OutputForm,
> for example "x.yyyE-z"?

Well,

(25) -> PRETTYPRINT((((0.11::DFLOAT)^10)::OutputForm))$Lisp
"2.5937424600999977e-10"

   (25)  ()
                                                            Type: SExpression
(26) -> PRETTYPRINT((((0.11::FLOAT)^10)::OutputForm))$Lisp 
"0.2593742460_0999999999 E -9"

   (26)  ()
                                                            Type: SExpression

so in a sense we have the same OutputForm, that is string.
Currently we use Lisp routine to produce string form from
DoubleFloat.  This is rather tedious code where one have
to be quite careful with accuracy.  In particular, we want
string form which read back gives the same double value,
but we also want to limit number of digits.  It seems
that to preserve those properties and have more control
over format we would need our own routine.

So yes, it makes sense to change output of DoubleFloat
to use similar convention as Float, but that involves
substantial effort.  Note that various Lisp differ in
detalis of floating point formatting, so trying to
change Float output to match Lisp seem futile...

-- 
                              Waldek Hebisch

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to