---
title: "f64FromParts(): IR builder function in typeshade/core/ir"
description: "f64FromParts, an IR builder function in typeshade/core/ir. Assemble an f64 from its (hi, lo) f32 halves…"
url: https://typeshade.dev/api/f64fromparts/
language: en
---

# `f64FromParts()`

Function in Builtins

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/core/ir'`

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

## Syntax

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

## Parameters

**`hi` `ReadonlyNode<'f32'> | number`**

**`lo` `ReadonlyNode<'f32'> | number`**

## Return value

`Node<'f64'>`

## Description

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.

## Targets

| Target | Support | Notes |
| --- | --- | --- |
| 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 2118](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/ir/node.ts#L2118), at commit af54ddad5
