Hell !!
> RIF can do this:
>
> More generally, if you know a number to a certain precision:
Great ! Thaanks :-)
Nathann
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from
RIF can do this:
sage: x = RIF(0.333)
sage: x.simplest_rational()
1/3
More generally, if you know a number to a certain precision:
sage: x = RIF(0.3)
sage: y = x + RIF(-1,1)/1e3# Add error term
sage: y.simplest_rational()
1/3
--
You received this message
Hello everybody !
I just discovered this very nice feature :
sage: QQ(1.5)
3/2
It is quite cool to get the rational associated with a float ! LP solvers
often give such output.
This being said, the following is... Well... :-)
sage: QQ(0.3)
3/10
sage: QQ(0.33)
33/100
...
sage: QQ(0.