Skip to content

are trigonometric function broken ? #3676

Description

@nycos62

hello, every trigonometric functions seems to trigger a precision limit exceeded error from decimal.js

in console of https://mathjs.org/, execute this

var math_cfg = {
  number: "BigNumber", 
  precision: 509,
  relTol: 1e-320,
  absTol: 1e-323
}
math.config(math_cfg);

math.evaluate('tan(pi/2)')

decimal.mjs:3164 Uncaught Error: [DecimalError] Precision limit exceeded
at Ct (decimal.mjs:3164:32)
at Ut (decimal.mjs:3762:10)
at yt.sine.yt.sin (decimal.mjs:1700:18)
at yt.tangent.yt.tan (decimal.mjs:1836:9)
at Complex | BigNumber (tan.js:36:35)
at tan (typed-function.js:1465:22)
at FunctionNode.js:203:24
at Object.evaluate (Node.js:54:16)
at Object.string (evaluate.js:49:36)
at Object.evaluate (typed-function.js:1459:22)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions