[Sollya-users] Desappointing behaviour

Christoph Lauter christoph.lauter at lip6.fr
Sun Jul 20 23:00:25 CEST 2014


Valérie,

I didn't have time to try your program out. However, the behavior is 
exactly the expected one: you code assignments as ':=', which are, 
according to Sollya documentation, floating-point assignments rounding 
occurs for. It is quite probable that coding 'exact' assignments '=' 
instead makes the 'bad floating-point behavior' go away. However, in 
order to guarantee safety, Sollya may then use quite an amount of 
memory. This can --in your example-- be worked around by activating 
rationalmode=on;

cu

Christoph

Valérie Ménissier-Morain wrote on 18/07/2014 17:51:
> I am doing tests with classical examples of bad floating point behaviour
> with Sollya.
> For Rump quasi-polynomial
>> a = 77617; b = 33096;
>> 333.75*b^6 + a^2* (11*a^2*b^2 - b^6 - 121*b^4 - 2) + 5.5*b^8 + a/(2*b);
> Warning: rounding has happened. The value displayed is a faithful
> rounding to 165 bits of the true result.
> -0.82739605994682136814116509547981629199903311578438
> the result is fine but for Muller sequence
> a = proc (n) { var r1, r2, res;
>    r1:=11.0/2.0;
>    r2:=61.0/11.0;
>    match n with
>    0: { res:=r1; }
>    1: { res:=r2; }
>    default: {
>    for i from 2 to n do {
>      res:=111.0-(1130.0-3000.0/r1)/r2;
>      r1:=r2;
>      r2:=res;
>      };
>    };
>    return res;
> };
> a(100);
> 100
> the result is the attended floating point value but with no information
> about the fact that lots of rounding operations occured and that the
> result is error prone. How  can I use Sollya for a better behaviour?
>
> Valérie
>
>
>
> _______________________________________________
> Sollya-users mailing list
> Sollya-users at lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/sollya-users
>


-- 
Christoph Lauter
Maître de conférences - Associate Professor
Équipe PEQUAN - LIP6 - UPMC Paris 6
4, place Jussieu, 75252 Paris Cedex 05, 26-00/301
Tel.: +33144278029 / +33182521777
http://www.christoph-lauter.org/


More information about the Sollya-users mailing list