{
  "id": "task_libraries:math/javascript",
  "path": "/exapedia/javascript-math-libraries",
  "template": {
    "id": "task_libraries",
    "version": 4
  },
  "title": "JavaScript math libraries",
  "answer": [
    {
      "t": "text",
      "text": "JavaScript math libraries add number types and operations that the built-in Number type cannot represent exactly. A decimal library stores each value as digits with a set precision rather than as a binary floating-point number. These libraries let payment systems, accounting tools, and scientific apps calculate prices, fractions, and large integers without rounding errors."
    }
  ],
  "breadcrumb": [
    {
      "label": "Tools"
    },
    {
      "label": "JavaScript math libraries"
    }
  ],
  "sections": [
    {
      "id": "libraries_popularity",
      "anchor": "popularity",
      "heading": "Popularity",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Monthly downloads",
            "Stars",
            "Last release",
            "License"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#decimal-js",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F128"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F129"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F135"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F132"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F130"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#long",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F145"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F146"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F154"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F149"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F147"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#bignumber-js",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F160"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F161"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F167"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F164"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F162"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#bn-js",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F177"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F178"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F186"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F181"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F179"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#fraction-js",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F196"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F197"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F205"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F200"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F198"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#decimal-js-light",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F216"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F217"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F225"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F220"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F218"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#big-js",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F236"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F237"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F243"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F240"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F238"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#mathjs",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F254"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F255"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F261"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F258"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F256"
                }
              ]
            ]
          ],
          "variant": "pop",
          "caption": [
            {
              "t": "text",
              "text": "Downloads: "
            },
            {
              "t": "text",
              "text": "npm"
            },
            {
              "t": "text",
              "text": ", last thirty days. Stars and releases: GitHub. Amber: no release in over a year."
            }
          ]
        }
      ],
      "note": [
        {
          "t": "link",
          "href": "#decimal-js",
          "label": [
            {
              "t": "fact",
              "fact": "F1"
            }
          ]
        },
        {
          "t": "text",
          "text": " has the most monthly downloads in this comparison, at "
        },
        {
          "t": "fact",
          "fact": "F2"
        },
        {
          "t": "text",
          "text": "."
        }
      ]
    },
    {
      "id": "libraries_capabilities",
      "anchor": "capabilities",
      "heading": "Capabilities",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Global decimal precision",
            "Exact rational type",
            "Expression evaluation",
            "Bitwise operations"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#decimal-js",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F128"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F136"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F137"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F138"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F139"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#long",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F145"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F155"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F156"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F157"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F158"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#bignumber-js",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F160"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F168"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F169"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F170"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F171"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#bn-js",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F177"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F187"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F188"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F189"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F190"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#fraction-js",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F196"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F206"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F207"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F208"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F209"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#decimal-js-light",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F216"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F226"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F227"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F228"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F229"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#big-js",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F236"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F244"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F245"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F246"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F247"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#mathjs",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F254"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F262"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F263"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F264"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F265"
                }
              ]
            ]
          ],
          "variant": "cap"
        }
      ]
    },
    {
      "id": "libraries_entries",
      "anchor": "libraries",
      "heading": "Libraries",
      "blocks": [
        {
          "b": "entry",
          "anchor": "decimal-js",
          "name": [
            {
              "t": "fact",
              "fact": "F128"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/MikeMcl/decimal.js"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/decimal.js"
            },
            {
              "label": "Docs",
              "href": "https://github.com/MikeMcl/decimal.js#readme"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F12"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F129"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F135"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F131"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F130"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/MikeMcl/decimal.js#readme",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F128"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F13"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F14"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F15"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F16"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F17"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F18"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F19"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F20"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F143"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F144"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/josdejong/mathjs",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F143"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "({ on, config }) => {\n  const BigNumber = Decimal.clone({ precision: config.precision, modulo: Decimal.EUCLID })\n  BigNumber.prototype = Object.create(BigNumber.prototype)\n\n  /**\n   * Attach type information\n   */\n  BigNumber.prototype.type = 'BigNumber'\n  BigNumber.prototype.isBigNumber = true\n\n  /**\n   * Get a JSON representation of a BigNumber containing\n   * type information\n   * @returns {Object} Returns a JSON object structured as:\n   *                   `{\"mathjs\": \"BigNumber\", \"value\": \"0.2\"}`\n   */\n  BigNumber.prototype.toJSON = function () {\n    return {\n      mathjs: 'BigNumber',\n      value: this.toString()\n    }\n  }\n\n  /**\n   * Instantiate a BigNumber from a JSON object\n   * @param {Object} json  a JSON object structured as:\n   *                       `{\"mathjs\": \"BigNumber\", \"value\": \"0.2\"}`\n   * @return {BigNumber}\n   */\n  BigNumber.fromJSON = function (json) {\n    return new BigNumber(json.value)\n  }\n\n  if (on) {\n    // listen for changed in the configuration, automatically apply changed precision\n    on('config', function (curr, prev) {\n      if (curr.precision !== prev.precision) {\n        BigNumber.config({ precision: curr.precision })\n      }\n    })\n  }\n\n  return BigNumber\n}",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/josdejong/mathjs/blob/a0c9f37a178e364caac81878ab87636ddbe1969d/src/type/bignumber/BigNumber.js#L7-L50",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F142"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=JavaScript%20TypeScript%20projects%20using%20decimal.js%20for%20decimal%20arithmetic%2C%20configurable%20rounding%2C%20numeric%20conversion%20or%20mathematical%20expression%20evaluation&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F128"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import Decimal from 'decimal.js';\nconst value = new Decimal('0.1');\nconsole.log(value.plus('0.2').toString());\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://mikemcl.github.io/decimal.js/",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F133"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "long",
          "name": [
            {
              "t": "fact",
              "fact": "F145"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/dcodeIO/long.js"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/long"
            },
            {
              "label": "Docs",
              "href": "https://github.com/dcodeIO/long.js#readme"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F152"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F146"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F154"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F148"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F147"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/dcodeIO/long.js#readme",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F145"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import Long from 'long';\nconst value = Long.fromString('9007199254740993');\nconsole.log(value.add(1).toString());\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/dcodeIO/long.js",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=long%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "Find projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F145"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F150"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "bignumber-js",
          "name": [
            {
              "t": "fact",
              "fact": "F160"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/MikeMcl/bignumber.js"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/bignumber.js"
            },
            {
              "label": "Docs",
              "href": "https://github.com/MikeMcl/bignumber.js#readme"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F38"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F161"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F167"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F163"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F162"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/MikeMcl/bignumber.js#readme",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F160"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F39"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F40"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F41"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F42"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F43"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F44"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F45"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F46"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F175"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F176"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/cardstack/cardstack",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F175"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "export const convertAmountFromNativeValue = (\n  value: BigNumberish,\n  priceUnit: BigNumberish | null,\n  decimals = 18\n): string => {\n  if (isNil(priceUnit) || isZero(priceUnit)) return '0';\n  return new BigNumber(new BigNumber(value).dividedBy(priceUnit).toFixed(decimals, BigNumber.ROUND_DOWN)).toFixed();\n};",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/cardstack/cardstack/blob/dc2e0f9a42837feb073e3a3033b1a9188f50b4f7/packages/cardpay-sdk/sdk/currency-utils/amount-conversion.ts#L30-L37",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F174"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=JavaScript%20TypeScript%20projects%20using%20bignumber.js%20for%20decimal%20arithmetic%2C%20configurable%20rounding%2C%20numeric%20conversion%20or%20mathematical%20expression%20evaluation&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F160"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import BigNumber from 'bignumber.js';\nconst value = new BigNumber('0.1');\nconsole.log(value.plus('0.2').toString());\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://mikemcl.github.io/bignumber.js/",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F165"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "bn-js",
          "name": [
            {
              "t": "fact",
              "fact": "F177"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/indutny/bn.js"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/bn.js"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F184"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F178"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F186"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F180"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F179"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/indutny/bn.js",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F177"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F194"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F195"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/indutny/elliptic",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F194"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "function toDER(enc) {\n  var r = this.r.toArray();\n  var s = this.s.toArray();\n\n  // Pad values\n  if (r[0] & 0x80)\n    r = [ 0 ].concat(r);\n  // Pad values\n  if (s[0] & 0x80)\n    s = [ 0 ].concat(s);\n\n  r = rmPadding(r);\n  s = rmPadding(s);\n\n  while (!s[0] && !(s[1] & 0x80)) {\n    s = s.slice(1);\n  }\n  var arr = [ 0x02 ];\n  constructLength(arr, r.length);\n  arr = arr.concat(r);\n  arr.push(0x02);\n  constructLength(arr, s.length);\n  var backHalf = arr.concat(s);\n  var res = [ 0x30 ];\n  constructLength(res, backHalf.length);\n  res = res.concat(backHalf);\n  return utils.encode(res, enc);\n}",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/indutny/elliptic/blob/9b77436a59cc35eccf4ffb848259c8762a492ee7/lib/elliptic/ec/signature.js#L149-L176",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F193"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=bn.js%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F177"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "const BN = require('bn.js');\nconst a = new BN('dead', 16);\nconst b = new BN('beef', 16);\nconsole.log(a.add(b).toString(16));\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/indutny/bn.js",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F182"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "fraction-js",
          "name": [
            {
              "t": "fact",
              "fact": "F196"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/rawify/Fraction.js"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/fraction.js"
            },
            {
              "label": "Docs",
              "href": "https://raw.org/article/rational-numbers-in-javascript/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F203"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F197"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F205"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F199"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F198"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://raw.org/article/rational-numbers-in-javascript/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F196"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F214"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F215"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/norish-recipes/norish",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F214"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "export function formatAmountAsFraction(n: number | null | string): string {\n  if (n == null || n === \"\") return \"\";\n\n  const num = typeof n === \"string\" ? parseFloat(n) : n;\n\n  if (isNaN(num)) return String(n);\n  if (Number.isInteger(num)) return String(num);\n\n  try {\n    // Use fraction.js with simplification to handle floating point imprecision\n    // Tolerance of 0.01 allows 0.333 to become 1/3, 0.666 to become 2/3, etc.\n    const frac = new Fraction(num).simplify(0.01);\n\n    const wholePart = Math.floor(Math.abs(num));\n    const isNegative = num < 0;\n\n    // Get the fractional part\n    const fracPart = frac.mod(1).abs();\n\n    if (fracPart.valueOf() === 0) {\n      // It's a whole number after simplification\n      return String(Math.round(num));\n    }\n\n    const fractionStr = fracPart.toFraction();\n    const unicodeFrac = toUnicodeFraction(fractionStr);\n\n    // Check if we got a reasonable fraction (denominator <= 16)\n    // If not, fall back to decimal\n    const denominator = fracPart.d;\n\n    if (denominator > 16) {\n      return formatAmountAsDecimal(num);\n    }\n\n    const sign = isNegative ? \"-\" : \"\";\n\n    if (wholePart === 0) {\n      return `${sign}${unicodeFrac}`;\n    }\n\n    return `${sign}${wholePart} ${unicodeFrac}`;\n  } catch {\n    // If fraction.js fails, fall back to decimal\n    return formatAmountAsDecimal(num);\n  }\n}",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/norish-recipes/norish/blob/2f47662130e16cc5ee7611e23846c39c564d41c3/packages/shared/src/lib/format-amount.ts",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F213"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=fraction.js%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F196"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "const Fraction = require('fraction.js');\nconst value = new Fraction(1, 3);\nconsole.log(value.add(1, 6).toFraction());\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/rawify/Fraction.js",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F201"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "decimal-js-light",
          "name": [
            {
              "t": "fact",
              "fact": "F216"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/MikeMcl/decimal.js-light"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/decimal.js-light"
            },
            {
              "label": "Docs",
              "href": "https://github.com/MikeMcl/decimal.js-light#readme"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F223"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F217"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F225"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F219"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F218"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/MikeMcl/decimal.js-light#readme",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F216"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F234"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F235"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/recharts/recharts",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F234"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "function rangeStep(start: Decimal, end: Decimal, step: Decimal): Array<number> {\n  let num = new Decimal(start);\n  let i = 0;\n  const result: Array<number> = [];\n\n  // magic number to prevent infinite loop\n  while (num.lt(end) && i < 100000) {\n    result.push(num.toNumber());\n\n    const next = num.add(step);\n    /*\n     * A non-positive step, or one too small to change `num` at Decimal's\n     * current precision, leaves `num.lt(end)` true forever. Stop instead of\n     * emitting 100000 identical values up to the iteration cap. This happens\n     * with subnormal domains (the computed step collapses to zero) and with\n     * very large values where adding a small step rounds back to the same\n     * Decimal.\n     */\n    if (!next.gt(num)) {\n      break;\n    }\n    num = next;\n    i++;\n  }\n\n  return result;\n}",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/recharts/recharts/blob/070b2f790002e793a91c0fd1e480286c7e160c79/src/util/scale/util/arithmetic.ts#L38-L64",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F233"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=decimal.js-light%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F216"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import Decimal from 'decimal.js-light';\nconst value = new Decimal('2');\nconsole.log(value.dividedBy('3').toString());\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/MikeMcl/decimal.js-light",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F221"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "big-js",
          "name": [
            {
              "t": "fact",
              "fact": "F236"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/MikeMcl/big.js"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/big.js"
            },
            {
              "label": "Docs",
              "href": "https://github.com/MikeMcl/big.js#readme"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F64"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F237"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F243"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F239"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F238"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/MikeMcl/big.js#readme",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F236"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F65"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F66"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F67"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F68"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F69"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F70"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F252"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F253"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/xxczaki/cashify",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F252"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "export default function convert(\n\tamount: number | string,\n\t{ from, to, base, rates, BigJs }: Options,\n): number {\n\tlet numericAmount: number;\n\tlet resolvedFrom = from;\n\tlet resolvedTo = to;\n\n\tif (typeof amount === 'string') {\n\t\tconst data = parse(amount);\n\n\t\tnumericAmount = data.amount;\n\t\tresolvedFrom = data.from ?? from;\n\t\tresolvedTo = data.to ?? to;\n\t} else {\n\t\tnumericAmount = amount;\n\t}\n\n\tif (Number.isNaN(numericAmount) || !Number.isFinite(numericAmount)) {\n\t\tthrow new TypeError('The `amount` must be a finite number.');\n\t}\n\n\tif (BigJs) {\n\t\treturn new BigJs(numericAmount)\n\t\t\t.times(getRate({ base, rates, from: resolvedFrom, to: resolvedTo }))\n\t\t\t.toNumber();\n\t}\n\n\treturn (\n\t\t(numericAmount *\n\t\t\t100 *\n\t\t\tgetRate({ base, rates, from: resolvedFrom, to: resolvedTo })) /\n\t\t100\n\t);\n}",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/xxczaki/cashify/blob/d4a4962ee945e82c1e134d0184b1c1bb393fe5c2/src/convert.ts#L5-L39",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F251"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=JavaScript%20TypeScript%20projects%20using%20big.js%20for%20decimal%20arithmetic%2C%20configurable%20rounding%2C%20numeric%20conversion%20or%20mathematical%20expression%20evaluation&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F236"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import Big from 'big.js';\nconst value = new Big('0.1');\nconsole.log(value.plus('0.2').toString());\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://mikemcl.github.io/big.js/",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F241"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "mathjs",
          "name": [
            {
              "t": "fact",
              "fact": "F254"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/josdejong/mathjs"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/mathjs"
            },
            {
              "label": "Docs",
              "href": "https://mathjs.org"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F87"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F255"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F261"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F257"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F256"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://mathjs.org",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F254"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F88"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F89"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F90"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F91"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F92"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F93"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F94"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F95"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F271"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F272"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/javascriptdata/danfojs",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F271"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "median(options?: { axis?: 0 | 1 }): Series {\n        const { axis } = { axis: 1, ...options }\n\n        if (this.$frameIsNotCompactibleForArithmeticOperation()) {\n            throw Error(\"TypeError: median operation is not supported for string dtypes\");\n        }\n\n        if ([0, 1].indexOf(axis) === -1) {\n            throw Error(\"ParamError: Axis must be 0 or 1\");\n        }\n\n        const newData = this.$getDataByAxisWithMissingValuesRemoved(axis)\n        const resultArr = newData.map(arr => median(arr))\n        if (axis === 0) {\n            return new Series(resultArr, { index: this.columns });\n        } else {\n            return new Series(resultArr, { index: this.index });\n        }\n\n    }",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/javascriptdata/danfojs/blob/21d8c550b3aeba5f5ef0b46227a750307e203e70/src/danfojs-base/core/frame.ts#L859-L878",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F270"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=JavaScript%20TypeScript%20projects%20using%20mathjs%20for%20decimal%20arithmetic%2C%20configurable%20rounding%2C%20numeric%20conversion%20or%20mathematical%20expression%20evaluation&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F254"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import {create, all} from 'mathjs';\nconst math = create(all);\nconsole.log(math.evaluate('sqrt(3^2 + 4^2)'));\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://mathjs.org/docs/core/configuration.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F259"
            }
          ]
        }
      ]
    }
  ],
  "questions": [
    {
      "q": "Which JavaScript math library should I use?",
      "a": [
        {
          "t": "link",
          "href": "#decimal-js",
          "label": [
            {
              "t": "text",
              "text": "decimal.js"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits decimal arithmetic with a configurable precision. "
        },
        {
          "t": "link",
          "href": "#fraction-js",
          "label": [
            {
              "t": "text",
              "text": "Fraction.js"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits exact rational values. "
        },
        {
          "t": "link",
          "href": "#mathjs",
          "label": [
            {
              "t": "text",
              "text": "Math.js"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits apps that evaluate math expressions with units, matrices, and complex numbers."
        }
      ]
    },
    {
      "q": "How do I avoid floating-point precision errors in JavaScript?",
      "a": [
        {
          "t": "text",
          "text": "A decimal library such as "
        },
        {
          "t": "link",
          "href": "#decimal-js",
          "label": [
            {
              "t": "text",
              "text": "decimal.js"
            }
          ]
        },
        {
          "t": "text",
          "text": " or "
        },
        {
          "t": "link",
          "href": "#big-js",
          "label": [
            {
              "t": "text",
              "text": "big.js"
            }
          ]
        },
        {
          "t": "text",
          "text": " stores values as decimal digits. Calculations then round only at the precision the code sets."
        }
      ]
    },
    {
      "q": "What is Math.js?",
      "a": [
        {
          "t": "link",
          "href": "#mathjs",
          "label": [
            {
              "t": "text",
              "text": "Math.js"
            }
          ]
        },
        {
          "t": "text",
          "text": " is a math library for JavaScript and Node.js with an expression parser. It supports units, matrices, complex values, and several numeric types."
        }
      ]
    },
    {
      "q": "Does JavaScript have a BigInt type?",
      "a": [
        {
          "t": "text",
          "text": "JavaScript has a built-in BigInt type for integers of any size. "
        },
        {
          "t": "link",
          "href": "#bn-js",
          "label": [
            {
              "t": "text",
              "text": "BN.js"
            }
          ]
        },
        {
          "t": "text",
          "text": " and "
        },
        {
          "t": "link",
          "href": "#long",
          "label": [
            {
              "t": "text",
              "text": "long.js"
            }
          ]
        },
        {
          "t": "text",
          "text": " offer integer classes with their own APIs, including bitwise operations."
        }
      ]
    },
    {
      "q": "decimal.js vs big.js: which should I use?",
      "a": [
        {
          "t": "link",
          "href": "#decimal-js",
          "label": [
            {
              "t": "text",
              "text": "decimal.js"
            }
          ]
        },
        {
          "t": "text",
          "text": " offers a larger API with significant-digit rounding. "
        },
        {
          "t": "link",
          "href": "#big-js",
          "label": [
            {
              "t": "text",
              "text": "big.js"
            }
          ]
        },
        {
          "t": "text",
          "text": " keeps a smaller decimal API with precision controls focused on division."
        }
      ]
    }
  ],
  "facts": {
    "F1": {
      "label": "Library name, decimal.js",
      "display": "decimal.js",
      "asOf": "2026-11-17"
    },
    "F2": {
      "label": "Monthly downloads, decimal.js",
      "display": "522.7M",
      "asOf": "2026-11-15"
    },
    "F3": {
      "label": "License, decimal.js",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F4": {
      "label": "Package release, decimal.js",
      "display": "10.6.0",
      "asOf": "2026-11-17"
    },
    "F5": {
      "label": "Undated package release, decimal.js",
      "display": "v10.6.0",
      "asOf": "2026-11-17"
    },
    "F6": {
      "label": "Repository stars, decimal.js",
      "display": "7.3K",
      "asOf": "2026-11-17"
    },
    "F7": {
      "label": "Configures decimal precision, decimal.js",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F8": {
      "label": "Formats fixed decimals, decimal.js",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F9": {
      "label": "Computes square roots, decimal.js",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F10": {
      "label": "Uses immutable arithmetic, decimal.js",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F11": {
      "label": "Install, decimal.js",
      "display": "npm install decimal.js",
      "asOf": "2026-11-17"
    },
    "F12": {
      "label": "What it does, decimal.js",
      "display": "Provides arbitrary-precision decimal arithmetic for JavaScript.",
      "asOf": "2026-11-17"
    },
    "F13": {
      "label": "strengths lead, decimal.js",
      "display": "Controls significant-digit precision",
      "asOf": "2026-11-17"
    },
    "F14": {
      "label": "strengths, decimal.js",
      "display": "Round arithmetic to a configured number of significant digits.",
      "asOf": "2026-11-17"
    },
    "F15": {
      "label": "strengths lead, decimal.js",
      "display": "Provides decimal scientific functions",
      "asOf": "2026-11-17"
    },
    "F16": {
      "label": "strengths, decimal.js",
      "display": "Use trigonometry and non-integer powers with decimal values.",
      "asOf": "2026-11-17"
    },
    "F17": {
      "label": "limitations lead, decimal.js",
      "display": "Number inputs can lose digits",
      "asOf": "2026-11-17"
    },
    "F18": {
      "label": "limitations, decimal.js",
      "display": "Pass long decimal values as strings to preserve their input digits.",
      "asOf": "2026-11-17"
    },
    "F19": {
      "label": "limitations lead, decimal.js",
      "display": "Precision applies across arithmetic",
      "asOf": "2026-11-17"
    },
    "F20": {
      "label": "limitations, decimal.js",
      "display": "Account for rounding after operations beyond division.",
      "asOf": "2026-11-17"
    },
    "F21": {
      "label": "Quickstart, decimal.js",
      "display": "const Decimal = require('decimal.js');\n\n// Set the precision and rounding of the default Decimal constructor\nDecimal.set({ precision: 5, rounding: 4 })\n\n// Create another Decimal constructor, optionally passing in a configuration object\nDec = Decimal.clone({ precision: 9, rounding: 1 })\n\nx = new Decimal(5)\ny = new Dec(5)\n\nx.div(3)                           // '1.6667'\ny.div(3)                           // '1.66666666'\n",
      "asOf": "2026-11-17"
    },
    "F22": {
      "label": "Project function, decimal.js",
      "display": "export const createBigNumberClass = /* #__PURE__ */ factory(name, dependencies, ({ on, config }) => {\n  const BigNumber = Decimal.clone({ precision: config.precision, modulo: Decimal.EUCLID })\n  BigNumber.prototype = Object.create(BigNumber.prototype)\n\n  /**\n   * Attach type information\n   */\n  BigNumber.prototype.type = 'BigNumber'\n  BigNumber.prototype.isBigNumber = true\n\n  /**\n   * Get a JSON representation of a BigNumber containing\n   * type information\n   * @returns {Object} Returns a JSON object structured as:\n   *                   `{\"mathjs\": \"BigNumber\", \"value\": \"0.2\"}`\n   */\n  BigNumber.prototype.toJSON = function () {\n    return {\n      mathjs: 'BigNumber',\n      value: this.toString()\n    }\n  }\n\n  /**\n   * Instantiate a BigNumber from a JSON object\n   * @param {Object} json  a JSON object structured as:\n   *                       `{\"mathjs\": \"BigNumber\", \"value\": \"0.2\"}`\n   * @return {BigNumber}\n   */\n  BigNumber.fromJSON = function (json) {\n    return new BigNumber(json.value)\n  }\n\n  if (on) {\n    // listen for changed in the configuration, automatically apply changed precision\n    on('config', function (curr, prev) {\n      if (curr.precision !== prev.precision) {\n        BigNumber.config({ precision: curr.precision })\n      }\n    })\n  }\n\n  return BigNumber\n}, { isClass: true })\n",
      "asOf": "2026-11-17"
    },
    "F23": {
      "label": "Project function reference, decimal.js",
      "display": "BigNumber.js · createBigNumberClass()",
      "asOf": "2026-11-17"
    },
    "F24": {
      "label": "Project repository, decimal.js",
      "display": "josdejong/mathjs",
      "asOf": "2026-11-17"
    },
    "F25": {
      "label": "Project stars, josdejong/mathjs",
      "display": "15.1K",
      "asOf": "2026-11-17"
    },
    "F26": {
      "label": "Project push date, josdejong/mathjs",
      "display": "Nov 2026",
      "asOf": "2026-11-15"
    },
    "F27": {
      "label": "Library name, bignumber.js",
      "display": "bignumber.js",
      "asOf": "2026-11-17"
    },
    "F28": {
      "label": "Monthly downloads, bignumber.js",
      "display": "337.1M",
      "asOf": "2026-11-15"
    },
    "F29": {
      "label": "License, bignumber.js",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F30": {
      "label": "Package release, bignumber.js",
      "display": "11.1.5",
      "asOf": "2026-11-17"
    },
    "F31": {
      "label": "Undated package release, bignumber.js",
      "display": "v11.1.5",
      "asOf": "2026-11-17"
    },
    "F32": {
      "label": "Repository stars, bignumber.js",
      "display": "7.0K",
      "asOf": "2026-11-17"
    },
    "F33": {
      "label": "Configures decimal precision, bignumber.js",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F34": {
      "label": "Formats fixed decimals, bignumber.js",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F35": {
      "label": "Computes square roots, bignumber.js",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F36": {
      "label": "Uses immutable arithmetic, bignumber.js",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F37": {
      "label": "Install, bignumber.js",
      "display": "npm install bignumber.js",
      "asOf": "2026-11-17"
    },
    "F38": {
      "label": "What it does, bignumber.js",
      "display": "Provides arbitrary-precision decimal and non-decimal numeric arithmetic.",
      "asOf": "2026-11-17"
    },
    "F39": {
      "label": "strengths lead, bignumber.js",
      "display": "Handles multiple number bases",
      "asOf": "2026-11-17"
    },
    "F40": {
      "label": "strengths, bignumber.js",
      "display": "Create values in decimal or another specified number base.",
      "asOf": "2026-11-17"
    },
    "F41": {
      "label": "strengths lead, bignumber.js",
      "display": "Preserves exact basic arithmetic",
      "asOf": "2026-11-17"
    },
    "F42": {
      "label": "strengths, bignumber.js",
      "display": "Arithmetic outside division-related operations returns exact results.",
      "asOf": "2026-11-17"
    },
    "F43": {
      "label": "limitations lead, bignumber.js",
      "display": "Number inputs can lose digits",
      "asOf": "2026-11-17"
    },
    "F44": {
      "label": "limitations, bignumber.js",
      "display": "Create high-precision values from strings instead of native numbers.",
      "asOf": "2026-11-17"
    },
    "F45": {
      "label": "limitations lead, bignumber.js",
      "display": "Division uses configured decimal places",
      "asOf": "2026-11-17"
    },
    "F46": {
      "label": "limitations, bignumber.js",
      "display": "Set DECIMAL_PLACES and ROUNDING_MODE for division-related results.",
      "asOf": "2026-11-17"
    },
    "F47": {
      "label": "Quickstart, bignumber.js",
      "display": "const BigNumber = require('bignumber.js');\n\nBigNumber.set({ DECIMAL_PLACES: 10, ROUNDING_MODE: 4 })\n\nx = new BigNumber(2)\ny = new BigNumber(3)\nz = x.dividedBy(y)                        // \"0.6666666667\"\nz.squareRoot()                            // \"0.8164965809\"\nz.exponentiatedBy(-3)                     // \"3.3749999995\"\nz.toString(2)                             // \"0.1010101011\"\nz.multipliedBy(z)                         // \"0.44444444448888888889\"\nz.multipliedBy(z).decimalPlaces(10)       // \"0.4444444445\"\n",
      "asOf": "2026-11-17"
    },
    "F48": {
      "label": "Project function, bignumber.js",
      "display": "export const convertAmountFromNativeValue = (\n  value: BigNumberish,\n  priceUnit: BigNumberish | null,\n  decimals = 18\n): string => {\n  if (isNil(priceUnit) || isZero(priceUnit)) return '0';\n  return new BigNumber(new BigNumber(value).dividedBy(priceUnit).toFixed(decimals, BigNumber.ROUND_DOWN)).toFixed();\n};\n",
      "asOf": "2026-11-17"
    },
    "F49": {
      "label": "Project function reference, bignumber.js",
      "display": "amount-conversion.ts · convertAmountFromNativeValue()",
      "asOf": "2026-11-17"
    },
    "F50": {
      "label": "Project repository, bignumber.js",
      "display": "cardstack/cardstack",
      "asOf": "2026-11-17"
    },
    "F51": {
      "label": "Project stars, cardstack/cardstack",
      "display": "326",
      "asOf": "2026-11-17"
    },
    "F52": {
      "label": "Project push date, cardstack/cardstack",
      "display": "Mar 2024",
      "asOf": "2024-03-21"
    },
    "F53": {
      "label": "Library name, big.js",
      "display": "big.js",
      "asOf": "2026-11-17"
    },
    "F54": {
      "label": "Monthly downloads, big.js",
      "display": "162.9M",
      "asOf": "2026-11-15"
    },
    "F55": {
      "label": "License, big.js",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F56": {
      "label": "Package release, big.js",
      "display": "7.0.1",
      "asOf": "2026-11-17"
    },
    "F57": {
      "label": "Undated package release, big.js",
      "display": "v7.0.1",
      "asOf": "2026-11-17"
    },
    "F58": {
      "label": "Repository stars, big.js",
      "display": "5.2K",
      "asOf": "2026-11-17"
    },
    "F59": {
      "label": "Configures decimal precision, big.js",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F60": {
      "label": "Formats fixed decimals, big.js",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F61": {
      "label": "Computes square roots, big.js",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F62": {
      "label": "Uses immutable arithmetic, big.js",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F63": {
      "label": "Install, big.js",
      "display": "npm install big.js",
      "asOf": "2026-11-17"
    },
    "F64": {
      "label": "What it does, big.js",
      "display": "Provides arbitrary-precision decimal arithmetic through a small numeric API.",
      "asOf": "2026-11-17"
    },
    "F65": {
      "label": "strengths lead, big.js",
      "display": "Preserves exact basic arithmetic",
      "asOf": "2026-11-17"
    },
    "F66": {
      "label": "strengths, big.js",
      "display": "Addition, subtraction, and multiplication return exact decimal results.",
      "asOf": "2026-11-17"
    },
    "F67": {
      "label": "strengths lead, big.js",
      "display": "Offers strict numeric conversion",
      "asOf": "2026-11-17"
    },
    "F68": {
      "label": "strengths, big.js",
      "display": "Enable strict mode to reject imprecise conversions to native numbers.",
      "asOf": "2026-11-17"
    },
    "F69": {
      "label": "limitations lead, big.js",
      "display": "Division still requires rounding",
      "asOf": "2026-11-17"
    },
    "F70": {
      "label": "limitations, big.js",
      "display": "Set DP and RM for division, square roots, and negative powers.",
      "asOf": "2026-11-17"
    },
    "F71": {
      "label": "Quickstart, big.js",
      "display": "const Big = require('big.js');\n\nBig.DP = 10\nBig.RM = Big.roundHalfUp\n\nx = new Big(2);\ny = new Big(3);\nz = x.div(y)                           // \"0.6666666667\"\nz.sqrt()                               // \"0.8164965809\"\nz.pow(-3)                              // \"3.3749999995\"\nz.times(z)                             // \"0.44444444448888888889\"\nz.times(z).round(10)                   // \"0.4444444445\"\n",
      "asOf": "2026-11-17"
    },
    "F72": {
      "label": "Project function, big.js",
      "display": "export default function convert(\n\tamount: number | string,\n\t{ from, to, base, rates, BigJs }: Options,\n): number {\n\tlet numericAmount: number;\n\tlet resolvedFrom = from;\n\tlet resolvedTo = to;\n\n\tif (typeof amount === 'string') {\n\t\tconst data = parse(amount);\n\n\t\tnumericAmount = data.amount;\n\t\tresolvedFrom = data.from ?? from;\n\t\tresolvedTo = data.to ?? to;\n\t} else {\n\t\tnumericAmount = amount;\n\t}\n\n\tif (Number.isNaN(numericAmount) || !Number.isFinite(numericAmount)) {\n\t\tthrow new TypeError('The `amount` must be a finite number.');\n\t}\n\n\tif (BigJs) {\n\t\treturn new BigJs(numericAmount)\n\t\t\t.times(getRate({ base, rates, from: resolvedFrom, to: resolvedTo }))\n\t\t\t.toNumber();\n\t}\n\n\treturn (\n\t\t(numericAmount *\n\t\t\t100 *\n\t\t\tgetRate({ base, rates, from: resolvedFrom, to: resolvedTo })) /\n\t\t100\n\t);\n}\n",
      "asOf": "2026-11-17"
    },
    "F73": {
      "label": "Project function reference, big.js",
      "display": "convert.ts · convert()",
      "asOf": "2026-11-17"
    },
    "F74": {
      "label": "Project repository, big.js",
      "display": "xxczaki/cashify",
      "asOf": "2026-11-17"
    },
    "F75": {
      "label": "Project stars, xxczaki/cashify",
      "display": "408",
      "asOf": "2026-11-17"
    },
    "F76": {
      "label": "Project push date, xxczaki/cashify",
      "display": "Nov 2026",
      "asOf": "2026-11-16"
    },
    "F77": {
      "label": "Library name, mathjs",
      "display": "mathjs",
      "asOf": "2026-11-17"
    },
    "F78": {
      "label": "Monthly downloads, mathjs",
      "display": "20.6M",
      "asOf": "2026-11-15"
    },
    "F79": {
      "label": "License, mathjs",
      "display": "Apache-2.0",
      "asOf": "2026-11-17"
    },
    "F80": {
      "label": "Package release, mathjs",
      "display": "15.2.0",
      "asOf": "2026-11-17"
    },
    "F81": {
      "label": "Undated package release, mathjs",
      "display": "v15.2.0",
      "asOf": "2026-11-17"
    },
    "F82": {
      "label": "Repository stars, mathjs",
      "display": "15.1K",
      "asOf": "2026-11-17"
    },
    "F83": {
      "label": "Configures decimal precision, mathjs",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F84": {
      "label": "Formats fixed decimals, mathjs",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F85": {
      "label": "Computes square roots, mathjs",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F86": {
      "label": "Install, mathjs",
      "display": "npm install mathjs",
      "asOf": "2026-11-17"
    },
    "F87": {
      "label": "What it does, mathjs",
      "display": "Provides a mathematics library for JavaScript and Node.js.",
      "asOf": "2026-11-17"
    },
    "F88": {
      "label": "strengths lead, mathjs",
      "display": "Evaluates expressions with units",
      "asOf": "2026-11-17"
    },
    "F89": {
      "label": "strengths, mathjs",
      "display": "Convert measurement units inside mathematical expressions.",
      "asOf": "2026-11-17"
    },
    "F90": {
      "label": "strengths lead, mathjs",
      "display": "Supports configurable decimal precision",
      "asOf": "2026-11-17"
    },
    "F91": {
      "label": "strengths, mathjs",
      "display": "Configure BigNumber as the default numeric type for expression evaluation.",
      "asOf": "2026-11-17"
    },
    "F92": {
      "label": "limitations lead, mathjs",
      "display": "BigNumber support varies by function",
      "asOf": "2026-11-17"
    },
    "F93": {
      "label": "limitations, mathjs",
      "display": "The random function does not support BigNumber values.",
      "asOf": "2026-11-17"
    },
    "F94": {
      "label": "limitations lead, mathjs",
      "display": "Heavy expressions need worker isolation",
      "asOf": "2026-11-17"
    },
    "F95": {
      "label": "limitations, mathjs",
      "display": "Evaluate heavy expressions in a worker that can be terminated.",
      "asOf": "2026-11-17"
    },
    "F96": {
      "label": "Quickstart, mathjs",
      "display": "import {\n  atan2, chain, derivative, e, evaluate, log, pi, pow, round, sqrt\n} from 'mathjs'\n\n// functions and constants\nround(e, 3)                    // 2.718\natan2(3, -3) / pi              // 0.75\nlog(10000, 10)                 // 4\nsqrt(-4)                       // 2i\npow([[-1, 2], [3, 1]], 2)      // [[7, 0], [0, 7]]\nderivative('x^2 + x', 'x')     // 2 * x + 1\n\n// expressions\nevaluate('12 / (2.3 + 0.7)')   // 4\nevaluate('12.7 cm to inch')    // 5 inch\nevaluate('sin(45 deg) ^ 2')    // 0.5\nevaluate('9 / 3 + 2i')         // 3 + 2i\nevaluate('det([-1, 2; 3, 1])') // -7\n\n// chaining\nchain(3)\n    .add(4)\n    .multiply(2)\n    .done()  // 14\n",
      "asOf": "2026-11-17"
    },
    "F97": {
      "label": "Developer need",
      "display": "Scientific expressions and unit conversions",
      "asOf": "2026-11-17"
    },
    "F98": {
      "label": "Why choose mathjs",
      "display": "an expression engine with scientific operations and units",
      "asOf": "2026-11-17"
    },
    "F99": {
      "label": "Developer need in introduction",
      "display": "scientific expressions and unit conversions",
      "asOf": "2026-11-17"
    },
    "F100": {
      "label": "Developer need",
      "display": "Scientific decimal arithmetic",
      "asOf": "2026-11-17"
    },
    "F101": {
      "label": "Why choose decimal.js",
      "display": "decimal trigonometry and non-integer powers",
      "asOf": "2026-11-17"
    },
    "F102": {
      "label": "Developer need in introduction",
      "display": "scientific decimal arithmetic",
      "asOf": "2026-11-17"
    },
    "F103": {
      "label": "When to consider big.js",
      "display": "exact basic arithmetic is sufficient",
      "asOf": "2026-11-17"
    },
    "F104": {
      "label": "Developer need",
      "display": "Exact basic decimal arithmetic",
      "asOf": "2026-11-17"
    },
    "F105": {
      "label": "Why choose big.js",
      "display": "exact addition, subtraction, and multiplication",
      "asOf": "2026-11-17"
    },
    "F106": {
      "label": "Developer need in introduction",
      "display": "exact basic decimal arithmetic",
      "asOf": "2026-11-17"
    },
    "F107": {
      "label": "Developer need",
      "display": "Decimal and non-decimal arithmetic",
      "asOf": "2026-11-17"
    },
    "F108": {
      "label": "Why choose bignumber.js",
      "display": "values created in decimal and other number bases",
      "asOf": "2026-11-17"
    },
    "F109": {
      "label": "Developer need in introduction",
      "display": "decimal and non-decimal arithmetic",
      "asOf": "2026-11-17"
    },
    "F110": {
      "label": "When to consider decimal.js",
      "display": "precision must apply as significant digits across operations",
      "asOf": "2026-11-17"
    },
    "F111": {
      "label": "Page introduction",
      "display": "JavaScript math libraries let developers perform numerical calculations.",
      "asOf": "2026-11-17"
    },
    "F112": {
      "label": "FAQ: Which JavaScript math library should I choose?",
      "display": "mathjs evaluates expressions with unit conversions.",
      "asOf": "2026-11-17"
    },
    "F113": {
      "label": "FAQ: Which JavaScript math library should I choose?",
      "display": "decimal.js includes trigonometry and non-integer powers.",
      "asOf": "2026-11-17"
    },
    "F114": {
      "label": "FAQ: Which JavaScript math library should I choose?",
      "display": "big.js supports exact basic decimal arithmetic.",
      "asOf": "2026-11-17"
    },
    "F115": {
      "label": "FAQ: Which JavaScript math library should I choose?",
      "display": "bignumber.js supports decimal and non-decimal arithmetic.",
      "asOf": "2026-11-17"
    },
    "F116": {
      "label": "FAQ: Does mathjs use arbitrary-precision decimals by default?",
      "display": "Expression evaluation normally uses the native number type; configure BigNumber when decimal precision is needed.",
      "asOf": "2026-11-17"
    },
    "F117": {
      "label": "FAQ: Is decimal precision the same as decimal places?",
      "display": "decimal.js specifies significant digits and rounds calculations to that precision.",
      "asOf": "2026-11-17"
    },
    "F118": {
      "label": "FAQ: Is decimal precision the same as decimal places?",
      "display": "big.js controls decimal places and rounding for division-related operations.",
      "asOf": "2026-11-17"
    },
    "F119": {
      "label": "FAQ: Should high-precision values enter through strings or native numbers?",
      "display": "decimal.js recommends strings to avoid losing input precision.",
      "asOf": "2026-11-17"
    },
    "F120": {
      "label": "FAQ: Should high-precision values enter through strings or native numbers?",
      "display": "bignumber.js also recommends string inputs when native-number precision is insufficient.",
      "asOf": "2026-11-17"
    },
    "F121": {
      "label": "FAQ: Does converting a BigNumber back to a native number preserve precision?",
      "display": "mathjs BigNumber-to-number conversion loses the higher precision and can overflow to Infinity.",
      "asOf": "2026-11-17"
    },
    "F122": {
      "label": "FAQ: Can big.js reject an imprecise conversion?",
      "display": "Enable strict mode to reject an imprecise toNumber conversion.",
      "asOf": "2026-11-17"
    },
    "F123": {
      "label": "FAQ: Does arbitrary precision make every division exact?",
      "display": "mathjs BigNumbers still have a finite configured precision.",
      "asOf": "2026-11-17"
    },
    "F124": {
      "label": "FAQ: Does arbitrary precision make every division exact?",
      "display": "big.js rounds division, square roots, and negative powers.",
      "asOf": "2026-11-17"
    },
    "F125": {
      "label": "FAQ: Can decimal calculations use independent rounding configurations?",
      "display": "Decimal.clone creates another constructor with its own precision and rounding settings.",
      "asOf": "2026-11-17"
    },
    "F126": {
      "label": "FAQ: Can decimal calculations use independent rounding configurations?",
      "display": "BigNumber.clone likewise supports an independent constructor configuration.",
      "asOf": "2026-11-17"
    },
    "F127": {
      "label": "FAQ: How should an application handle expensive user expressions?",
      "display": "mathjs recommends running the parser in a separate worker or child process that can be terminated.",
      "asOf": "2026-11-17"
    },
    "F128": {
      "label": "Library name, decimal.js",
      "display": "decimal.js",
      "asOf": "2026-11-20"
    },
    "F129": {
      "label": "Monthly downloads, decimal.js",
      "display": "536.3M",
      "asOf": "2026-11-20"
    },
    "F130": {
      "label": "License, decimal.js",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F131": {
      "label": "Package release, decimal.js",
      "display": "10.6.0",
      "asOf": "2026-11-20"
    },
    "F132": {
      "label": "Package release date, decimal.js",
      "display": "Jul 2025",
      "asOf": "2026-11-20"
    },
    "F133": {
      "label": "Install, decimal.js",
      "display": "npm install decimal.js",
      "asOf": "2026-11-20"
    },
    "F134": {
      "label": "Quickstart, decimal.js",
      "display": "import Decimal from 'decimal.js';\nconst value = new Decimal('0.1');\nconsole.log(value.plus('0.2').toString());\n",
      "asOf": "2026-11-20"
    },
    "F135": {
      "label": "Repository stars, decimal.js",
      "display": "7.3K",
      "asOf": "2026-11-20"
    },
    "F136": {
      "label": "Global decimal precision, decimal.js",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F137": {
      "label": "Exact rational type, decimal.js",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F138": {
      "label": "Expression evaluation, decimal.js",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F139": {
      "label": "Bitwise operations, decimal.js",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F140": {
      "label": "Numeric model, decimal.js",
      "display": "Arbitrary-precision decimal with significant-digit rounding",
      "asOf": "2026-11-20"
    },
    "F141": {
      "label": "Project function, decimal.js",
      "display": "({ on, config }) => {\n  const BigNumber = Decimal.clone({ precision: config.precision, modulo: Decimal.EUCLID })\n  BigNumber.prototype = Object.create(BigNumber.prototype)\n\n  /**\n   * Attach type information\n   */\n  BigNumber.prototype.type = 'BigNumber'\n  BigNumber.prototype.isBigNumber = true\n\n  /**\n   * Get a JSON representation of a BigNumber containing\n   * type information\n   * @returns {Object} Returns a JSON object structured as:\n   *                   `{\"mathjs\": \"BigNumber\", \"value\": \"0.2\"}`\n   */\n  BigNumber.prototype.toJSON = function () {\n    return {\n      mathjs: 'BigNumber',\n      value: this.toString()\n    }\n  }\n\n  /**\n   * Instantiate a BigNumber from a JSON object\n   * @param {Object} json  a JSON object structured as:\n   *                       `{\"mathjs\": \"BigNumber\", \"value\": \"0.2\"}`\n   * @return {BigNumber}\n   */\n  BigNumber.fromJSON = function (json) {\n    return new BigNumber(json.value)\n  }\n\n  if (on) {\n    // listen for changed in the configuration, automatically apply changed precision\n    on('config', function (curr, prev) {\n      if (curr.precision !== prev.precision) {\n        BigNumber.config({ precision: curr.precision })\n      }\n    })\n  }\n\n  return BigNumber\n}",
      "asOf": "2026-11-20"
    },
    "F142": {
      "label": "Project source file, decimal.js",
      "display": "src/type/bignumber/BigNumber.js",
      "asOf": "2026-11-20"
    },
    "F143": {
      "label": "Project full_name, decimal.js",
      "display": "josdejong/mathjs",
      "asOf": "2026-11-20"
    },
    "F144": {
      "label": "Project stargazers_count, decimal.js",
      "display": "15.1K",
      "asOf": "2026-11-20"
    },
    "F145": {
      "label": "Library name, long",
      "display": "long.js",
      "asOf": "2026-11-20"
    },
    "F146": {
      "label": "Monthly downloads, long",
      "display": "502.9M",
      "asOf": "2026-11-20"
    },
    "F147": {
      "label": "License, long",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F148": {
      "label": "Package release, long",
      "display": "5.3.2",
      "asOf": "2026-11-20"
    },
    "F149": {
      "label": "Package release date, long",
      "display": "Apr 2025",
      "asOf": "2026-11-20"
    },
    "F150": {
      "label": "Install, long",
      "display": "npm install long",
      "asOf": "2026-11-20"
    },
    "F151": {
      "label": "Quickstart, long",
      "display": "import Long from 'long';\nconst value = Long.fromString('9007199254740993');\nconsole.log(value.add(1).toString());\n",
      "asOf": "2026-11-20"
    },
    "F152": {
      "label": "Official description, long",
      "display": "Represents a 64-bit two's-complement integer value as a Long class.",
      "asOf": "2026-11-20"
    },
    "F153": {
      "label": "Quickstart source file, long",
      "display": "README.md",
      "asOf": "2026-11-20"
    },
    "F154": {
      "label": "Repository stars, long",
      "display": "920",
      "asOf": "2026-11-20"
    },
    "F155": {
      "label": "Global decimal precision, long",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F156": {
      "label": "Exact rational type, long",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F157": {
      "label": "Expression evaluation, long",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F158": {
      "label": "Bitwise operations, long",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F159": {
      "label": "Numeric model, long",
      "display": "Fixed-width signed/unsigned two’s-complement integers",
      "asOf": "2026-11-20"
    },
    "F160": {
      "label": "Library name, bignumber.js",
      "display": "bignumber.js",
      "asOf": "2026-11-20"
    },
    "F161": {
      "label": "Monthly downloads, bignumber.js",
      "display": "345.6M",
      "asOf": "2026-11-20"
    },
    "F162": {
      "label": "License, bignumber.js",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F163": {
      "label": "Package release, bignumber.js",
      "display": "11.1.5",
      "asOf": "2026-11-20"
    },
    "F164": {
      "label": "Package release date, bignumber.js",
      "display": "Jul 2026",
      "asOf": "2026-11-20"
    },
    "F165": {
      "label": "Install, bignumber.js",
      "display": "npm install bignumber.js",
      "asOf": "2026-11-20"
    },
    "F166": {
      "label": "Quickstart, bignumber.js",
      "display": "import BigNumber from 'bignumber.js';\nconst value = new BigNumber('0.1');\nconsole.log(value.plus('0.2').toString());\n",
      "asOf": "2026-11-20"
    },
    "F167": {
      "label": "Repository stars, bignumber.js",
      "display": "7.0K",
      "asOf": "2026-11-20"
    },
    "F168": {
      "label": "Global decimal precision, bignumber.js",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F169": {
      "label": "Exact rational type, bignumber.js",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F170": {
      "label": "Expression evaluation, bignumber.js",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F171": {
      "label": "Bitwise operations, bignumber.js",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F172": {
      "label": "Numeric model, bignumber.js",
      "display": "Arbitrary-precision decimal with configurable division rounding",
      "asOf": "2026-11-20"
    },
    "F173": {
      "label": "Project function, bignumber.js",
      "display": "export const convertAmountFromNativeValue = (\n  value: BigNumberish,\n  priceUnit: BigNumberish | null,\n  decimals = 18\n): string => {\n  if (isNil(priceUnit) || isZero(priceUnit)) return '0';\n  return new BigNumber(new BigNumber(value).dividedBy(priceUnit).toFixed(decimals, BigNumber.ROUND_DOWN)).toFixed();\n};",
      "asOf": "2026-11-20"
    },
    "F174": {
      "label": "Project source file, bignumber.js",
      "display": "packages/cardpay-sdk/sdk/currency-utils/amount-conversion.ts",
      "asOf": "2026-11-20"
    },
    "F175": {
      "label": "Project full_name, bignumber.js",
      "display": "cardstack/cardstack",
      "asOf": "2026-11-20"
    },
    "F176": {
      "label": "Project stargazers_count, bignumber.js",
      "display": "326",
      "asOf": "2026-11-20"
    },
    "F177": {
      "label": "Library name, bn.js",
      "display": "BN.js",
      "asOf": "2026-11-20"
    },
    "F178": {
      "label": "Monthly downloads, bn.js",
      "display": "307.7M",
      "asOf": "2026-11-20"
    },
    "F179": {
      "label": "License, bn.js",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F180": {
      "label": "Package release, bn.js",
      "display": "5.2.5",
      "asOf": "2026-11-20"
    },
    "F181": {
      "label": "Package release date, bn.js",
      "display": "Jul 2026",
      "asOf": "2026-11-20"
    },
    "F182": {
      "label": "Install, bn.js",
      "display": "npm install bn.js",
      "asOf": "2026-11-20"
    },
    "F183": {
      "label": "Quickstart, bn.js",
      "display": "const BN = require('bn.js');\nconst a = new BN('dead', 16);\nconst b = new BN('beef', 16);\nconsole.log(a.add(b).toString(16));\n",
      "asOf": "2026-11-20"
    },
    "F184": {
      "label": "Official description, bn.js",
      "display": "Implements big number arithmetic in pure JavaScript.",
      "asOf": "2026-11-20"
    },
    "F185": {
      "label": "Quickstart source file, bn.js",
      "display": "README.md",
      "asOf": "2026-11-20"
    },
    "F186": {
      "label": "Repository stars, bn.js",
      "display": "1.2K",
      "asOf": "2026-11-20"
    },
    "F187": {
      "label": "Global decimal precision, bn.js",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F188": {
      "label": "Exact rational type, bn.js",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F189": {
      "label": "Expression evaluation, bn.js",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F190": {
      "label": "Bitwise operations, bn.js",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F191": {
      "label": "Numeric model, bn.js",
      "display": "Arbitrary-size integer arithmetic",
      "asOf": "2026-11-20"
    },
    "F192": {
      "label": "Project function, bn.js",
      "display": "function toDER(enc) {\n  var r = this.r.toArray();\n  var s = this.s.toArray();\n\n  // Pad values\n  if (r[0] & 0x80)\n    r = [ 0 ].concat(r);\n  // Pad values\n  if (s[0] & 0x80)\n    s = [ 0 ].concat(s);\n\n  r = rmPadding(r);\n  s = rmPadding(s);\n\n  while (!s[0] && !(s[1] & 0x80)) {\n    s = s.slice(1);\n  }\n  var arr = [ 0x02 ];\n  constructLength(arr, r.length);\n  arr = arr.concat(r);\n  arr.push(0x02);\n  constructLength(arr, s.length);\n  var backHalf = arr.concat(s);\n  var res = [ 0x30 ];\n  constructLength(res, backHalf.length);\n  res = res.concat(backHalf);\n  return utils.encode(res, enc);\n}",
      "asOf": "2026-11-20"
    },
    "F193": {
      "label": "Project source file, bn.js",
      "display": "lib/elliptic/ec/signature.js",
      "asOf": "2026-11-20"
    },
    "F194": {
      "label": "Project full_name, bn.js",
      "display": "indutny/elliptic",
      "asOf": "2026-11-20"
    },
    "F195": {
      "label": "Project stargazers_count, bn.js",
      "display": "1.8K",
      "asOf": "2026-11-20"
    },
    "F196": {
      "label": "Library name, fraction.js",
      "display": "Fraction.js",
      "asOf": "2026-11-20"
    },
    "F197": {
      "label": "Monthly downloads, fraction.js",
      "display": "272.5M",
      "asOf": "2026-11-20"
    },
    "F198": {
      "label": "License, fraction.js",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F199": {
      "label": "Package release, fraction.js",
      "display": "5.3.4",
      "asOf": "2026-11-20"
    },
    "F200": {
      "label": "Package release date, fraction.js",
      "display": "Aug 2025",
      "asOf": "2026-11-20"
    },
    "F201": {
      "label": "Install, fraction.js",
      "display": "npm install fraction.js",
      "asOf": "2026-11-20"
    },
    "F202": {
      "label": "Quickstart, fraction.js",
      "display": "const Fraction = require('fraction.js');\nconst value = new Fraction(1, 3);\nconsole.log(value.add(1, 6).toFraction());\n",
      "asOf": "2026-11-20"
    },
    "F203": {
      "label": "Official description, fraction.js",
      "display": "Provides exact rational number arithmetic.",
      "asOf": "2026-11-20"
    },
    "F204": {
      "label": "Quickstart source file, fraction.js",
      "display": "README.md",
      "asOf": "2026-11-20"
    },
    "F205": {
      "label": "Repository stars, fraction.js",
      "display": "696",
      "asOf": "2026-11-20"
    },
    "F206": {
      "label": "Global decimal precision, fraction.js",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F207": {
      "label": "Exact rational type, fraction.js",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F208": {
      "label": "Expression evaluation, fraction.js",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F209": {
      "label": "Bitwise operations, fraction.js",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F210": {
      "label": "Runtime engine, fraction.js",
      "display": "{\"node\": \"*\"}",
      "asOf": "2026-11-20"
    },
    "F211": {
      "label": "Numeric model, fraction.js",
      "display": "Exact rational values with BigInt numerator/denominator",
      "asOf": "2026-11-20"
    },
    "F212": {
      "label": "Project function, fraction.js",
      "display": "export function formatAmountAsFraction(n: number | null | string): string {\n  if (n == null || n === \"\") return \"\";\n\n  const num = typeof n === \"string\" ? parseFloat(n) : n;\n\n  if (isNaN(num)) return String(n);\n  if (Number.isInteger(num)) return String(num);\n\n  try {\n    // Use fraction.js with simplification to handle floating point imprecision\n    // Tolerance of 0.01 allows 0.333 to become 1/3, 0.666 to become 2/3, etc.\n    const frac = new Fraction(num).simplify(0.01);\n\n    const wholePart = Math.floor(Math.abs(num));\n    const isNegative = num < 0;\n\n    // Get the fractional part\n    const fracPart = frac.mod(1).abs();\n\n    if (fracPart.valueOf() === 0) {\n      // It's a whole number after simplification\n      return String(Math.round(num));\n    }\n\n    const fractionStr = fracPart.toFraction();\n    const unicodeFrac = toUnicodeFraction(fractionStr);\n\n    // Check if we got a reasonable fraction (denominator <= 16)\n    // If not, fall back to decimal\n    const denominator = fracPart.d;\n\n    if (denominator > 16) {\n      return formatAmountAsDecimal(num);\n    }\n\n    const sign = isNegative ? \"-\" : \"\";\n\n    if (wholePart === 0) {\n      return `${sign}${unicodeFrac}`;\n    }\n\n    return `${sign}${wholePart} ${unicodeFrac}`;\n  } catch {\n    // If fraction.js fails, fall back to decimal\n    return formatAmountAsDecimal(num);\n  }\n}",
      "asOf": "2026-11-20"
    },
    "F213": {
      "label": "Project source file, fraction.js",
      "display": "packages/shared/src/lib/format-amount.ts",
      "asOf": "2026-11-20"
    },
    "F214": {
      "label": "Project full_name, fraction.js",
      "display": "norish-recipes/norish",
      "asOf": "2026-11-20"
    },
    "F215": {
      "label": "Project stargazers_count, fraction.js",
      "display": "1.6K",
      "asOf": "2026-11-20"
    },
    "F216": {
      "label": "Library name, decimal.js-light",
      "display": "decimal.js-light",
      "asOf": "2026-11-20"
    },
    "F217": {
      "label": "Monthly downloads, decimal.js-light",
      "display": "246.7M",
      "asOf": "2026-11-20"
    },
    "F218": {
      "label": "License, decimal.js-light",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F219": {
      "label": "Package release, decimal.js-light",
      "display": "2.5.1",
      "asOf": "2026-11-20"
    },
    "F220": {
      "label": "Package release date, decimal.js-light",
      "display": "Sep 2020",
      "asOf": "2026-11-20"
    },
    "F221": {
      "label": "Install, decimal.js-light",
      "display": "npm install decimal.js-light",
      "asOf": "2026-11-20"
    },
    "F222": {
      "label": "Quickstart, decimal.js-light",
      "display": "import Decimal from 'decimal.js-light';\nconst value = new Decimal('2');\nconsole.log(value.dividedBy('3').toString());\n",
      "asOf": "2026-11-20"
    },
    "F223": {
      "label": "Official description, decimal.js-light",
      "display": "Provides an arbitrary-precision Decimal type for JavaScript.",
      "asOf": "2026-11-20"
    },
    "F224": {
      "label": "Quickstart source file, decimal.js-light",
      "display": "README.md",
      "asOf": "2026-11-20"
    },
    "F225": {
      "label": "Repository stars, decimal.js-light",
      "display": "411",
      "asOf": "2026-11-20"
    },
    "F226": {
      "label": "Global decimal precision, decimal.js-light",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F227": {
      "label": "Exact rational type, decimal.js-light",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F228": {
      "label": "Expression evaluation, decimal.js-light",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F229": {
      "label": "Bitwise operations, decimal.js-light",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F230": {
      "label": "Arithmetic behavior, decimal.js-light",
      "display": "Truncation at precision, with explicit formatting rounding",
      "asOf": "2026-11-20"
    },
    "F231": {
      "label": "Value domain, decimal.js-light",
      "display": "NaN, Infinity, and negative zero are not supported",
      "asOf": "2026-11-20"
    },
    "F232": {
      "label": "Project function, decimal.js-light",
      "display": "function rangeStep(start: Decimal, end: Decimal, step: Decimal): Array<number> {\n  let num = new Decimal(start);\n  let i = 0;\n  const result: Array<number> = [];\n\n  // magic number to prevent infinite loop\n  while (num.lt(end) && i < 100000) {\n    result.push(num.toNumber());\n\n    const next = num.add(step);\n    /*\n     * A non-positive step, or one too small to change `num` at Decimal's\n     * current precision, leaves `num.lt(end)` true forever. Stop instead of\n     * emitting 100000 identical values up to the iteration cap. This happens\n     * with subnormal domains (the computed step collapses to zero) and with\n     * very large values where adding a small step rounds back to the same\n     * Decimal.\n     */\n    if (!next.gt(num)) {\n      break;\n    }\n    num = next;\n    i++;\n  }\n\n  return result;\n}",
      "asOf": "2026-11-20"
    },
    "F233": {
      "label": "Project source file, decimal.js-light",
      "display": "src/util/scale/util/arithmetic.ts",
      "asOf": "2026-11-20"
    },
    "F234": {
      "label": "Project full_name, decimal.js-light",
      "display": "recharts/recharts",
      "asOf": "2026-11-20"
    },
    "F235": {
      "label": "Project stargazers_count, decimal.js-light",
      "display": "27.7K",
      "asOf": "2026-11-20"
    },
    "F236": {
      "label": "Library name, big.js",
      "display": "big.js",
      "asOf": "2026-11-20"
    },
    "F237": {
      "label": "Monthly downloads, big.js",
      "display": "167.8M",
      "asOf": "2026-11-20"
    },
    "F238": {
      "label": "License, big.js",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F239": {
      "label": "Package release, big.js",
      "display": "7.0.1",
      "asOf": "2026-11-20"
    },
    "F240": {
      "label": "Package release date, big.js",
      "display": "Apr 2025",
      "asOf": "2026-11-20"
    },
    "F241": {
      "label": "Install, big.js",
      "display": "npm install big.js",
      "asOf": "2026-11-20"
    },
    "F242": {
      "label": "Quickstart, big.js",
      "display": "import Big from 'big.js';\nconst value = new Big('0.1');\nconsole.log(value.plus('0.2').toString());\n",
      "asOf": "2026-11-20"
    },
    "F243": {
      "label": "Repository stars, big.js",
      "display": "5.2K",
      "asOf": "2026-11-20"
    },
    "F244": {
      "label": "Global decimal precision, big.js",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F245": {
      "label": "Exact rational type, big.js",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F246": {
      "label": "Expression evaluation, big.js",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F247": {
      "label": "Bitwise operations, big.js",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F248": {
      "label": "Runtime engine, big.js",
      "display": "{\"node\": \"*\"}",
      "asOf": "2026-11-20"
    },
    "F249": {
      "label": "Numeric model, big.js",
      "display": "Smaller decimal API with division-focused precision controls",
      "asOf": "2026-11-20"
    },
    "F250": {
      "label": "Project function, big.js",
      "display": "export default function convert(\n\tamount: number | string,\n\t{ from, to, base, rates, BigJs }: Options,\n): number {\n\tlet numericAmount: number;\n\tlet resolvedFrom = from;\n\tlet resolvedTo = to;\n\n\tif (typeof amount === 'string') {\n\t\tconst data = parse(amount);\n\n\t\tnumericAmount = data.amount;\n\t\tresolvedFrom = data.from ?? from;\n\t\tresolvedTo = data.to ?? to;\n\t} else {\n\t\tnumericAmount = amount;\n\t}\n\n\tif (Number.isNaN(numericAmount) || !Number.isFinite(numericAmount)) {\n\t\tthrow new TypeError('The `amount` must be a finite number.');\n\t}\n\n\tif (BigJs) {\n\t\treturn new BigJs(numericAmount)\n\t\t\t.times(getRate({ base, rates, from: resolvedFrom, to: resolvedTo }))\n\t\t\t.toNumber();\n\t}\n\n\treturn (\n\t\t(numericAmount *\n\t\t\t100 *\n\t\t\tgetRate({ base, rates, from: resolvedFrom, to: resolvedTo })) /\n\t\t100\n\t);\n}",
      "asOf": "2026-11-20"
    },
    "F251": {
      "label": "Project source file, big.js",
      "display": "src/convert.ts",
      "asOf": "2026-11-20"
    },
    "F252": {
      "label": "Project full_name, big.js",
      "display": "xxczaki/cashify",
      "asOf": "2026-11-20"
    },
    "F253": {
      "label": "Project stargazers_count, big.js",
      "display": "408",
      "asOf": "2026-11-20"
    },
    "F254": {
      "label": "Library name, mathjs",
      "display": "Math.js",
      "asOf": "2026-11-20"
    },
    "F255": {
      "label": "Monthly downloads, mathjs",
      "display": "21.3M",
      "asOf": "2026-11-20"
    },
    "F256": {
      "label": "License, mathjs",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F257": {
      "label": "Package release, mathjs",
      "display": "15.2.0",
      "asOf": "2026-11-20"
    },
    "F258": {
      "label": "Package release date, mathjs",
      "display": "Apr 2026",
      "asOf": "2026-11-20"
    },
    "F259": {
      "label": "Install, mathjs",
      "display": "npm install mathjs",
      "asOf": "2026-11-20"
    },
    "F260": {
      "label": "Quickstart, mathjs",
      "display": "import {create, all} from 'mathjs';\nconst math = create(all);\nconsole.log(math.evaluate('sqrt(3^2 + 4^2)'));\n",
      "asOf": "2026-11-20"
    },
    "F261": {
      "label": "Repository stars, mathjs",
      "display": "15.1K",
      "asOf": "2026-11-20"
    },
    "F262": {
      "label": "Global decimal precision, mathjs",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F263": {
      "label": "Exact rational type, mathjs",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F264": {
      "label": "Expression evaluation, mathjs",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F265": {
      "label": "Bitwise operations, mathjs",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F266": {
      "label": "Runtime engine, mathjs",
      "display": "{\"node\": \">= 18\"}",
      "asOf": "2026-11-20"
    },
    "F267": {
      "label": "Numeric model, mathjs",
      "display": "Expressions, numeric types, units, matrices, and complex values",
      "asOf": "2026-11-20"
    },
    "F268": {
      "label": "Precision dependencies, mathjs",
      "display": "Uses decimal.js, fraction.js, and complex.js",
      "asOf": "2026-11-20"
    },
    "F269": {
      "label": "Project function, mathjs",
      "display": "median(options?: { axis?: 0 | 1 }): Series {\n        const { axis } = { axis: 1, ...options }\n\n        if (this.$frameIsNotCompactibleForArithmeticOperation()) {\n            throw Error(\"TypeError: median operation is not supported for string dtypes\");\n        }\n\n        if ([0, 1].indexOf(axis) === -1) {\n            throw Error(\"ParamError: Axis must be 0 or 1\");\n        }\n\n        const newData = this.$getDataByAxisWithMissingValuesRemoved(axis)\n        const resultArr = newData.map(arr => median(arr))\n        if (axis === 0) {\n            return new Series(resultArr, { index: this.columns });\n        } else {\n            return new Series(resultArr, { index: this.index });\n        }\n\n    }",
      "asOf": "2026-11-20"
    },
    "F270": {
      "label": "Project source file, mathjs",
      "display": "src/danfojs-base/core/frame.ts",
      "asOf": "2026-11-20"
    },
    "F271": {
      "label": "Project full_name, mathjs",
      "display": "javascriptdata/danfojs",
      "asOf": "2026-11-20"
    },
    "F272": {
      "label": "Project stargazers_count, mathjs",
      "display": "5.1K",
      "asOf": "2026-11-20"
    }
  },
  "dataCheckedAt": "2026-11-20",
  "agent": {
    "exaCall": {
      "endpoint": "/search",
      "body": {
        "query": "Best JavaScript math libraries mathjs decimal.js big.js bignumber.js examples",
        "numResults": 5
      },
      "docsUrl": "https://exa.ai/docs/reference/search"
    },
    "calls": []
  }
}
