---
title: "ClikaRT::dtype::float8_e8m0_t"
sidebar_label: "float8_e8m0_t"
description: "FP8 E8M0 block-scale: 8 exponent bits, 0 mantissa, no sign. Bias 127; pure powers of two from 2^-127 to 2^127, one NaN at 0xFF. Used as the per-block scale in MX block formats."
---

<!-- Generated by tools/doxygen2mdx from Doxygen XML. Do not edit. -->

<span class="api-kind api-kind--struct">struct</span>

**Header:** `ClikaRT/compute/scalar_types.h`

FP8 E8M0 block-scale: 8 exponent bits, 0 mantissa, no sign. Bias 127; pure powers of two from 2^-127 to 2^127, one NaN at 0xFF. Used as the per-block scale in MX block formats. Conversion from fp32 takes the biased exponent of `|f|`; magnitudes below 2^-126 saturate to the smallest scale. 8-bit storage.

## Static member functions

### from\_bits() {#from_bits}

<div class="api-signature">

`static` `constexpr` [`float8_e8m0_t`](./float8_e8m0_t.md) **`from_bits`**(`std::uint8_t` `b`) `noexcept`

</div>

Reinterpret a raw 8-bit encoding without converting.

<div class="api-declared">

Declared in `ClikaRT/compute/scalar_types.h`, line 249

</div>

## Member functions

### float8\_e8m0\_t() {#float8_e8m0_t}

<div class="api-signature">

`constexpr` `constexpr` **`float8_e8m0_t`**() `noexcept=default`

</div>

<div class="api-declared">

Declared in `ClikaRT/compute/scalar_types.h`, line 240

</div>

### float8\_e8m0\_t(float) {#float8_e8m0_t-2}

<div class="api-signature">

`explicit` **`float8_e8m0_t`**(`float` `f`) `noexcept`

</div>

Convert from fp32 (extract the biased exponent of the magnitude).

<div class="api-declared">

Declared in `ClikaRT/compute/scalar_types.h`, line 243

</div>

### operator float() {#operator-float}

<div class="api-signature">

**`operator float`**() `const noexcept`

</div>

Convert to fp32 (the power of two this scale encodes).

<div class="api-declared">

Declared in `ClikaRT/compute/scalar_types.h`, line 246

</div>

### is\_nan() {#is_nan}

<div class="api-signature">

`constexpr` `bool` **`is_nan`**() `const noexcept`

</div>

True at the format's single NaN (0xFF).

<div class="api-declared">

Declared in `ClikaRT/compute/scalar_types.h`, line 251

</div>

## Data members

### bits {#bits}

<div class="api-signature">

`std::uint8_t` **`bits`** `= 0`

</div>

Raw 8-bit encoding (the storage/ABI form).

<div class="api-declared">

Declared in `ClikaRT/compute/scalar_types.h`, line 238

</div>

## Friends

### operator== {#operator-eq}

<div class="api-signature">

`friend` `bool` **`operator==`**([`float8_e8m0_t`](./float8_e8m0_t.md) `a`, [`float8_e8m0_t`](./float8_e8m0_t.md) `b`) `noexcept`

</div>

Compares `a` and `b` by dequantized value (IEEE rules; a NaN operand compares false).

<div class="api-declared">

Declared in `ClikaRT/compute/scalar_types.h`, line 253

</div>

### operator\!= {#operator-ne}

<div class="api-signature">

`friend` `bool` **`operator!=`**([`float8_e8m0_t`](./float8_e8m0_t.md) `a`, [`float8_e8m0_t`](./float8_e8m0_t.md) `b`) `noexcept`

</div>

Compares `a` and `b` by dequantized value (IEEE rules; a NaN operand compares false).

<div class="api-declared">

Declared in `ClikaRT/compute/scalar_types.h`, line 254

</div>

### operator\< {#operator-lt}

<div class="api-signature">

`friend` `bool` **`operator<`**([`float8_e8m0_t`](./float8_e8m0_t.md) `a`, [`float8_e8m0_t`](./float8_e8m0_t.md) `b`) `noexcept`

</div>

Compares `a` and `b` by dequantized value (IEEE rules; a NaN operand compares false).

<div class="api-declared">

Declared in `ClikaRT/compute/scalar_types.h`, line 255

</div>

### operator\<= {#operator-le}

<div class="api-signature">

`friend` `bool` **`operator<=`**([`float8_e8m0_t`](./float8_e8m0_t.md) `a`, [`float8_e8m0_t`](./float8_e8m0_t.md) `b`) `noexcept`

</div>

Compares `a` and `b` by dequantized value (IEEE rules; a NaN operand compares false).

<div class="api-declared">

Declared in `ClikaRT/compute/scalar_types.h`, line 256

</div>

### operator\> {#operator-gt}

<div class="api-signature">

`friend` `bool` **`operator>`**([`float8_e8m0_t`](./float8_e8m0_t.md) `a`, [`float8_e8m0_t`](./float8_e8m0_t.md) `b`) `noexcept`

</div>

Compares `a` and `b` by dequantized value (IEEE rules; a NaN operand compares false).

<div class="api-declared">

Declared in `ClikaRT/compute/scalar_types.h`, line 257

</div>

### operator\>= {#operator-ge}

<div class="api-signature">

`friend` `bool` **`operator>=`**([`float8_e8m0_t`](./float8_e8m0_t.md) `a`, [`float8_e8m0_t`](./float8_e8m0_t.md) `b`) `noexcept`

</div>

Compares `a` and `b` by dequantized value (IEEE rules; a NaN operand compares false).

<div class="api-declared">

Declared in `ClikaRT/compute/scalar_types.h`, line 258

</div>
