sinh(3391014490.0)

Jan 26, 2011 at 2:50pm
Hi guys,

I want to evaluate sinh(3391014490.0) as i'm doing numerical simulation. It produces inf and RR: overflow in NTL (i used (0.5)(e^x + e^-x)). Anyone know of a way to evaluate this?

Thanks!
Jan 26, 2011 at 3:04pm
e^-3391014490 is so close to zero that we can ignore it for purposes of this calculation.

e^3391014490 is really, really, really, really big.

Half of that number is still far, far too big. Too big for a 64 bit number. You'll have to use some kind of specialised library made for handling really, really, really big numbers.

Depending on what you're using it for, you might be able to box clever and simplify whatever your calculation actually is so that you don't have to evaluate such huge values.
Last edited on Jan 26, 2011 at 3:14pm
Jan 26, 2011 at 3:59pm
hi moschops, i know it's infinity and i've tried using NTL (number theory library) as i've heard that it can evaluate large floating point numbers. (in fact, it can evaluate exp(91014490) i.e., chopping the frst 2 three's.

So now, would you know of any other library?
Jan 26, 2011 at 4:07pm
Maybe this one:

http://gmplib.org
Jan 26, 2011 at 4:54pm
Even Google doesn't know the answer to that question:
http://www.google.com/search?q=e^3391014490%3D

It knows this though:
http://www.google.com/search?q=e^33%3D

If Google doesn't know, does the problem really exist? :-)
Jan 26, 2011 at 4:59pm
Wolfram Alpha has an answer, but I don't like it very much... :)

Edit: I'm the number one suggestion on your google link. Neat :)
Last edited on Jan 26, 2011 at 5:00pm
Feb 4, 2011 at 2:50pm
Wolfram Alpha is neat. (I found a way to break it, though. :P)

Do this: Calculate the length of a function over two x coordinates which include the asymptote of said function.

Example (for tan(x)):
integrate √(1+cos(x)^-4) dx from x=-pi/2 to x=pi/2
Last edited on Feb 4, 2011 at 3:49pm
Topic archived. No new replies allowed.