josdejong/mathjs

cot reports wrong value for (0, 0)

Open

#1,427 opened on Mar 2, 2019

 (2 comments) (0 reactions) (0 assignees)JavaScript (1,314 forks)batch import
dependencieshelp wanted

Repository metrics

Stars
 (15,064 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

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.

Contributor guide