
(FPCore (x y z t a b) :precision binary64 (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
def code(x, y, z, t, a, b): return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 24 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
def code(x, y, z, t, a, b): return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+ (* b (- (+ t y) 2.0)) (- (- x (* z (- y 1.0))) (* a (- t 1.0))))))
(if (<= t_1 INFINITY) t_1 (fma (- b z) y (fma (- t 2.0) b (+ z x))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b * ((t + y) - 2.0)) + ((x - (z * (y - 1.0))) - (a * (t - 1.0)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = fma((b - z), y, fma((t - 2.0), b, (z + x)));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b * Float64(Float64(t + y) - 2.0)) + Float64(Float64(x - Float64(z * Float64(y - 1.0))) - Float64(a * Float64(t - 1.0)))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = fma(Float64(b - z), y, fma(Float64(t - 2.0), b, Float64(z + x))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x - N[(z * N[(y - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[(b - z), $MachinePrecision] * y + N[(N[(t - 2.0), $MachinePrecision] * b + N[(z + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(t + y\right) - 2\right) + \left(\left(x - z \cdot \left(y - 1\right)\right) - a \cdot \left(t - 1\right)\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b - z, y, \mathsf{fma}\left(t - 2, b, z + x\right)\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < +inf.0Initial program 100.0%
if +inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) Initial program 0.0%
Taylor expanded in a around 0
Applied rewrites81.3%
Final simplification98.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -1.05e+111)
(* (- a) t)
(if (<= t -0.000108)
(* (- t 2.0) b)
(if (<= t 1.1e-193)
(+ a x)
(if (<= t 7.2e-17)
(* (- y 2.0) b)
(if (<= t 1.95e+80) (+ z x) (* b t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.05e+111) {
tmp = -a * t;
} else if (t <= -0.000108) {
tmp = (t - 2.0) * b;
} else if (t <= 1.1e-193) {
tmp = a + x;
} else if (t <= 7.2e-17) {
tmp = (y - 2.0) * b;
} else if (t <= 1.95e+80) {
tmp = z + x;
} else {
tmp = b * t;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-1.05d+111)) then
tmp = -a * t
else if (t <= (-0.000108d0)) then
tmp = (t - 2.0d0) * b
else if (t <= 1.1d-193) then
tmp = a + x
else if (t <= 7.2d-17) then
tmp = (y - 2.0d0) * b
else if (t <= 1.95d+80) then
tmp = z + x
else
tmp = b * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.05e+111) {
tmp = -a * t;
} else if (t <= -0.000108) {
tmp = (t - 2.0) * b;
} else if (t <= 1.1e-193) {
tmp = a + x;
} else if (t <= 7.2e-17) {
tmp = (y - 2.0) * b;
} else if (t <= 1.95e+80) {
tmp = z + x;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.05e+111: tmp = -a * t elif t <= -0.000108: tmp = (t - 2.0) * b elif t <= 1.1e-193: tmp = a + x elif t <= 7.2e-17: tmp = (y - 2.0) * b elif t <= 1.95e+80: tmp = z + x else: tmp = b * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.05e+111) tmp = Float64(Float64(-a) * t); elseif (t <= -0.000108) tmp = Float64(Float64(t - 2.0) * b); elseif (t <= 1.1e-193) tmp = Float64(a + x); elseif (t <= 7.2e-17) tmp = Float64(Float64(y - 2.0) * b); elseif (t <= 1.95e+80) tmp = Float64(z + x); else tmp = Float64(b * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.05e+111) tmp = -a * t; elseif (t <= -0.000108) tmp = (t - 2.0) * b; elseif (t <= 1.1e-193) tmp = a + x; elseif (t <= 7.2e-17) tmp = (y - 2.0) * b; elseif (t <= 1.95e+80) tmp = z + x; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.05e+111], N[((-a) * t), $MachinePrecision], If[LessEqual[t, -0.000108], N[(N[(t - 2.0), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[t, 1.1e-193], N[(a + x), $MachinePrecision], If[LessEqual[t, 7.2e-17], N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[t, 1.95e+80], N[(z + x), $MachinePrecision], N[(b * t), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{+111}:\\
\;\;\;\;\left(-a\right) \cdot t\\
\mathbf{elif}\;t \leq -0.000108:\\
\;\;\;\;\left(t - 2\right) \cdot b\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{-193}:\\
\;\;\;\;a + x\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{-17}:\\
\;\;\;\;\left(y - 2\right) \cdot b\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{+80}:\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if t < -1.04999999999999997e111Initial program 89.4%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6480.2
Applied rewrites80.2%
Taylor expanded in b around 0
Applied rewrites63.7%
if -1.04999999999999997e111 < t < -1.08e-4Initial program 96.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6446.7
Applied rewrites46.7%
Taylor expanded in y around 0
Applied rewrites37.1%
if -1.08e-4 < t < 1.09999999999999988e-193Initial program 97.1%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6469.1
Applied rewrites69.1%
Taylor expanded in t around 0
Applied rewrites69.1%
Taylor expanded in b around 0
Applied rewrites46.9%
if 1.09999999999999988e-193 < t < 7.1999999999999999e-17Initial program 97.4%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6450.3
Applied rewrites50.3%
Taylor expanded in t around 0
Applied rewrites50.3%
if 7.1999999999999999e-17 < t < 1.94999999999999999e80Initial program 95.5%
Taylor expanded in a around 0
Applied rewrites78.3%
Taylor expanded in b around 0
Applied rewrites56.7%
Taylor expanded in y around 0
Applied rewrites38.8%
if 1.94999999999999999e80 < t Initial program 87.7%
Taylor expanded in a around 0
Applied rewrites73.1%
Taylor expanded in t around inf
Applied rewrites45.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- 1.0 y) z x)) (t_2 (* (- b a) t)))
(if (<= t -4.9e+35)
t_2
(if (<= t 8.4e-234)
t_1
(if (<= t 2.45e-12)
(fma (- y 2.0) b a)
(if (<= t 2.75e+40) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((1.0 - y), z, x);
double t_2 = (b - a) * t;
double tmp;
if (t <= -4.9e+35) {
tmp = t_2;
} else if (t <= 8.4e-234) {
tmp = t_1;
} else if (t <= 2.45e-12) {
tmp = fma((y - 2.0), b, a);
} else if (t <= 2.75e+40) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(1.0 - y), z, x) t_2 = Float64(Float64(b - a) * t) tmp = 0.0 if (t <= -4.9e+35) tmp = t_2; elseif (t <= 8.4e-234) tmp = t_1; elseif (t <= 2.45e-12) tmp = fma(Float64(y - 2.0), b, a); elseif (t <= 2.75e+40) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -4.9e+35], t$95$2, If[LessEqual[t, 8.4e-234], t$95$1, If[LessEqual[t, 2.45e-12], N[(N[(y - 2.0), $MachinePrecision] * b + a), $MachinePrecision], If[LessEqual[t, 2.75e+40], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(1 - y, z, x\right)\\
t_2 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -4.9 \cdot 10^{+35}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 8.4 \cdot 10^{-234}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.45 \cdot 10^{-12}:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, a\right)\\
\mathbf{elif}\;t \leq 2.75 \cdot 10^{+40}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -4.90000000000000025e35 or 2.74999999999999987e40 < t Initial program 91.1%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6472.4
Applied rewrites72.4%
if -4.90000000000000025e35 < t < 8.39999999999999965e-234 or 2.44999999999999986e-12 < t < 2.74999999999999987e40Initial program 95.5%
Taylor expanded in a around 0
Applied rewrites78.6%
Taylor expanded in b around 0
Applied rewrites58.8%
if 8.39999999999999965e-234 < t < 2.44999999999999986e-12Initial program 97.6%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6477.3
Applied rewrites77.3%
Taylor expanded in t around 0
Applied rewrites77.3%
Taylor expanded in x around 0
Applied rewrites66.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)))
(if (<= t -17000.0)
t_1
(if (<= t -3.6e-166)
(fma (- 1.0 t) a x)
(if (<= t 3e-26)
(fma (- y 2.0) b a)
(if (<= t 2.4e+40) (fma (- y 2.0) b x) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - a) * t;
double tmp;
if (t <= -17000.0) {
tmp = t_1;
} else if (t <= -3.6e-166) {
tmp = fma((1.0 - t), a, x);
} else if (t <= 3e-26) {
tmp = fma((y - 2.0), b, a);
} else if (t <= 2.4e+40) {
tmp = fma((y - 2.0), b, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - a) * t) tmp = 0.0 if (t <= -17000.0) tmp = t_1; elseif (t <= -3.6e-166) tmp = fma(Float64(1.0 - t), a, x); elseif (t <= 3e-26) tmp = fma(Float64(y - 2.0), b, a); elseif (t <= 2.4e+40) tmp = fma(Float64(y - 2.0), b, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -17000.0], t$95$1, If[LessEqual[t, -3.6e-166], N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision], If[LessEqual[t, 3e-26], N[(N[(y - 2.0), $MachinePrecision] * b + a), $MachinePrecision], If[LessEqual[t, 2.4e+40], N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -17000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -3.6 \cdot 10^{-166}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, x\right)\\
\mathbf{elif}\;t \leq 3 \cdot 10^{-26}:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, a\right)\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{+40}:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -17000 or 2.4e40 < t Initial program 90.8%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6469.9
Applied rewrites69.9%
if -17000 < t < -3.6000000000000001e-166Initial program 100.0%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6475.9
Applied rewrites75.9%
Taylor expanded in b around 0
Applied rewrites56.2%
if -3.6000000000000001e-166 < t < 3.00000000000000012e-26Initial program 96.1%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6470.2
Applied rewrites70.2%
Taylor expanded in t around 0
Applied rewrites70.2%
Taylor expanded in x around 0
Applied rewrites57.6%
if 3.00000000000000012e-26 < t < 2.4e40Initial program 94.1%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6476.6
Applied rewrites76.6%
Taylor expanded in t around 0
Applied rewrites68.3%
Taylor expanded in a around 0
Applied rewrites65.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -7.8e+96)
(fma (- 1.0 y) z (fma (- 1.0 t) a x))
(if (<= z 1.15e+77)
(fma (- 1.0 t) a (fma (- (+ t y) 2.0) b x))
(fma (- b z) y (fma (- t 2.0) b (+ z x))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -7.8e+96) {
tmp = fma((1.0 - y), z, fma((1.0 - t), a, x));
} else if (z <= 1.15e+77) {
tmp = fma((1.0 - t), a, fma(((t + y) - 2.0), b, x));
} else {
tmp = fma((b - z), y, fma((t - 2.0), b, (z + x)));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -7.8e+96) tmp = fma(Float64(1.0 - y), z, fma(Float64(1.0 - t), a, x)); elseif (z <= 1.15e+77) tmp = fma(Float64(1.0 - t), a, fma(Float64(Float64(t + y) - 2.0), b, x)); else tmp = fma(Float64(b - z), y, fma(Float64(t - 2.0), b, Float64(z + x))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -7.8e+96], N[(N[(1.0 - y), $MachinePrecision] * z + N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.15e+77], N[(N[(1.0 - t), $MachinePrecision] * a + N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision]), $MachinePrecision], N[(N[(b - z), $MachinePrecision] * y + N[(N[(t - 2.0), $MachinePrecision] * b + N[(z + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.8 \cdot 10^{+96}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(1 - t, a, x\right)\right)\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{+77}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b - z, y, \mathsf{fma}\left(t - 2, b, z + x\right)\right)\\
\end{array}
\end{array}
if z < -7.8e96Initial program 88.6%
Taylor expanded in b around 0
+-commutativeN/A
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites86.9%
if -7.8e96 < z < 1.14999999999999997e77Initial program 97.5%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6493.3
Applied rewrites93.3%
if 1.14999999999999997e77 < z Initial program 85.1%
Taylor expanded in a around 0
Applied rewrites89.8%
Final simplification91.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- 1.0 t) a (fma (- (+ t y) 2.0) b x))))
(if (<= b -1.12e+36)
t_1
(if (<= b 1.22e+91) (fma (- 1.0 y) z (fma (- 1.0 t) a x)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((1.0 - t), a, fma(((t + y) - 2.0), b, x));
double tmp;
if (b <= -1.12e+36) {
tmp = t_1;
} else if (b <= 1.22e+91) {
tmp = fma((1.0 - y), z, fma((1.0 - t), a, x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(1.0 - t), a, fma(Float64(Float64(t + y) - 2.0), b, x)) tmp = 0.0 if (b <= -1.12e+36) tmp = t_1; elseif (b <= 1.22e+91) tmp = fma(Float64(1.0 - y), z, fma(Float64(1.0 - t), a, x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - t), $MachinePrecision] * a + N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.12e+36], t$95$1, If[LessEqual[b, 1.22e+91], N[(N[(1.0 - y), $MachinePrecision] * z + N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\right)\\
\mathbf{if}\;b \leq -1.12 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.22 \cdot 10^{+91}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(1 - t, a, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.11999999999999999e36 or 1.2199999999999999e91 < b Initial program 86.1%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6491.8
Applied rewrites91.8%
if -1.11999999999999999e36 < b < 1.2199999999999999e91Initial program 99.3%
Taylor expanded in b around 0
+-commutativeN/A
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites90.3%
Final simplification90.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)))
(if (<= t -3.4e+34)
t_1
(if (<= t -1.75e-17)
(* (- 1.0 y) z)
(if (<= t 1.1e-193) (+ a x) (if (<= t 2.75e+40) (* (- b z) y) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - a) * t;
double tmp;
if (t <= -3.4e+34) {
tmp = t_1;
} else if (t <= -1.75e-17) {
tmp = (1.0 - y) * z;
} else if (t <= 1.1e-193) {
tmp = a + x;
} else if (t <= 2.75e+40) {
tmp = (b - z) * y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (b - a) * t
if (t <= (-3.4d+34)) then
tmp = t_1
else if (t <= (-1.75d-17)) then
tmp = (1.0d0 - y) * z
else if (t <= 1.1d-193) then
tmp = a + x
else if (t <= 2.75d+40) then
tmp = (b - z) * y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - a) * t;
double tmp;
if (t <= -3.4e+34) {
tmp = t_1;
} else if (t <= -1.75e-17) {
tmp = (1.0 - y) * z;
} else if (t <= 1.1e-193) {
tmp = a + x;
} else if (t <= 2.75e+40) {
tmp = (b - z) * y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (b - a) * t tmp = 0 if t <= -3.4e+34: tmp = t_1 elif t <= -1.75e-17: tmp = (1.0 - y) * z elif t <= 1.1e-193: tmp = a + x elif t <= 2.75e+40: tmp = (b - z) * y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - a) * t) tmp = 0.0 if (t <= -3.4e+34) tmp = t_1; elseif (t <= -1.75e-17) tmp = Float64(Float64(1.0 - y) * z); elseif (t <= 1.1e-193) tmp = Float64(a + x); elseif (t <= 2.75e+40) tmp = Float64(Float64(b - z) * y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (b - a) * t; tmp = 0.0; if (t <= -3.4e+34) tmp = t_1; elseif (t <= -1.75e-17) tmp = (1.0 - y) * z; elseif (t <= 1.1e-193) tmp = a + x; elseif (t <= 2.75e+40) tmp = (b - z) * y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -3.4e+34], t$95$1, If[LessEqual[t, -1.75e-17], N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t, 1.1e-193], N[(a + x), $MachinePrecision], If[LessEqual[t, 2.75e+40], N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -3.4 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.75 \cdot 10^{-17}:\\
\;\;\;\;\left(1 - y\right) \cdot z\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{-193}:\\
\;\;\;\;a + x\\
\mathbf{elif}\;t \leq 2.75 \cdot 10^{+40}:\\
\;\;\;\;\left(b - z\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.3999999999999999e34 or 2.74999999999999987e40 < t Initial program 91.1%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6472.4
Applied rewrites72.4%
if -3.3999999999999999e34 < t < -1.7500000000000001e-17Initial program 90.0%
Taylor expanded in z around inf
*-commutativeN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
+-commutativeN/A
metadata-evalN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f6461.0
Applied rewrites61.0%
if -1.7500000000000001e-17 < t < 1.09999999999999988e-193Initial program 97.1%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6469.8
Applied rewrites69.8%
Taylor expanded in t around 0
Applied rewrites69.8%
Taylor expanded in b around 0
Applied rewrites47.6%
if 1.09999999999999988e-193 < t < 2.74999999999999987e40Initial program 96.1%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6447.8
Applied rewrites47.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)))
(if (<= t -3.4e+34)
t_1
(if (<= t -1.75e-17)
(* (- 1.0 y) z)
(if (<= t 1.1e-193) (+ a x) (if (<= t 2.4e+40) (* (- y 2.0) b) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - a) * t;
double tmp;
if (t <= -3.4e+34) {
tmp = t_1;
} else if (t <= -1.75e-17) {
tmp = (1.0 - y) * z;
} else if (t <= 1.1e-193) {
tmp = a + x;
} else if (t <= 2.4e+40) {
tmp = (y - 2.0) * b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (b - a) * t
if (t <= (-3.4d+34)) then
tmp = t_1
else if (t <= (-1.75d-17)) then
tmp = (1.0d0 - y) * z
else if (t <= 1.1d-193) then
tmp = a + x
else if (t <= 2.4d+40) then
tmp = (y - 2.0d0) * b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - a) * t;
double tmp;
if (t <= -3.4e+34) {
tmp = t_1;
} else if (t <= -1.75e-17) {
tmp = (1.0 - y) * z;
} else if (t <= 1.1e-193) {
tmp = a + x;
} else if (t <= 2.4e+40) {
tmp = (y - 2.0) * b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (b - a) * t tmp = 0 if t <= -3.4e+34: tmp = t_1 elif t <= -1.75e-17: tmp = (1.0 - y) * z elif t <= 1.1e-193: tmp = a + x elif t <= 2.4e+40: tmp = (y - 2.0) * b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - a) * t) tmp = 0.0 if (t <= -3.4e+34) tmp = t_1; elseif (t <= -1.75e-17) tmp = Float64(Float64(1.0 - y) * z); elseif (t <= 1.1e-193) tmp = Float64(a + x); elseif (t <= 2.4e+40) tmp = Float64(Float64(y - 2.0) * b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (b - a) * t; tmp = 0.0; if (t <= -3.4e+34) tmp = t_1; elseif (t <= -1.75e-17) tmp = (1.0 - y) * z; elseif (t <= 1.1e-193) tmp = a + x; elseif (t <= 2.4e+40) tmp = (y - 2.0) * b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -3.4e+34], t$95$1, If[LessEqual[t, -1.75e-17], N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t, 1.1e-193], N[(a + x), $MachinePrecision], If[LessEqual[t, 2.4e+40], N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -3.4 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.75 \cdot 10^{-17}:\\
\;\;\;\;\left(1 - y\right) \cdot z\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{-193}:\\
\;\;\;\;a + x\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{+40}:\\
\;\;\;\;\left(y - 2\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.3999999999999999e34 or 2.4e40 < t Initial program 91.1%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6472.4
Applied rewrites72.4%
if -3.3999999999999999e34 < t < -1.7500000000000001e-17Initial program 90.0%
Taylor expanded in z around inf
*-commutativeN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
+-commutativeN/A
metadata-evalN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f6461.0
Applied rewrites61.0%
if -1.7500000000000001e-17 < t < 1.09999999999999988e-193Initial program 97.1%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6469.8
Applied rewrites69.8%
Taylor expanded in t around 0
Applied rewrites69.8%
Taylor expanded in b around 0
Applied rewrites47.6%
if 1.09999999999999988e-193 < t < 2.4e40Initial program 96.1%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6444.4
Applied rewrites44.4%
Taylor expanded in t around 0
Applied rewrites43.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- t 2.0) b)))
(if (<= b -6.6e+201)
t_1
(if (<= b -1.4e+34)
(* (- y 2.0) b)
(if (<= b 4.2e-90)
(* (- 1.0 t) a)
(if (<= b 1.35e+96) (* (- 1.0 y) z) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - 2.0) * b;
double tmp;
if (b <= -6.6e+201) {
tmp = t_1;
} else if (b <= -1.4e+34) {
tmp = (y - 2.0) * b;
} else if (b <= 4.2e-90) {
tmp = (1.0 - t) * a;
} else if (b <= 1.35e+96) {
tmp = (1.0 - y) * z;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - 2.0d0) * b
if (b <= (-6.6d+201)) then
tmp = t_1
else if (b <= (-1.4d+34)) then
tmp = (y - 2.0d0) * b
else if (b <= 4.2d-90) then
tmp = (1.0d0 - t) * a
else if (b <= 1.35d+96) then
tmp = (1.0d0 - y) * z
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - 2.0) * b;
double tmp;
if (b <= -6.6e+201) {
tmp = t_1;
} else if (b <= -1.4e+34) {
tmp = (y - 2.0) * b;
} else if (b <= 4.2e-90) {
tmp = (1.0 - t) * a;
} else if (b <= 1.35e+96) {
tmp = (1.0 - y) * z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - 2.0) * b tmp = 0 if b <= -6.6e+201: tmp = t_1 elif b <= -1.4e+34: tmp = (y - 2.0) * b elif b <= 4.2e-90: tmp = (1.0 - t) * a elif b <= 1.35e+96: tmp = (1.0 - y) * z else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - 2.0) * b) tmp = 0.0 if (b <= -6.6e+201) tmp = t_1; elseif (b <= -1.4e+34) tmp = Float64(Float64(y - 2.0) * b); elseif (b <= 4.2e-90) tmp = Float64(Float64(1.0 - t) * a); elseif (b <= 1.35e+96) tmp = Float64(Float64(1.0 - y) * z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - 2.0) * b; tmp = 0.0; if (b <= -6.6e+201) tmp = t_1; elseif (b <= -1.4e+34) tmp = (y - 2.0) * b; elseif (b <= 4.2e-90) tmp = (1.0 - t) * a; elseif (b <= 1.35e+96) tmp = (1.0 - y) * z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - 2.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -6.6e+201], t$95$1, If[LessEqual[b, -1.4e+34], N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[b, 4.2e-90], N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[b, 1.35e+96], N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t - 2\right) \cdot b\\
\mathbf{if}\;b \leq -6.6 \cdot 10^{+201}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -1.4 \cdot 10^{+34}:\\
\;\;\;\;\left(y - 2\right) \cdot b\\
\mathbf{elif}\;b \leq 4.2 \cdot 10^{-90}:\\
\;\;\;\;\left(1 - t\right) \cdot a\\
\mathbf{elif}\;b \leq 1.35 \cdot 10^{+96}:\\
\;\;\;\;\left(1 - y\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -6.6e201 or 1.35000000000000011e96 < b Initial program 78.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6477.7
Applied rewrites77.7%
Taylor expanded in y around 0
Applied rewrites60.1%
if -6.6e201 < b < -1.40000000000000004e34Initial program 97.6%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6462.1
Applied rewrites62.1%
Taylor expanded in t around 0
Applied rewrites49.1%
if -1.40000000000000004e34 < b < 4.1999999999999998e-90Initial program 100.0%
Taylor expanded in a around inf
*-commutativeN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
+-commutativeN/A
metadata-evalN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f6449.3
Applied rewrites49.3%
if 4.1999999999999998e-90 < b < 1.35000000000000011e96Initial program 97.5%
Taylor expanded in z around inf
*-commutativeN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
+-commutativeN/A
metadata-evalN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f6448.3
Applied rewrites48.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- t 2.0) b)))
(if (<= b -6.6e+201)
t_1
(if (<= b -1.4e+34)
(* (- y 2.0) b)
(if (<= b 1.6e-79) (* (- 1.0 t) a) (if (<= b 1.7e+94) (+ z x) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - 2.0) * b;
double tmp;
if (b <= -6.6e+201) {
tmp = t_1;
} else if (b <= -1.4e+34) {
tmp = (y - 2.0) * b;
} else if (b <= 1.6e-79) {
tmp = (1.0 - t) * a;
} else if (b <= 1.7e+94) {
tmp = z + x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - 2.0d0) * b
if (b <= (-6.6d+201)) then
tmp = t_1
else if (b <= (-1.4d+34)) then
tmp = (y - 2.0d0) * b
else if (b <= 1.6d-79) then
tmp = (1.0d0 - t) * a
else if (b <= 1.7d+94) then
tmp = z + x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - 2.0) * b;
double tmp;
if (b <= -6.6e+201) {
tmp = t_1;
} else if (b <= -1.4e+34) {
tmp = (y - 2.0) * b;
} else if (b <= 1.6e-79) {
tmp = (1.0 - t) * a;
} else if (b <= 1.7e+94) {
tmp = z + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - 2.0) * b tmp = 0 if b <= -6.6e+201: tmp = t_1 elif b <= -1.4e+34: tmp = (y - 2.0) * b elif b <= 1.6e-79: tmp = (1.0 - t) * a elif b <= 1.7e+94: tmp = z + x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - 2.0) * b) tmp = 0.0 if (b <= -6.6e+201) tmp = t_1; elseif (b <= -1.4e+34) tmp = Float64(Float64(y - 2.0) * b); elseif (b <= 1.6e-79) tmp = Float64(Float64(1.0 - t) * a); elseif (b <= 1.7e+94) tmp = Float64(z + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - 2.0) * b; tmp = 0.0; if (b <= -6.6e+201) tmp = t_1; elseif (b <= -1.4e+34) tmp = (y - 2.0) * b; elseif (b <= 1.6e-79) tmp = (1.0 - t) * a; elseif (b <= 1.7e+94) tmp = z + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - 2.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -6.6e+201], t$95$1, If[LessEqual[b, -1.4e+34], N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[b, 1.6e-79], N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[b, 1.7e+94], N[(z + x), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t - 2\right) \cdot b\\
\mathbf{if}\;b \leq -6.6 \cdot 10^{+201}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -1.4 \cdot 10^{+34}:\\
\;\;\;\;\left(y - 2\right) \cdot b\\
\mathbf{elif}\;b \leq 1.6 \cdot 10^{-79}:\\
\;\;\;\;\left(1 - t\right) \cdot a\\
\mathbf{elif}\;b \leq 1.7 \cdot 10^{+94}:\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -6.6e201 or 1.7000000000000001e94 < b Initial program 78.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6477.7
Applied rewrites77.7%
Taylor expanded in y around 0
Applied rewrites60.1%
if -6.6e201 < b < -1.40000000000000004e34Initial program 97.6%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6462.1
Applied rewrites62.1%
Taylor expanded in t around 0
Applied rewrites49.1%
if -1.40000000000000004e34 < b < 1.59999999999999994e-79Initial program 100.0%
Taylor expanded in a around inf
*-commutativeN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
+-commutativeN/A
metadata-evalN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f6448.5
Applied rewrites48.5%
if 1.59999999999999994e-79 < b < 1.7000000000000001e94Initial program 97.3%
Taylor expanded in a around 0
Applied rewrites73.7%
Taylor expanded in b around 0
Applied rewrites58.3%
Taylor expanded in y around 0
Applied rewrites39.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- y) z)))
(if (<= y -1.75e+155)
t_1
(if (<= y -4e-12)
(* b t)
(if (<= y 1.75e+44) (+ z x) (if (<= y 4.1e+157) t_1 (* b y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -y * z;
double tmp;
if (y <= -1.75e+155) {
tmp = t_1;
} else if (y <= -4e-12) {
tmp = b * t;
} else if (y <= 1.75e+44) {
tmp = z + x;
} else if (y <= 4.1e+157) {
tmp = t_1;
} else {
tmp = b * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = -y * z
if (y <= (-1.75d+155)) then
tmp = t_1
else if (y <= (-4d-12)) then
tmp = b * t
else if (y <= 1.75d+44) then
tmp = z + x
else if (y <= 4.1d+157) then
tmp = t_1
else
tmp = b * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -y * z;
double tmp;
if (y <= -1.75e+155) {
tmp = t_1;
} else if (y <= -4e-12) {
tmp = b * t;
} else if (y <= 1.75e+44) {
tmp = z + x;
} else if (y <= 4.1e+157) {
tmp = t_1;
} else {
tmp = b * y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -y * z tmp = 0 if y <= -1.75e+155: tmp = t_1 elif y <= -4e-12: tmp = b * t elif y <= 1.75e+44: tmp = z + x elif y <= 4.1e+157: tmp = t_1 else: tmp = b * y return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(-y) * z) tmp = 0.0 if (y <= -1.75e+155) tmp = t_1; elseif (y <= -4e-12) tmp = Float64(b * t); elseif (y <= 1.75e+44) tmp = Float64(z + x); elseif (y <= 4.1e+157) tmp = t_1; else tmp = Float64(b * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = -y * z; tmp = 0.0; if (y <= -1.75e+155) tmp = t_1; elseif (y <= -4e-12) tmp = b * t; elseif (y <= 1.75e+44) tmp = z + x; elseif (y <= 4.1e+157) tmp = t_1; else tmp = b * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-y) * z), $MachinePrecision]}, If[LessEqual[y, -1.75e+155], t$95$1, If[LessEqual[y, -4e-12], N[(b * t), $MachinePrecision], If[LessEqual[y, 1.75e+44], N[(z + x), $MachinePrecision], If[LessEqual[y, 4.1e+157], t$95$1, N[(b * y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-y\right) \cdot z\\
\mathbf{if}\;y \leq -1.75 \cdot 10^{+155}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -4 \cdot 10^{-12}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{+44}:\\
\;\;\;\;z + x\\
\mathbf{elif}\;y \leq 4.1 \cdot 10^{+157}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot y\\
\end{array}
\end{array}
if y < -1.74999999999999992e155 or 1.75e44 < y < 4.10000000000000016e157Initial program 88.2%
Taylor expanded in z around inf
*-commutativeN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
+-commutativeN/A
metadata-evalN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f6446.8
Applied rewrites46.8%
Taylor expanded in y around inf
Applied rewrites46.8%
if -1.74999999999999992e155 < y < -3.99999999999999992e-12Initial program 92.0%
Taylor expanded in a around 0
Applied rewrites67.5%
Taylor expanded in t around inf
Applied rewrites31.6%
if -3.99999999999999992e-12 < y < 1.75e44Initial program 97.1%
Taylor expanded in a around 0
Applied rewrites66.2%
Taylor expanded in b around 0
Applied rewrites39.3%
Taylor expanded in y around 0
Applied rewrites39.2%
if 4.10000000000000016e157 < y Initial program 89.9%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6484.8
Applied rewrites84.8%
Taylor expanded in y around inf
Applied rewrites55.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)))
(if (<= t -4.9e+35)
t_1
(if (<= t 9.8e-204)
(fma (- 1.0 y) z (+ a x))
(if (<= t 2.4e+40) (fma (- y 2.0) b (+ a x)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - a) * t;
double tmp;
if (t <= -4.9e+35) {
tmp = t_1;
} else if (t <= 9.8e-204) {
tmp = fma((1.0 - y), z, (a + x));
} else if (t <= 2.4e+40) {
tmp = fma((y - 2.0), b, (a + x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - a) * t) tmp = 0.0 if (t <= -4.9e+35) tmp = t_1; elseif (t <= 9.8e-204) tmp = fma(Float64(1.0 - y), z, Float64(a + x)); elseif (t <= 2.4e+40) tmp = fma(Float64(y - 2.0), b, Float64(a + x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -4.9e+35], t$95$1, If[LessEqual[t, 9.8e-204], N[(N[(1.0 - y), $MachinePrecision] * z + N[(a + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.4e+40], N[(N[(y - 2.0), $MachinePrecision] * b + N[(a + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -4.9 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 9.8 \cdot 10^{-204}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, a + x\right)\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{+40}:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, a + x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.90000000000000025e35 or 2.4e40 < t Initial program 91.1%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6472.4
Applied rewrites72.4%
if -4.90000000000000025e35 < t < 9.80000000000000019e-204Initial program 96.2%
Taylor expanded in b around 0
+-commutativeN/A
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites79.4%
Taylor expanded in t around 0
Applied rewrites77.5%
if 9.80000000000000019e-204 < t < 2.4e40Initial program 96.2%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6475.9
Applied rewrites75.9%
Taylor expanded in t around 0
Applied rewrites73.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -1.5e+37)
(fma y b (* (- t 2.0) b))
(if (<= b 1.15e+141)
(fma (- 1.0 y) z (fma (- 1.0 t) a x))
(* b (- (+ t y) 2.0)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.5e+37) {
tmp = fma(y, b, ((t - 2.0) * b));
} else if (b <= 1.15e+141) {
tmp = fma((1.0 - y), z, fma((1.0 - t), a, x));
} else {
tmp = b * ((t + y) - 2.0);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.5e+37) tmp = fma(y, b, Float64(Float64(t - 2.0) * b)); elseif (b <= 1.15e+141) tmp = fma(Float64(1.0 - y), z, fma(Float64(1.0 - t), a, x)); else tmp = Float64(b * Float64(Float64(t + y) - 2.0)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.5e+37], N[(y * b + N[(N[(t - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.15e+141], N[(N[(1.0 - y), $MachinePrecision] * z + N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision]), $MachinePrecision], N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.5 \cdot 10^{+37}:\\
\;\;\;\;\mathsf{fma}\left(y, b, \left(t - 2\right) \cdot b\right)\\
\mathbf{elif}\;b \leq 1.15 \cdot 10^{+141}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(1 - t, a, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\
\end{array}
\end{array}
if b < -1.50000000000000011e37Initial program 86.7%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6471.8
Applied rewrites71.8%
Applied rewrites71.9%
if -1.50000000000000011e37 < b < 1.1500000000000001e141Initial program 99.3%
Taylor expanded in b around 0
+-commutativeN/A
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites87.5%
if 1.1500000000000001e141 < b Initial program 78.6%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6482.4
Applied rewrites82.4%
Final simplification82.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -6.6e+201)
(* b t)
(if (<= b -1.9e+19)
(* b y)
(if (<= b 1.8e-154) (+ a x) (if (<= b 3.3e+94) (+ z x) (* b t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -6.6e+201) {
tmp = b * t;
} else if (b <= -1.9e+19) {
tmp = b * y;
} else if (b <= 1.8e-154) {
tmp = a + x;
} else if (b <= 3.3e+94) {
tmp = z + x;
} else {
tmp = b * t;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-6.6d+201)) then
tmp = b * t
else if (b <= (-1.9d+19)) then
tmp = b * y
else if (b <= 1.8d-154) then
tmp = a + x
else if (b <= 3.3d+94) then
tmp = z + x
else
tmp = b * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -6.6e+201) {
tmp = b * t;
} else if (b <= -1.9e+19) {
tmp = b * y;
} else if (b <= 1.8e-154) {
tmp = a + x;
} else if (b <= 3.3e+94) {
tmp = z + x;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -6.6e+201: tmp = b * t elif b <= -1.9e+19: tmp = b * y elif b <= 1.8e-154: tmp = a + x elif b <= 3.3e+94: tmp = z + x else: tmp = b * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -6.6e+201) tmp = Float64(b * t); elseif (b <= -1.9e+19) tmp = Float64(b * y); elseif (b <= 1.8e-154) tmp = Float64(a + x); elseif (b <= 3.3e+94) tmp = Float64(z + x); else tmp = Float64(b * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -6.6e+201) tmp = b * t; elseif (b <= -1.9e+19) tmp = b * y; elseif (b <= 1.8e-154) tmp = a + x; elseif (b <= 3.3e+94) tmp = z + x; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -6.6e+201], N[(b * t), $MachinePrecision], If[LessEqual[b, -1.9e+19], N[(b * y), $MachinePrecision], If[LessEqual[b, 1.8e-154], N[(a + x), $MachinePrecision], If[LessEqual[b, 3.3e+94], N[(z + x), $MachinePrecision], N[(b * t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.6 \cdot 10^{+201}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;b \leq -1.9 \cdot 10^{+19}:\\
\;\;\;\;b \cdot y\\
\mathbf{elif}\;b \leq 1.8 \cdot 10^{-154}:\\
\;\;\;\;a + x\\
\mathbf{elif}\;b \leq 3.3 \cdot 10^{+94}:\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if b < -6.6e201 or 3.3e94 < b Initial program 78.5%
Taylor expanded in a around 0
Applied rewrites89.8%
Taylor expanded in t around inf
Applied rewrites50.8%
if -6.6e201 < b < -1.9e19Initial program 97.7%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6485.3
Applied rewrites85.3%
Taylor expanded in y around inf
Applied rewrites38.3%
if -1.9e19 < b < 1.8000000000000001e-154Initial program 100.0%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6476.3
Applied rewrites76.3%
Taylor expanded in t around 0
Applied rewrites42.4%
Taylor expanded in b around 0
Applied rewrites40.1%
if 1.8000000000000001e-154 < b < 3.3e94Initial program 98.2%
Taylor expanded in a around 0
Applied rewrites69.2%
Taylor expanded in b around 0
Applied rewrites52.3%
Taylor expanded in y around 0
Applied rewrites33.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- (+ t y) 2.0))))
(if (<= b -4.4e+18)
t_1
(if (<= b 4.2e-90)
(fma (- 1.0 t) a x)
(if (<= b 1.7e+94) (fma (- 1.0 y) z x) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * ((t + y) - 2.0);
double tmp;
if (b <= -4.4e+18) {
tmp = t_1;
} else if (b <= 4.2e-90) {
tmp = fma((1.0 - t), a, x);
} else if (b <= 1.7e+94) {
tmp = fma((1.0 - y), z, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(Float64(t + y) - 2.0)) tmp = 0.0 if (b <= -4.4e+18) tmp = t_1; elseif (b <= 4.2e-90) tmp = fma(Float64(1.0 - t), a, x); elseif (b <= 1.7e+94) tmp = fma(Float64(1.0 - y), z, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4.4e+18], t$95$1, If[LessEqual[b, 4.2e-90], N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision], If[LessEqual[b, 1.7e+94], N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(t + y\right) - 2\right)\\
\mathbf{if}\;b \leq -4.4 \cdot 10^{+18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 4.2 \cdot 10^{-90}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, x\right)\\
\mathbf{elif}\;b \leq 1.7 \cdot 10^{+94}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -4.4e18 or 1.7000000000000001e94 < b Initial program 86.4%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6470.5
Applied rewrites70.5%
if -4.4e18 < b < 4.1999999999999998e-90Initial program 100.0%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6475.3
Applied rewrites75.3%
Taylor expanded in b around 0
Applied rewrites69.6%
if 4.1999999999999998e-90 < b < 1.7000000000000001e94Initial program 97.5%
Taylor expanded in a around 0
Applied rewrites73.9%
Taylor expanded in b around 0
Applied rewrites57.5%
Final simplification68.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)))
(if (<= t -1.15e+14)
t_1
(if (<= t 8.5e-195)
(fma 1.0 z (+ a x))
(if (<= t 2.4e+40) (fma (- y 2.0) b x) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - a) * t;
double tmp;
if (t <= -1.15e+14) {
tmp = t_1;
} else if (t <= 8.5e-195) {
tmp = fma(1.0, z, (a + x));
} else if (t <= 2.4e+40) {
tmp = fma((y - 2.0), b, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - a) * t) tmp = 0.0 if (t <= -1.15e+14) tmp = t_1; elseif (t <= 8.5e-195) tmp = fma(1.0, z, Float64(a + x)); elseif (t <= 2.4e+40) tmp = fma(Float64(y - 2.0), b, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -1.15e+14], t$95$1, If[LessEqual[t, 8.5e-195], N[(1.0 * z + N[(a + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.4e+40], N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -1.15 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{-195}:\\
\;\;\;\;\mathsf{fma}\left(1, z, a + x\right)\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{+40}:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.15e14 or 2.4e40 < t Initial program 90.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6471.5
Applied rewrites71.5%
if -1.15e14 < t < 8.50000000000000023e-195Initial program 97.4%
Taylor expanded in b around 0
+-commutativeN/A
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites80.2%
Taylor expanded in t around 0
Applied rewrites78.2%
Taylor expanded in y around 0
Applied rewrites62.5%
if 8.50000000000000023e-195 < t < 2.4e40Initial program 96.1%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6475.4
Applied rewrites75.4%
Taylor expanded in t around 0
Applied rewrites72.7%
Taylor expanded in a around 0
Applied rewrites60.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)))
(if (<= t -10.0)
t_1
(if (<= t 3e-26)
(fma (- y 2.0) b a)
(if (<= t 2.4e+40) (fma (- y 2.0) b x) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - a) * t;
double tmp;
if (t <= -10.0) {
tmp = t_1;
} else if (t <= 3e-26) {
tmp = fma((y - 2.0), b, a);
} else if (t <= 2.4e+40) {
tmp = fma((y - 2.0), b, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - a) * t) tmp = 0.0 if (t <= -10.0) tmp = t_1; elseif (t <= 3e-26) tmp = fma(Float64(y - 2.0), b, a); elseif (t <= 2.4e+40) tmp = fma(Float64(y - 2.0), b, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -10.0], t$95$1, If[LessEqual[t, 3e-26], N[(N[(y - 2.0), $MachinePrecision] * b + a), $MachinePrecision], If[LessEqual[t, 2.4e+40], N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -10:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3 \cdot 10^{-26}:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, a\right)\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{+40}:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -10 or 2.4e40 < t Initial program 90.8%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6469.6
Applied rewrites69.6%
if -10 < t < 3.00000000000000012e-26Initial program 97.2%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6471.5
Applied rewrites71.5%
Taylor expanded in t around 0
Applied rewrites70.3%
Taylor expanded in x around 0
Applied rewrites53.1%
if 3.00000000000000012e-26 < t < 2.4e40Initial program 94.1%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6476.6
Applied rewrites76.6%
Taylor expanded in t around 0
Applied rewrites68.3%
Taylor expanded in a around 0
Applied rewrites65.4%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (- b a) t))) (if (<= t -35.0) t_1 (if (<= t 2.4e+40) (fma (- y 2.0) b (+ a x)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - a) * t;
double tmp;
if (t <= -35.0) {
tmp = t_1;
} else if (t <= 2.4e+40) {
tmp = fma((y - 2.0), b, (a + x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - a) * t) tmp = 0.0 if (t <= -35.0) tmp = t_1; elseif (t <= 2.4e+40) tmp = fma(Float64(y - 2.0), b, Float64(a + x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -35.0], t$95$1, If[LessEqual[t, 2.4e+40], N[(N[(y - 2.0), $MachinePrecision] * b + N[(a + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -35:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{+40}:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, a + x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -35 or 2.4e40 < t Initial program 90.8%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6469.6
Applied rewrites69.6%
if -35 < t < 2.4e40Initial program 96.8%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6472.2
Applied rewrites72.2%
Taylor expanded in t around 0
Applied rewrites70.1%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.05e+111) (* (- a) t) (if (<= t -0.000108) (* (- t 2.0) b) (if (<= t 1.95e+80) (+ a x) (* b t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.05e+111) {
tmp = -a * t;
} else if (t <= -0.000108) {
tmp = (t - 2.0) * b;
} else if (t <= 1.95e+80) {
tmp = a + x;
} else {
tmp = b * t;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-1.05d+111)) then
tmp = -a * t
else if (t <= (-0.000108d0)) then
tmp = (t - 2.0d0) * b
else if (t <= 1.95d+80) then
tmp = a + x
else
tmp = b * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.05e+111) {
tmp = -a * t;
} else if (t <= -0.000108) {
tmp = (t - 2.0) * b;
} else if (t <= 1.95e+80) {
tmp = a + x;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.05e+111: tmp = -a * t elif t <= -0.000108: tmp = (t - 2.0) * b elif t <= 1.95e+80: tmp = a + x else: tmp = b * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.05e+111) tmp = Float64(Float64(-a) * t); elseif (t <= -0.000108) tmp = Float64(Float64(t - 2.0) * b); elseif (t <= 1.95e+80) tmp = Float64(a + x); else tmp = Float64(b * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.05e+111) tmp = -a * t; elseif (t <= -0.000108) tmp = (t - 2.0) * b; elseif (t <= 1.95e+80) tmp = a + x; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.05e+111], N[((-a) * t), $MachinePrecision], If[LessEqual[t, -0.000108], N[(N[(t - 2.0), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[t, 1.95e+80], N[(a + x), $MachinePrecision], N[(b * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{+111}:\\
\;\;\;\;\left(-a\right) \cdot t\\
\mathbf{elif}\;t \leq -0.000108:\\
\;\;\;\;\left(t - 2\right) \cdot b\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{+80}:\\
\;\;\;\;a + x\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if t < -1.04999999999999997e111Initial program 89.4%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6480.2
Applied rewrites80.2%
Taylor expanded in b around 0
Applied rewrites63.7%
if -1.04999999999999997e111 < t < -1.08e-4Initial program 96.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6446.7
Applied rewrites46.7%
Taylor expanded in y around 0
Applied rewrites37.1%
if -1.08e-4 < t < 1.94999999999999999e80Initial program 96.9%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6472.9
Applied rewrites72.9%
Taylor expanded in t around 0
Applied rewrites68.1%
Taylor expanded in b around 0
Applied rewrites38.9%
if 1.94999999999999999e80 < t Initial program 87.7%
Taylor expanded in a around 0
Applied rewrites73.1%
Taylor expanded in t around inf
Applied rewrites45.3%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.05e+111) (* (- a) t) (if (<= t -16200.0) (* b t) (if (<= t 1.95e+80) (+ a x) (* b t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.05e+111) {
tmp = -a * t;
} else if (t <= -16200.0) {
tmp = b * t;
} else if (t <= 1.95e+80) {
tmp = a + x;
} else {
tmp = b * t;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-1.05d+111)) then
tmp = -a * t
else if (t <= (-16200.0d0)) then
tmp = b * t
else if (t <= 1.95d+80) then
tmp = a + x
else
tmp = b * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.05e+111) {
tmp = -a * t;
} else if (t <= -16200.0) {
tmp = b * t;
} else if (t <= 1.95e+80) {
tmp = a + x;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.05e+111: tmp = -a * t elif t <= -16200.0: tmp = b * t elif t <= 1.95e+80: tmp = a + x else: tmp = b * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.05e+111) tmp = Float64(Float64(-a) * t); elseif (t <= -16200.0) tmp = Float64(b * t); elseif (t <= 1.95e+80) tmp = Float64(a + x); else tmp = Float64(b * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.05e+111) tmp = -a * t; elseif (t <= -16200.0) tmp = b * t; elseif (t <= 1.95e+80) tmp = a + x; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.05e+111], N[((-a) * t), $MachinePrecision], If[LessEqual[t, -16200.0], N[(b * t), $MachinePrecision], If[LessEqual[t, 1.95e+80], N[(a + x), $MachinePrecision], N[(b * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{+111}:\\
\;\;\;\;\left(-a\right) \cdot t\\
\mathbf{elif}\;t \leq -16200:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{+80}:\\
\;\;\;\;a + x\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if t < -1.04999999999999997e111Initial program 89.4%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6480.2
Applied rewrites80.2%
Taylor expanded in b around 0
Applied rewrites63.7%
if -1.04999999999999997e111 < t < -16200 or 1.94999999999999999e80 < t Initial program 90.4%
Taylor expanded in a around 0
Applied rewrites76.3%
Taylor expanded in t around inf
Applied rewrites42.8%
if -16200 < t < 1.94999999999999999e80Initial program 97.0%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6473.6
Applied rewrites73.6%
Taylor expanded in t around 0
Applied rewrites67.2%
Taylor expanded in b around 0
Applied rewrites38.4%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (- b a) t))) (if (<= t -10.0) t_1 (if (<= t 2.4e+40) (fma (- y 2.0) b a) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - a) * t;
double tmp;
if (t <= -10.0) {
tmp = t_1;
} else if (t <= 2.4e+40) {
tmp = fma((y - 2.0), b, a);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - a) * t) tmp = 0.0 if (t <= -10.0) tmp = t_1; elseif (t <= 2.4e+40) tmp = fma(Float64(y - 2.0), b, a); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -10.0], t$95$1, If[LessEqual[t, 2.4e+40], N[(N[(y - 2.0), $MachinePrecision] * b + a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -10:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{+40}:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -10 or 2.4e40 < t Initial program 90.8%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6469.6
Applied rewrites69.6%
if -10 < t < 2.4e40Initial program 96.8%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6472.2
Applied rewrites72.2%
Taylor expanded in t around 0
Applied rewrites70.1%
Taylor expanded in x around 0
Applied rewrites50.7%
(FPCore (x y z t a b) :precision binary64 (if (<= y -7.0) (* b y) (if (<= y 4100000.0) (+ z x) (* b y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -7.0) {
tmp = b * y;
} else if (y <= 4100000.0) {
tmp = z + x;
} else {
tmp = b * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-7.0d0)) then
tmp = b * y
else if (y <= 4100000.0d0) then
tmp = z + x
else
tmp = b * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -7.0) {
tmp = b * y;
} else if (y <= 4100000.0) {
tmp = z + x;
} else {
tmp = b * y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -7.0: tmp = b * y elif y <= 4100000.0: tmp = z + x else: tmp = b * y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -7.0) tmp = Float64(b * y); elseif (y <= 4100000.0) tmp = Float64(z + x); else tmp = Float64(b * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -7.0) tmp = b * y; elseif (y <= 4100000.0) tmp = z + x; else tmp = b * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -7.0], N[(b * y), $MachinePrecision], If[LessEqual[y, 4100000.0], N[(z + x), $MachinePrecision], N[(b * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7:\\
\;\;\;\;b \cdot y\\
\mathbf{elif}\;y \leq 4100000:\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;b \cdot y\\
\end{array}
\end{array}
if y < -7 or 4.1e6 < y Initial program 90.6%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6477.5
Applied rewrites77.5%
Taylor expanded in y around inf
Applied rewrites33.5%
if -7 < y < 4.1e6Initial program 96.9%
Taylor expanded in a around 0
Applied rewrites66.2%
Taylor expanded in b around 0
Applied rewrites40.2%
Taylor expanded in y around 0
Applied rewrites40.2%
(FPCore (x y z t a b) :precision binary64 (if (<= a -1.95e+24) (+ a x) (if (<= a 2.2e+75) (+ z x) (+ a x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.95e+24) {
tmp = a + x;
} else if (a <= 2.2e+75) {
tmp = z + x;
} else {
tmp = a + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-1.95d+24)) then
tmp = a + x
else if (a <= 2.2d+75) then
tmp = z + x
else
tmp = a + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.95e+24) {
tmp = a + x;
} else if (a <= 2.2e+75) {
tmp = z + x;
} else {
tmp = a + x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.95e+24: tmp = a + x elif a <= 2.2e+75: tmp = z + x else: tmp = a + x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.95e+24) tmp = Float64(a + x); elseif (a <= 2.2e+75) tmp = Float64(z + x); else tmp = Float64(a + x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.95e+24) tmp = a + x; elseif (a <= 2.2e+75) tmp = z + x; else tmp = a + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.95e+24], N[(a + x), $MachinePrecision], If[LessEqual[a, 2.2e+75], N[(z + x), $MachinePrecision], N[(a + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.95 \cdot 10^{+24}:\\
\;\;\;\;a + x\\
\mathbf{elif}\;a \leq 2.2 \cdot 10^{+75}:\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;a + x\\
\end{array}
\end{array}
if a < -1.9499999999999999e24 or 2.20000000000000012e75 < a Initial program 91.3%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6486.5
Applied rewrites86.5%
Taylor expanded in t around 0
Applied rewrites47.4%
Taylor expanded in b around 0
Applied rewrites29.9%
if -1.9499999999999999e24 < a < 2.20000000000000012e75Initial program 95.7%
Taylor expanded in a around 0
Applied rewrites90.5%
Taylor expanded in b around 0
Applied rewrites49.3%
Taylor expanded in y around 0
Applied rewrites34.2%
(FPCore (x y z t a b) :precision binary64 (+ a x))
double code(double x, double y, double z, double t, double a, double b) {
return a + x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = a + x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return a + x;
}
def code(x, y, z, t, a, b): return a + x
function code(x, y, z, t, a, b) return Float64(a + x) end
function tmp = code(x, y, z, t, a, b) tmp = a + x; end
code[x_, y_, z_, t_, a_, b_] := N[(a + x), $MachinePrecision]
\begin{array}{l}
\\
a + x
\end{array}
Initial program 93.7%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6478.6
Applied rewrites78.6%
Taylor expanded in t around 0
Applied rewrites43.7%
Taylor expanded in b around 0
Applied rewrites24.2%
herbie shell --seed 2024277
(FPCore (x y z t a b)
:name "Statistics.Distribution.Beta:$centropy from math-functions-0.1.5.2"
:precision binary64
(+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))