Skip to content

Commit

Permalink
Check floats compliance with IEEE 754
Browse files Browse the repository at this point in the history
chfast committed Aug 7, 2020
1 parent 366aacf commit 47ae701
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/fizzy/value.hpp
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@
#pragma once

#include <cstdint>
#include <limits>

namespace fizzy
{
@@ -14,6 +15,9 @@ union Value
float f32;
double f64;

static_assert(std::numeric_limits<decltype(f32)>::is_iec559);
static_assert(std::numeric_limits<decltype(f64)>::is_iec559);

Value() = default;

/// Converting constructors from integer types

0 comments on commit 47ae701

Please sign in to comment.