aboutsummaryrefslogtreecommitdiff
path: root/pseudocode/library/numeric_accuracy_helpers.tosac
diff options
context:
space:
mode:
Diffstat (limited to 'pseudocode/library/numeric_accuracy_helpers.tosac')
-rw-r--r--pseudocode/library/numeric_accuracy_helpers.tosac6
1 files changed, 6 insertions, 0 deletions
diff --git a/pseudocode/library/numeric_accuracy_helpers.tosac b/pseudocode/library/numeric_accuracy_helpers.tosac
index 4a2b111..b89d898 100644
--- a/pseudocode/library/numeric_accuracy_helpers.tosac
+++ b/pseudocode/library/numeric_accuracy_helpers.tosac
@@ -31,6 +31,8 @@ fp64_t normal_min<in_t>() {
case fp32_t: return exp2(-126);
case bf16_t: return exp2(-126);
case fp16_t: return exp2( -14);
+ case fp8e4m3_t: return exp2(-6);
+ case fp8e5m2_t: return exp2(-14);
}
}
@@ -39,6 +41,8 @@ fp64_t normal_max<in_t>() {
case fp32_t: return exp2(128) - exp2(127-23);
case bf16_t: return exp2(128) - exp2(127- 7);
case fp16_t: return exp2( 16) - exp2( 15-10);
+ case fp8e4m3_t: return exp2( 9) - exp2( 8-2);
+ case fp8e5m2_t: return exp2( 16) - exp2( 15-2);
}
}
@@ -48,5 +52,7 @@ int normal_frac<in_t> () {
case fp32_t: return 23;
case fp16_t: return 10;
case bf16_t: return 7;
+ case fp8e4m3_t: return 3;
+ case fp8e5m2_t: return 2;
}
}