PageSourceSearch

https://mojolang.org/assets/js/5fb60790.d99d093d.js

js mojolang.org collected 2026-10-01 12:01:45 UTC 4,194 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkmodular_fe=self.webpackChunkmodular_fe||[]).push([["1635"],{34261(t,e,n){n.r(e),n.d(e,{metadata:()=>i,default:()=>m,frontMatter:()=>a,contentTitle:()=>c,toc:()=>r,assets:()=>d});var i=JSON.parse('{"id":"docs/std/math/index","title":"math","description":"Math functions and constants: trig, exponential, logarithmic, and special functions.","source":"@site/versioned_docs/version-1.0.0/docs/std/math/index.md","sourceDirName":"docs/std/math","slug":"/docs/std/math/","permalink":"/1.0.0/docs/std/math/","draft":false,"unlisted":false,"editUrl":"https://github.com/modular/modular/edit/main/Mojo/docs/site/std/math/index.md","tags":[],"version":"1.0.0","frontMatter":{"title":"math","version":"1.0.0.dev0","type":"package","lang":"mojo","description":"Math functions and constants: trig, exponential, logarithmic, and special functions."},"sidebar":"stdSidebar","previous":{"title":"Logger","permalink":"/1.0.0/docs/std/logger/logger/Logger"},"next":{"title":"constants","permalink":"/1.0.0/docs/std/math/constants/"}}'),s=n(74848),o=n(28453);let a={title:"math",version:"1.0.0.dev0",type:"package",lang:"mojo",description:"Math functions and constants: trig, exponential, logarithmic, and special functions."},c,d={},r=[{value:"Modules",id:"modules",level:2}];function l(t){let e={a:"a",code:"code",div:"div",h2:"h2",li:"li",p:"p",section:"section",ul:"ul",...(0,o.R)(),...t.components};return(0,s.jsxs)(e.section,{className:"mojo-docs",children:["\n",(0,s.jsxs)(e.div,{className:"mojo-module-detail",children:["\n",(0,s.jsx)(e.p,{children:"Math functions and constants: trig, exponential, logarithmic, and special functions."}),"\n",(0,s.jsxs)(e.p,{children:["The ",(0,s.jsx)(e.code,{children:"math"})," package provides mathematical functions and constants for numerical\ncomputation. It includes standard mathematical operations from trigonometry,\nexponential and logarithmic functions, special functions, and numerical\nutilities. This package implements both precise mathematical operations and fast\napproximations for performance-critical code, along with support for rounding,\nclamping, and IEEE 754 floating-point behavior."]}),"\n",(0,s.jsxs)(e.p,{children:["Use this package for scientific computing, numerical algorithms, graphics and\ngame development, statistical calculations, or any application requiring\nmathematical operations beyond basic arithmetic. The ",(0,s.jsx)(e.code,{children:"fast"})," module provides\noptimized approximations when absolute precision can be traded for performance."]}),"\n"]}),"\n",(0,s.jsx)(e.h2,{id:"modules",children:"Modules"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsxs)(e.a,{href:"../../../docs/std/math/constants/",children:["\u200B",(0,s.jsx)(e.code,{children:"constants"})]}),": Defines math utilities."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsxs)(e.a,{href:"../../../docs/std/math/fast/",children:["\u200B",(0,s.jsx)(e.code,{children:"fast"})]}),": Defines fast math approximation utilities."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsxs)(e.a,{href:"../../../docs/std/math/math/",children:["\u200B",(0,s.jsx)(e.code,{children:"math"})]}),": Defines math utilities."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsxs)(e.a,{href:"../../../docs/std/math/polynomial/",children:["\u200B",(0,s.jsx)(e.code,{children:"polynomial"})]}),": Provides two implementations for evaluating polynomials."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsxs)(e.a,{href:"../../../docs/std/math/uutils/",children:["\u200B",(0,s.jsx)(e.code,{children:"uutils"})]}),": Utilities for doing unsigned division and modulo operations on ",(0,s.jsx)(e.code,{children:"Int"}),"."]}),"\n"]}),"\n"]})}function m(t={}){let{wrapper:e}={...(0,o.R)(),...t.components};return e?(0,s.jsx)(e,{...t,children:(0,s.jsx)(l,{...t})}):l(t)}},28453(t,e,n){n.d(e,{R:()=>a,x:()=>c});var i=n(96540);let s={},o=i.createContext(s);function a(t){let e=i.useContext(o);return i.useMemo(function(){return"function"==typeof t?t(e):{...e,...t}},[e,t])}function c(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(s):t.components||s:a(t.components),i.createElement(o.Provider,{value:e},t.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.