The following is the proper way to extract digits

sage: tanh(91).numerical_approx(digits=10)
1.000000000
sage: tanh(91).numerical_approx(digits=100)
0.9999999999999999999999999999999999999999999999999999999999999999999999999999998182667935304138503930

On Fri, 9 Feb 2024 at 17:16, Georgi Guninski <ggunin...@gmail.com> wrote:
>
> When I try to extract digits of tanh(91) via floor, I still get error
>
> sage: floor(10^4*tanh(91))
> ValueError
>
> sage: gp('floor(10^4*tanh(91))')
> 10000
>
>
> gp computes it both ways :)
>
> sage: gp.default('realprecision',10^5)
> 0
> sage: gp('floor(tanh(91))')
> 0
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-devel/CAGUWgD9_cAc%2B_WCMh%3D2hCuvMy2GO-tgcNnrARh2q7K%3D8CErrfQ%40mail.gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAGEwAAks%2BkJU61cDTC1vD911YRzVjMG67A-u4Jz%2BNU82WgYd0Q%40mail.gmail.com.

Reply via email to