sqrt2 — Positive square root of two.
The nearest binary64 representation of the positive square root of two (approximately 1.4142135623730951).
Syntax
value = sqrt2()Value and execution
Evaluating this bare constant produces a host scalar without arguments, allocation of array payloads, provider access, ambient services, or effects. Native and WASM consumers share the constant's static kind; runtime registration supplies its value. Constant lookup does not create a callable overload.
Example
Read the constant
value = sqrt2Using sqrt2 with coding agents
Open a RunMat example with live inputs, then ask the agent to explain how sqrt2 changes the result.
Run a small sqrt2 example, explain the result, then change one input and compare the output.
FAQ
Does this constant select GPU residency?⌄
No. It is a host scalar that may be consumed or transferred by ordinary numeric operations.
Related Constants functions
Source you can read
Every RunMat function's source is public. Read exactly how sqrt2 is executed, line by line, in Rust.
- View the source for sqrt2 in Rust on GitHub
- Learn how the RunMat runtime works
- Found a bug? Open an issue with a minimal reproduction.
About RunMat
RunMat is a runtime that executes MATLAB-syntax code fast on any GPU. The runtime is free for individuals, including freelancers; students and faculty at an academic institution, for teaching or research there; contributors to an open-source project, for work on that project; organizations with 250 or fewer people and US$10M or less in annual revenue; and anyone, for non-production use. See runmat.com/license.
- RunMat automatically optimizes your math for GPU execution on Apple, Nvidia, and AMD hardware. No code changes needed. Simulations that took hours now take minutes.
- Start running code in seconds. RunMat runs in the browser, on the desktop, or from the CLI. No license server, no IT ticket.