f64GuardOne()
Function in Builtins
The anti-fast-math guard value of the f64 emulation: a 1.0 the GPU compiler cannot see through, emitted per target as a texel fetch from the guard texture that fp64Guard declares.
import { f64GuardOne } from 'typeshade'
The signature, the description and the examples come from the compiler's own source at commit 26de7be8.
Syntax
const f64GuardOne: () => Node<"f32">Return value
Node<'f32'>
Description
The CPU evaluation returns exactly 1. The f64 emulation pass inserts it on its own; authoring code has no reason to call it.
Targets
| Target | Support | Notes |
|---|---|---|
| WGSL (WebGPU) | Supported |
|
| GLSL ES 3.00 (WebGL2) | Supported |
|
| CPU oracle | Supported | Evaluated in f64 by the oracle. |
Source
src/core/ir/node.ts, line 2185, at commit 26de7be8