mathjs icon indicating copy to clipboard operation
mathjs copied to clipboard

cot reports wrong value for (0, 0)

Open hsmyers opened this issue 5 years ago • 2 comments

b = math.complex(0,0) then b.cot() reports (NaN, NaN) as compared to Mathematica's ComplexInfinity. Not that the correct answere is always useful, but it (the NaN answer) did cause a problem in testing extended precision complex functions.

hsmyers avatar Mar 02 '19 19:03 hsmyers

I can't remember exact what the status is but mathjs definitely has some issues regarding complex infinite values. You are definitely right that the current behaviour is not ideal.

refs: #804

harrysarson avatar Mar 02 '19 20:03 harrysarson

Thanks for reporting.

@infusion what do you think about this edge case?

josdejong avatar Mar 05 '19 19:03 josdejong