f64FromParts
이 페이지에서

f64FromParts()

함수, 내장 함수 분류

Assemble an f64 from its (hi, lo) f32 halves, the shader-side counterpart of splitF64 for a value that arrives as two f32 components.

import { f64FromParts } from 'typeshade'

시그니처, 설명, 예제는 커밋 26de7be8의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.

구문

const f64FromParts: (
hi: ReadonlyNode<"f32"> | number,
lo: ReadonlyNode<"f32"> | number,
) => Node<"f64">

매개변수

hi ReadonlyNode<'f32'> | number
lo ReadonlyNode<'f32'> | number

반환값

Node<'f64'>

설명

Assemble an f64 from its (hi, lo) f32 halves, the shader-side counterpart of splitF64 for a value that arrives as two f32 components (a hi/lo vertex attribute pair, a packed buffer). It costs nothing: the result is the pair (hi, lo) itself. The halves must be a normalized split, lo = x − hi as splitF64 produces. Nothing renormalizes a pair that is not: the comparisons decide on hi first and can answer wrongly for it ((1, 1) is 2, yet it compares below (1.5, 0)), and a multiply or divide by a power-of-two literal scales the two words as they are, so the product is exactly as un-normalized as the operand.

대상별 지원

대상지원비고
WGSL (WebGPU) 에뮬레이션

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

GLSL ES 3.00 (WebGL2) 에뮬레이션

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

CPU 오라클 지원

Evaluated in f64 by the oracle.

관련 가이드

소스

src/core/ir/node.ts, 2389행, 커밋 26de7be8 기준

이 페이지 편집 문제 보고