---
title: "Emulated f64, a category in the TypeShade API reference"
description: "Emulated f64 in the TypeShade API reference. Double precision on targets that have none, carried in pairs of f32 lanes."
url: https://typeshade.dev/api/emulated-f64/
language: en
---

# Emulated `f64`

10 members

Double precision on targets that have none, carried in pairs of `f32` lanes.

The signature, the description and the examples come from the compiler's own source at commit af54ddad5.

**[`FP64_GUARD_NAME`](https://typeshade.dev/api/fp64guardname/) Constant**

The fixed name ('\_fp64') of the guard texture binding that fp64Lower adds to every module whose lowered code calls a guarded df64 helper.

**[`Fp64Flavor`](https://typeshade.dev/api/fp64flavor/) Type**

Which arithmetic primitives back the emulated-double (df64) helper functions that fp64Lower injects.

**[`Fp64FlavorSignals`](https://typeshade.dev/api/fp64flavorsignals/) Interface**

The device-identification signals recommendFp64Flavor and isAppleGpu read to pick the df64 flavour a device needs: 'integer' on Apple GPUs, where Metal runs underneath, and 'float' everywhere else.

**[`fp64Guard`](https://typeshade.dev/api/fp64guard/) Function**

Pin the slot of the fp64 guard texture.

**[`Fp64GuardHandle`](https://typeshade.dev/api/fp64guardhandle/) Interface**

The value fp64Guard returns: a binding declaration for the \_fp64 guard texture, pinned to the caller's chosen.

**[`fp64Lower`](https://typeshade.dev/api/fp64lower/) Function**

Rewrite every `f64` value in a module into its two-f32 emulation, so that no backend has to spell the type.

**[`Fp64LowerOptions`](https://typeshade.dev/api/fp64loweroptions/) Interface**

Options for fp64Lower.

**[`isAppleGpu`](https://typeshade.dev/api/isapplegpu/) Function**

True when any signal identifies an Apple GPU / Metal-backed context.

**[`recommendFp64Flavor`](https://typeshade.dev/api/recommendfp64flavor/) Function**

Pick the df64 flavour a device needs for correct results, from whatever identifying signals a host has.

**[`splitF64`](https://typeshade.dev/api/splitf64/) Function**

Split a JavaScript double into the high and low `f32` pair an f64T value carries on the GPU.
