---
title: "isF64(): function in Types, TypeShade API reference"
description: "isF64, a function in Types. Narrows a ShaderType to the emulated-double scalar arm (f64T)."
url: https://typeshade.dev/api/isf64/
language: en
---

# `isF64()`

Function in Types

Narrows a ShaderType to the emulated-double scalar arm (f64T).

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

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

## Syntax

```ts
const isF64: (t: ShaderType) => t is Extract<ShaderType, { kind: "f64"; }>
```

## Parameters

**`t` `ShaderType`**

## Return value

`t is Extract<ShaderType, { kind: 'f64' }>`

## Exceptions

**[`SD0004`](https://typeshade.dev/reference/errors/sd0004/)**

Mixing `f64` with an `i32`, `u32` or bool operand throws SD0004, since emulated double precision only widens from `f32` and number.

## Description

Arithmetic type resolution checks it first, before native scalar promotion, so an `f64` operand always wins the result type over a plain `f32` or number. Mixing `f64` with an `i32`, `u32` or `bool` operand throws [`SD0004`](https://typeshade.dev/reference/errors/sd0004/), since emulated double precision only widens from `f32` and number.

## Examples

### Example

```ts
import { isF64 } from 'typeshade'
import { f64T, f32T } from 'typeshade/core/ir'

isF64(f64T) // true
isF64(f32T) // false
```

## See also

- [`f64T`](https://typeshade.dev/api/f64t/)

## Source

[`src/core/ir/types/predicates.ts`, line 83](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/ir/types/predicates.ts#L83), at commit af54ddad5
