CpuPrecision
이 페이지에서

CpuPrecision

타입, CPU 오라클 분류

How the CPU backends evaluate f32 arithmetic.

import type { CpuPrecision } from 'typeshade'

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

구문

type CpuPrecision = 'f64' | 'f32';

설명

  • 'f64' (default): every value is a JavaScript double, so the result is the mathematically intended one to 53 bits. This is the reference an implementation is checked against.
  • 'f32': a correctly rounding f32 machine over the same IR the GPU receives. Every f32-typed operation rounds to f32 after it is evaluated, with ±Infinity on overflow. Use it when the question is what the target computes, so a parity gate can compare at ulp scale without a tolerance wide enough to hide a real error.

함께 보기

소스

src/core/oracle.ts, 740행, 커밋 c66579bf 기준

이 페이지 편집 문제 보고