toF64()
Function in Builtins
Widen f32 to f64, exactly (the result is the pair (x, 0.0)).
import { toF64 } from 'typeshade/core/ir'
The signature, the description and the examples come from the compiler's own source at commit af54ddad5.
Syntax
const toF64: (x: ReadonlyNode<"f32"> | number) => Node<"f64">Parameters
xReadonlyNode<'f32'> | number
Return value
Node<'f64'>
Description
Widen f32 to f64, exactly (the result is the pair (x, 0.0)). This is the explicit form
of the widening the arithmetic methods apply on their own when an f32 meets an f64.
Targets
| Target | Support | Notes |
|---|---|---|
| WGSL (WebGPU) | Emulated | Rewritten by |
| GLSL ES 3.00 (WebGL2) | Emulated | Rewritten by |
| CPU oracle | Supported | Evaluated in |
Source
src/core/ir/node.ts, line 2109, at commit af54ddad5