Re: on-line calculator



I wrote:

troymius wrote:

[...]

In the code, pi is only defined with a limited
precision (16 digits or
so), so to get a completely correct answer for
tan(pi/2) i would have
to implement some kind of a logic... I am not sure
how to do that
yet.

Easy answer: with (closed) interval arithmetic!

In that realm:

pi = 'exact-pi' +- err

or rather, pi is the (topologically closed)
interval:

pi = ['exact-pi'-err, 'exact-pi'+err]

Please note that that is not so rigorous, but I'd have to get into outwardly directed rounding to properly put that.

-LV


With closed interval arithmetic, then you'd get the
(still closed) interval:

tan(pi/2) = [overflow, infinity]

Hope my "calculation" is correct as I did it from the
top of my head. In any case, the idea behind it
should be clear enough once you also think that, when
graphing your results, you always end up drawing
rectangles...

Let me know if you need further pointers, and also
maybe note that I am myself trying to build (although
in my spare time) a system for
parsing/calculating/graphing, based on closed
interval arithmetic, to eventually put on the web.
Maybe we could join the efforts with an open
source/free software kind of project?

-LV

[...]
.



Relevant Pages

  • Re: on-line calculator
    ... Julio Di Egidio wrote: ... source/free software kind of project? ...
    (sci.math)
  • Re: Reverse algorithm with tangent
    ... given 39 digits after the point in the encrypted value, ... All you need is doing calculation with high ... enough precision, so the errors do not accumulate. ... what I said depends a lot on the fact that only 10 rounds ...
    (comp.lang.perl.misc)
  • Re: Computing decimals of pi
    ... N decimals one has to carry out all the intermediate computations ... to a precision of N decimals - which means that one needs huge amounts of ... While the calculation gets resource ... That could be 10000 or more digits within an acceptable amount of time ...
    (sci.math)
  • Re: This calculation is just wrong / computer cant count!
    ... That info on significant digits was all very interesting, ... my calculation ends up with -0.00000000000007 (haven't counted the zeros ... here, but you get the idea!), where it should be zero. ... In the case of double the level of precision seems to be 16 digits, ...
    (microsoft.public.vc.mfc)
  • Re: Sine code for ANSI C
    ... >> precision should the calculation produce? ... If I deserve 5 digits of precision, ... Dan Pop ...
    (comp.lang.c)