davedelong / DDMathParser

String → Number
MIT License
856 stars 153 forks source link

Why does the DDMathParser give tan 90 degrees = 1.6331779e+16? #91

Closed roman0914 closed 9 years ago

roman0914 commented 9 years ago

It is an incredibly big number. I think it is some internal rounding issue so it gives such a big number, rather than an error message. In this case , for example iMac calculator returns a message "Not a number". Could you try to fix this issue please?

danieljfarrell commented 9 years ago

What happens if you call tan(90) with the standard math.h functions? This might have nothing to do with the parser.

davedelong commented 9 years ago

Because DDMathParser does not recognize nor account for infinity.