From 4cd48b91f1170498c1cf5d8ee5b87cda6cd797df Mon Sep 17 00:00:00 2001 From: Stephane Letz Date: Wed, 10 Mar 2021 21:23:52 +0100 Subject: [PATCH] Add fixedpointprecision definitions. --- maths.lib | 3 +++ quantizers.lib | 13 ++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/maths.lib b/maths.lib index 51673d1b..4d70f7b1 100644 --- a/maths.lib +++ b/maths.lib @@ -121,6 +121,7 @@ E = 2.71828182845904523536; singleprecision EPSILON = 1.192092896e-07; doubleprecision EPSILON = 2.2204460492503131e-016; quadprecision EPSILON = 2.2204460492503131e-016; +fixedpointprecision EPSILON = 2.2204460492503131e-016; //---------------------------------`(ma.)MIN`--------------------------------------- @@ -135,6 +136,7 @@ quadprecision EPSILON = 2.2204460492503131e-016; singleprecision MIN = 1.175494351e-38; doubleprecision MIN = 2.2250738585072014e-308; quadprecision MIN = 2.2250738585072014e-308; +fixedpointprecision MIN = 2.2250738585072014e-308; //---------------------------------`(ma.)INFINITY`------------------------------ @@ -149,6 +151,7 @@ quadprecision MIN = 2.2250738585072014e-308; singleprecision INFINITY = 3.402823466e+38; doubleprecision INFINITY = 1.7976931348623158e+308; quadprecision INFINITY = 1.7976931348623158e+308; +fixedpointprecision INFINITY = 1.7976931348623158e+308; //---------------------------------`(ma.)FTZ`--------------------------------------- diff --git a/quantizers.lib b/quantizers.lib index 1139a6e5..40033b52 100644 --- a/quantizers.lib +++ b/quantizers.lib @@ -103,13 +103,12 @@ with{ noteRatio(n,oct) = _ <: (ba.take(n,nl)<=((_/oct)/rf))*findValue(n,oct)+ (ba.take(n,nl)>((_/oct)/rf))*(noteRatio(n-1,oct)); - findValue(n,oct) = _<: (n