toF64
On this page

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

x ReadonlyNode<'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

TargetSupportNotes
WGSL (WebGPU) Emulated

Rewritten by fp64Lower into a pair of f32 lanes before the backend runs.

GLSL ES 3.00 (WebGL2) Emulated

Rewritten by fp64Lower into a pair of f32 lanes before the backend runs.

CPU oracle Supported

Evaluated in f64 by the oracle.

Source

src/core/ir/node.ts, line 2109, at commit af54ddad5

Edit this page Report a problem