---
title: "bitcastU32(): IR builder function in typeshade/core/ir"
description: "bitcastU32, an IR builder function in typeshade/core/ir. Reinterpret the bit pattern of an f32 as a u32."
url: https://typeshade.dev/api/bitcastu32/
language: en
---

# `bitcastU32()`

Function in Builtins

Reinterpret the bit pattern of an `f32` as a `u32`.

`import { bitcastU32 } from 'typeshade/core/ir'`

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

## Syntax

```ts
const bitcastU32: (v: ReadonlyNode<"f32">) => Node<"u32">
```

## Parameters

**`v` `ReadonlyNode<'f32'>`**

## Return value

`Node<'u32'>`

## Description

Emitted as `bitcast<u32>(x)` on WGSL and `floatBitsToUint(x)` on GLSL.

## Targets

| Target | Support | Notes |
| --- | --- | --- |
| WGSL (WebGPU) | Supported | `bitcast<u32>(v)`. |
| GLSL ES 3.00 (WebGL2) | Supported | `floatBitsToUint(v)`. |
| CPU oracle | Supported | Evaluated in `f64` by the oracle. |

## Source

[`src/core/ir/node.ts`, line 1681](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/ir/node.ts#L1681), at commit af54ddad5
