Jurjen N.E. Bos <j...@users.sourceforge.net> added the comment:

I stand corrected; more on that later.

"backward error" is the mathematical term used for the accuracy of a
function. (Forward error is in the result proper; backward error means that you 
calculate the correct result for a number that is very close to the input.)
Since pi is not a machine representable number, it is pretty hard to
implement the trig functions with a zero backward error, since you need to 
divide by 2*pi in any reasonable implementation. For some reason, I was in the 
impression that the backward error of the sine was zero. 

I wrote a program to demonstrate the matter, only to find out that I was wrong 
:P
Maybe in the 32 bit version, but not in the 64 bits? Anyway, it is more 
implementation dependent than I though.

Althougth the backward error of the builtin sine function isn't zero, it is 
still a cool 21 digits, as the program shows.
- Jurjen

----------
resolution:  -> rejected
status: pending -> open
Added file: https://bugs.python.org/file48199/sindemo.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35880>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to