Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Weird rounding error in n and N

This is weird. While dabbling in sage, It seems I hit a rounding error.

sage: number=180*arccos(14/205*sqrt(41)*sqrt(5))/pi
sage: n(number)
12.0947570770121
sage: n(number,digits=4)
12.10

Is there any good reason that I'm not getting 12.09 as a result? This happens in N as well.

Here's my sage info.

SageMath version 9.2, Release Date: 2020-10-24 
Using Python 3.9.5. Type "help()" for help.