
(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 21 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 (fma (- 1.0 t) a (+ (fma (- b z) y (fma (- t 2.0) b x)) z)))
double code(double x, double y, double z, double t, double a, double b) {
return fma((1.0 - t), a, (fma((b - z), y, fma((t - 2.0), b, x)) + z));
}
function code(x, y, z, t, a, b) return fma(Float64(1.0 - t), a, Float64(fma(Float64(b - z), y, fma(Float64(t - 2.0), b, x)) + z)) end
code[x_, y_, z_, t_, a_, b_] := N[(N[(1.0 - t), $MachinePrecision] * a + N[(N[(N[(b - z), $MachinePrecision] * y + N[(N[(t - 2.0), $MachinePrecision] * b + x), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(b - z, y, \mathsf{fma}\left(t - 2, b, x\right)\right) + z\right)
\end{array}
Initial program 96.1%
Taylor expanded in x around 0
Applied rewrites98.0%
Final simplification98.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+ (* (- (+ t y) 2.0) b) (- (- x (* (- y 1.0) z)) (* (- t 1.0) a))))
(t_2 (* (- y) z)))
(if (<= t_1 -4e+304) t_2 (if (<= t_1 1e+306) (+ (+ z x) a) t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (((t + y) - 2.0) * b) + ((x - ((y - 1.0) * z)) - ((t - 1.0) * a));
double t_2 = -y * z;
double tmp;
if (t_1 <= -4e+304) {
tmp = t_2;
} else if (t_1 <= 1e+306) {
tmp = (z + x) + a;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = (((t + y) - 2.0d0) * b) + ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a))
t_2 = -y * z
if (t_1 <= (-4d+304)) then
tmp = t_2
else if (t_1 <= 1d+306) then
tmp = (z + x) + a
else
tmp = t_2
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 + y) - 2.0) * b) + ((x - ((y - 1.0) * z)) - ((t - 1.0) * a));
double t_2 = -y * z;
double tmp;
if (t_1 <= -4e+304) {
tmp = t_2;
} else if (t_1 <= 1e+306) {
tmp = (z + x) + a;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (((t + y) - 2.0) * b) + ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) t_2 = -y * z tmp = 0 if t_1 <= -4e+304: tmp = t_2 elif t_1 <= 1e+306: tmp = (z + x) + a else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(Float64(t + y) - 2.0) * b) + Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a))) t_2 = Float64(Float64(-y) * z) tmp = 0.0 if (t_1 <= -4e+304) tmp = t_2; elseif (t_1 <= 1e+306) tmp = Float64(Float64(z + x) + a); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (((t + y) - 2.0) * b) + ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)); t_2 = -y * z; tmp = 0.0; if (t_1 <= -4e+304) tmp = t_2; elseif (t_1 <= 1e+306) tmp = (z + x) + a; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision] + N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[((-y) * z), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+304], t$95$2, If[LessEqual[t$95$1, 1e+306], N[(N[(z + x), $MachinePrecision] + a), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(t + y\right) - 2\right) \cdot b + \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right)\\
t_2 := \left(-y\right) \cdot z\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+304}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 10^{+306}:\\
\;\;\;\;\left(z + x\right) + a\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\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)) < -3.9999999999999998e304 or 1.00000000000000002e306 < (+.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 87.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
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f6436.4
Applied rewrites36.4%
Taylor expanded in y around inf
Applied rewrites36.2%
if -3.9999999999999998e304 < (+.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)) < 1.00000000000000002e306Initial program 100.0%
Taylor expanded in y around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/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
lower-+.f64N/A
+-commutativeN/A
Applied rewrites80.1%
Taylor expanded in t around 0
Applied rewrites59.5%
Taylor expanded in b around 0
Applied rewrites49.5%
Final simplification45.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b) (fma -1.0 (+ t y) 2.0))))
(if (<= b -3e+43)
t_1
(if (<= b 1.2e-25)
(fma (- 1.0 t) a (+ z x))
(if (<= b 7e+19)
(* (- b z) y)
(if (<= b 1.05e+94) (fma (- 1.0 y) z (+ a x)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -b * fma(-1.0, (t + y), 2.0);
double tmp;
if (b <= -3e+43) {
tmp = t_1;
} else if (b <= 1.2e-25) {
tmp = fma((1.0 - t), a, (z + x));
} else if (b <= 7e+19) {
tmp = (b - z) * y;
} else if (b <= 1.05e+94) {
tmp = fma((1.0 - y), z, (a + x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(-b) * fma(-1.0, Float64(t + y), 2.0)) tmp = 0.0 if (b <= -3e+43) tmp = t_1; elseif (b <= 1.2e-25) tmp = fma(Float64(1.0 - t), a, Float64(z + x)); elseif (b <= 7e+19) tmp = Float64(Float64(b - z) * y); elseif (b <= 1.05e+94) tmp = fma(Float64(1.0 - y), z, Float64(a + x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-b) * N[(-1.0 * N[(t + y), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3e+43], t$95$1, If[LessEqual[b, 1.2e-25], N[(N[(1.0 - t), $MachinePrecision] * a + N[(z + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7e+19], N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[b, 1.05e+94], N[(N[(1.0 - y), $MachinePrecision] * z + N[(a + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-b\right) \cdot \mathsf{fma}\left(-1, t + y, 2\right)\\
\mathbf{if}\;b \leq -3 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.2 \cdot 10^{-25}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, z + x\right)\\
\mathbf{elif}\;b \leq 7 \cdot 10^{+19}:\\
\;\;\;\;\left(b - z\right) \cdot y\\
\mathbf{elif}\;b \leq 1.05 \cdot 10^{+94}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, a + x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -3.00000000000000017e43 or 1.04999999999999995e94 < b Initial program 88.8%
Taylor expanded in x around 0
Applied rewrites94.4%
Taylor expanded in b around -inf
Applied rewrites74.6%
if -3.00000000000000017e43 < b < 1.20000000000000005e-25Initial program 100.0%
Taylor expanded in y around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/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
lower-+.f64N/A
+-commutativeN/A
Applied rewrites78.9%
Taylor expanded in b around 0
Applied rewrites74.2%
if 1.20000000000000005e-25 < b < 7e19Initial program 99.9%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6477.5
Applied rewrites77.5%
if 7e19 < b < 1.04999999999999995e94Initial program 100.0%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
Applied rewrites94.7%
Taylor expanded in b around 0
Applied rewrites79.7%
Final simplification74.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- 1.0 t) a)) (t_2 (* (- 1.0 y) z)))
(if (<= z -1.1e+87)
t_2
(if (<= z -2.8e+23)
t_1
(if (<= z 6.5e-308)
(+ (+ z x) a)
(if (<= z 5.8e-173) (* (- y 2.0) b) (if (<= z 6e+31) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (1.0 - t) * a;
double t_2 = (1.0 - y) * z;
double tmp;
if (z <= -1.1e+87) {
tmp = t_2;
} else if (z <= -2.8e+23) {
tmp = t_1;
} else if (z <= 6.5e-308) {
tmp = (z + x) + a;
} else if (z <= 5.8e-173) {
tmp = (y - 2.0) * b;
} else if (z <= 6e+31) {
tmp = t_1;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = (1.0d0 - t) * a
t_2 = (1.0d0 - y) * z
if (z <= (-1.1d+87)) then
tmp = t_2
else if (z <= (-2.8d+23)) then
tmp = t_1
else if (z <= 6.5d-308) then
tmp = (z + x) + a
else if (z <= 5.8d-173) then
tmp = (y - 2.0d0) * b
else if (z <= 6d+31) then
tmp = t_1
else
tmp = t_2
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 = (1.0 - t) * a;
double t_2 = (1.0 - y) * z;
double tmp;
if (z <= -1.1e+87) {
tmp = t_2;
} else if (z <= -2.8e+23) {
tmp = t_1;
} else if (z <= 6.5e-308) {
tmp = (z + x) + a;
} else if (z <= 5.8e-173) {
tmp = (y - 2.0) * b;
} else if (z <= 6e+31) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (1.0 - t) * a t_2 = (1.0 - y) * z tmp = 0 if z <= -1.1e+87: tmp = t_2 elif z <= -2.8e+23: tmp = t_1 elif z <= 6.5e-308: tmp = (z + x) + a elif z <= 5.8e-173: tmp = (y - 2.0) * b elif z <= 6e+31: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(1.0 - t) * a) t_2 = Float64(Float64(1.0 - y) * z) tmp = 0.0 if (z <= -1.1e+87) tmp = t_2; elseif (z <= -2.8e+23) tmp = t_1; elseif (z <= 6.5e-308) tmp = Float64(Float64(z + x) + a); elseif (z <= 5.8e-173) tmp = Float64(Float64(y - 2.0) * b); elseif (z <= 6e+31) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (1.0 - t) * a; t_2 = (1.0 - y) * z; tmp = 0.0; if (z <= -1.1e+87) tmp = t_2; elseif (z <= -2.8e+23) tmp = t_1; elseif (z <= 6.5e-308) tmp = (z + x) + a; elseif (z <= 5.8e-173) tmp = (y - 2.0) * b; elseif (z <= 6e+31) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision]}, Block[{t$95$2 = N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -1.1e+87], t$95$2, If[LessEqual[z, -2.8e+23], t$95$1, If[LessEqual[z, 6.5e-308], N[(N[(z + x), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[z, 5.8e-173], N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[z, 6e+31], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(1 - t\right) \cdot a\\
t_2 := \left(1 - y\right) \cdot z\\
\mathbf{if}\;z \leq -1.1 \cdot 10^{+87}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{+23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-308}:\\
\;\;\;\;\left(z + x\right) + a\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-173}:\\
\;\;\;\;\left(y - 2\right) \cdot b\\
\mathbf{elif}\;z \leq 6 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.1e87 or 5.99999999999999978e31 < z Initial program 93.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
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f6466.2
Applied rewrites66.2%
if -1.1e87 < z < -2.8e23 or 5.7999999999999997e-173 < z < 5.99999999999999978e31Initial program 96.9%
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--.f6451.7
Applied rewrites51.7%
if -2.8e23 < z < 6.4999999999999999e-308Initial program 98.7%
Taylor expanded in y around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/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
lower-+.f64N/A
+-commutativeN/A
Applied rewrites77.2%
Taylor expanded in t around 0
Applied rewrites51.9%
Taylor expanded in b around 0
Applied rewrites40.7%
if 6.4999999999999999e-308 < z < 5.7999999999999997e-173Initial program 95.5%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
Applied rewrites73.7%
Taylor expanded in y around 0
Applied rewrites71.7%
Taylor expanded in b around inf
Applied rewrites56.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- 1.0 t) a (+ z x))) (t_2 (* (- b a) t)))
(if (<= t -1.66e+143)
t_2
(if (<= t -3.4e-15)
t_1
(if (<= t 3.2e-31)
(+ (+ (fma -2.0 b z) x) a)
(if (<= t 1.25e+104) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((1.0 - t), a, (z + x));
double t_2 = (b - a) * t;
double tmp;
if (t <= -1.66e+143) {
tmp = t_2;
} else if (t <= -3.4e-15) {
tmp = t_1;
} else if (t <= 3.2e-31) {
tmp = (fma(-2.0, b, z) + x) + a;
} else if (t <= 1.25e+104) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(1.0 - t), a, Float64(z + x)) t_2 = Float64(Float64(b - a) * t) tmp = 0.0 if (t <= -1.66e+143) tmp = t_2; elseif (t <= -3.4e-15) tmp = t_1; elseif (t <= 3.2e-31) tmp = Float64(Float64(fma(-2.0, b, z) + x) + a); elseif (t <= 1.25e+104) 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 - t), $MachinePrecision] * a + N[(z + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -1.66e+143], t$95$2, If[LessEqual[t, -3.4e-15], t$95$1, If[LessEqual[t, 3.2e-31], N[(N[(N[(-2.0 * b + z), $MachinePrecision] + x), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[t, 1.25e+104], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(1 - t, a, z + x\right)\\
t_2 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -1.66 \cdot 10^{+143}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -3.4 \cdot 10^{-15}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{-31}:\\
\;\;\;\;\left(\mathsf{fma}\left(-2, b, z\right) + x\right) + a\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{+104}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.66000000000000007e143 or 1.2499999999999999e104 < t Initial program 90.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6481.3
Applied rewrites81.3%
if -1.66000000000000007e143 < t < -3.4e-15 or 3.20000000000000018e-31 < t < 1.2499999999999999e104Initial program 97.2%
Taylor expanded in y around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/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
lower-+.f64N/A
+-commutativeN/A
Applied rewrites79.9%
Taylor expanded in b around 0
Applied rewrites69.1%
if -3.4e-15 < t < 3.20000000000000018e-31Initial program 99.1%
Taylor expanded in y around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/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
lower-+.f64N/A
+-commutativeN/A
Applied rewrites62.5%
Taylor expanded in t around 0
Applied rewrites62.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)))
(if (<= t -5.5e+74)
t_1
(if (<= t -1.28e-179)
(+ (+ z x) a)
(if (<= t -1.5e-239)
(* (- b z) y)
(if (<= t 8.5e-22) (+ (fma -2.0 b x) 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 <= -5.5e+74) {
tmp = t_1;
} else if (t <= -1.28e-179) {
tmp = (z + x) + a;
} else if (t <= -1.5e-239) {
tmp = (b - z) * y;
} else if (t <= 8.5e-22) {
tmp = fma(-2.0, b, x) + 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 <= -5.5e+74) tmp = t_1; elseif (t <= -1.28e-179) tmp = Float64(Float64(z + x) + a); elseif (t <= -1.5e-239) tmp = Float64(Float64(b - z) * y); elseif (t <= 8.5e-22) tmp = Float64(fma(-2.0, b, x) + 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, -5.5e+74], t$95$1, If[LessEqual[t, -1.28e-179], N[(N[(z + x), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[t, -1.5e-239], N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t, 8.5e-22], N[(N[(-2.0 * b + x), $MachinePrecision] + a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -5.5 \cdot 10^{+74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.28 \cdot 10^{-179}:\\
\;\;\;\;\left(z + x\right) + a\\
\mathbf{elif}\;t \leq -1.5 \cdot 10^{-239}:\\
\;\;\;\;\left(b - z\right) \cdot y\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{-22}:\\
\;\;\;\;\mathsf{fma}\left(-2, b, x\right) + a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.5000000000000003e74 or 8.5000000000000001e-22 < t Initial program 93.1%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6468.3
Applied rewrites68.3%
if -5.5000000000000003e74 < t < -1.28000000000000006e-179Initial program 96.0%
Taylor expanded in y around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/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
lower-+.f64N/A
+-commutativeN/A
Applied rewrites74.5%
Taylor expanded in t around 0
Applied rewrites69.0%
Taylor expanded in b around 0
Applied rewrites61.9%
if -1.28000000000000006e-179 < t < -1.4999999999999999e-239Initial program 100.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6467.8
Applied rewrites67.8%
if -1.4999999999999999e-239 < t < 8.5000000000000001e-22Initial program 100.0%
Taylor expanded in y around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/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
lower-+.f64N/A
+-commutativeN/A
Applied rewrites64.2%
Taylor expanded in t around 0
Applied rewrites64.2%
Taylor expanded in x around 0
Applied rewrites42.8%
Taylor expanded in z around 0
Applied rewrites56.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- 1.0 t) a (+ (fma (- t 2.0) b x) z))))
(if (<= t -8.5e+78)
t_1
(if (<= t 5.8e-20) (fma (- 1.0 y) z (+ (fma (- y 2.0) b x) a)) 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 - 2.0), b, x) + z));
double tmp;
if (t <= -8.5e+78) {
tmp = t_1;
} else if (t <= 5.8e-20) {
tmp = fma((1.0 - y), z, (fma((y - 2.0), b, x) + a));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(1.0 - t), a, Float64(fma(Float64(t - 2.0), b, x) + z)) tmp = 0.0 if (t <= -8.5e+78) tmp = t_1; elseif (t <= 5.8e-20) tmp = fma(Float64(1.0 - y), z, Float64(fma(Float64(y - 2.0), b, x) + a)); 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 - 2.0), $MachinePrecision] * b + x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.5e+78], t$95$1, If[LessEqual[t, 5.8e-20], N[(N[(1.0 - y), $MachinePrecision] * z + N[(N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(t - 2, b, x\right) + z\right)\\
\mathbf{if}\;t \leq -8.5 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{-20}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(y - 2, b, x\right) + a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -8.50000000000000079e78 or 5.8e-20 < t Initial program 93.0%
Taylor expanded in y around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/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
lower-+.f64N/A
+-commutativeN/A
Applied rewrites84.0%
if -8.50000000000000079e78 < t < 5.8e-20Initial program 98.6%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
Applied rewrites97.9%
Final simplification91.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -4.4e+21)
(fma (- (+ t y) 2.0) b (* (- z) y))
(if (<= y 2.4e-11)
(fma (- 1.0 t) a (+ (fma (- t 2.0) b x) z))
(fma (- 1.0 t) a (fma (- 1.0 y) z x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.4e+21) {
tmp = fma(((t + y) - 2.0), b, (-z * y));
} else if (y <= 2.4e-11) {
tmp = fma((1.0 - t), a, (fma((t - 2.0), b, x) + z));
} else {
tmp = fma((1.0 - t), a, fma((1.0 - y), z, x));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -4.4e+21) tmp = fma(Float64(Float64(t + y) - 2.0), b, Float64(Float64(-z) * y)); elseif (y <= 2.4e-11) tmp = fma(Float64(1.0 - t), a, Float64(fma(Float64(t - 2.0), b, x) + z)); else tmp = fma(Float64(1.0 - t), a, fma(Float64(1.0 - y), z, x)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -4.4e+21], N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + N[((-z) * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.4e-11], N[(N[(1.0 - t), $MachinePrecision] * a + N[(N[(N[(t - 2.0), $MachinePrecision] * b + x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - t), $MachinePrecision] * a + N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.4 \cdot 10^{+21}:\\
\;\;\;\;\mathsf{fma}\left(\left(t + y\right) - 2, b, \left(-z\right) \cdot y\right)\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{-11}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(t - 2, b, x\right) + z\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(1 - y, z, x\right)\right)\\
\end{array}
\end{array}
if y < -4.4e21Initial program 98.1%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6474.0
Applied rewrites74.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6475.9
lift-+.f64N/A
+-commutativeN/A
lower-+.f6475.9
Applied rewrites75.9%
if -4.4e21 < y < 2.4000000000000001e-11Initial program 98.4%
Taylor expanded in y around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/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
lower-+.f64N/A
+-commutativeN/A
Applied rewrites98.6%
if 2.4000000000000001e-11 < y Initial program 90.9%
Taylor expanded in x around 0
Applied rewrites96.1%
Taylor expanded in b around 0
Applied rewrites72.5%
Final simplification86.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ z x) a)) (t_2 (* (- b a) t)))
(if (<= t -5.5e+74)
t_2
(if (<= t -1.28e-179)
t_1
(if (<= t 3.5e-270) (* (- b z) y) (if (<= t 2020.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + x) + a;
double t_2 = (b - a) * t;
double tmp;
if (t <= -5.5e+74) {
tmp = t_2;
} else if (t <= -1.28e-179) {
tmp = t_1;
} else if (t <= 3.5e-270) {
tmp = (b - z) * y;
} else if (t <= 2020.0) {
tmp = t_1;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = (z + x) + a
t_2 = (b - a) * t
if (t <= (-5.5d+74)) then
tmp = t_2
else if (t <= (-1.28d-179)) then
tmp = t_1
else if (t <= 3.5d-270) then
tmp = (b - z) * y
else if (t <= 2020.0d0) then
tmp = t_1
else
tmp = t_2
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 = (z + x) + a;
double t_2 = (b - a) * t;
double tmp;
if (t <= -5.5e+74) {
tmp = t_2;
} else if (t <= -1.28e-179) {
tmp = t_1;
} else if (t <= 3.5e-270) {
tmp = (b - z) * y;
} else if (t <= 2020.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + x) + a t_2 = (b - a) * t tmp = 0 if t <= -5.5e+74: tmp = t_2 elif t <= -1.28e-179: tmp = t_1 elif t <= 3.5e-270: tmp = (b - z) * y elif t <= 2020.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + x) + a) t_2 = Float64(Float64(b - a) * t) tmp = 0.0 if (t <= -5.5e+74) tmp = t_2; elseif (t <= -1.28e-179) tmp = t_1; elseif (t <= 3.5e-270) tmp = Float64(Float64(b - z) * y); elseif (t <= 2020.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + x) + a; t_2 = (b - a) * t; tmp = 0.0; if (t <= -5.5e+74) tmp = t_2; elseif (t <= -1.28e-179) tmp = t_1; elseif (t <= 3.5e-270) tmp = (b - z) * y; elseif (t <= 2020.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + x), $MachinePrecision] + a), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -5.5e+74], t$95$2, If[LessEqual[t, -1.28e-179], t$95$1, If[LessEqual[t, 3.5e-270], N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t, 2020.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + x\right) + a\\
t_2 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -5.5 \cdot 10^{+74}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.28 \cdot 10^{-179}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{-270}:\\
\;\;\;\;\left(b - z\right) \cdot y\\
\mathbf{elif}\;t \leq 2020:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -5.5000000000000003e74 or 2020 < t Initial program 93.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6469.4
Applied rewrites69.4%
if -5.5000000000000003e74 < t < -1.28000000000000006e-179 or 3.49999999999999994e-270 < t < 2020Initial program 97.9%
Taylor expanded in y around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/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
lower-+.f64N/A
+-commutativeN/A
Applied rewrites72.2%
Taylor expanded in t around 0
Applied rewrites69.2%
Taylor expanded in b around 0
Applied rewrites58.2%
if -1.28000000000000006e-179 < t < 3.49999999999999994e-270Initial program 100.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6451.5
Applied rewrites51.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)))
(if (<= t -8.5e+78)
t_1
(if (<= t 3.2e-31)
(fma 1.0 z (+ (fma (- y 2.0) b x) a))
(if (<= t 1.25e+104) (fma (- 1.0 t) a (+ z 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 <= -8.5e+78) {
tmp = t_1;
} else if (t <= 3.2e-31) {
tmp = fma(1.0, z, (fma((y - 2.0), b, x) + a));
} else if (t <= 1.25e+104) {
tmp = fma((1.0 - t), a, (z + 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 <= -8.5e+78) tmp = t_1; elseif (t <= 3.2e-31) tmp = fma(1.0, z, Float64(fma(Float64(y - 2.0), b, x) + a)); elseif (t <= 1.25e+104) tmp = fma(Float64(1.0 - t), a, Float64(z + 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, -8.5e+78], t$95$1, If[LessEqual[t, 3.2e-31], N[(1.0 * z + N[(N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.25e+104], N[(N[(1.0 - t), $MachinePrecision] * a + N[(z + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -8.5 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{-31}:\\
\;\;\;\;\mathsf{fma}\left(1, z, \mathsf{fma}\left(y - 2, b, x\right) + a\right)\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{+104}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, z + x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -8.50000000000000079e78 or 1.2499999999999999e104 < t Initial program 91.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6476.7
Applied rewrites76.7%
if -8.50000000000000079e78 < t < 3.20000000000000018e-31Initial program 98.5%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
Applied rewrites97.9%
Taylor expanded in y around 0
Applied rewrites80.0%
if 3.20000000000000018e-31 < t < 1.2499999999999999e104Initial program 97.0%
Taylor expanded in y around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/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
lower-+.f64N/A
+-commutativeN/A
Applied rewrites85.3%
Taylor expanded in b around 0
Applied rewrites67.9%
Final simplification77.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -1.5e+43)
(fma (- (+ t y) 2.0) b (* (- z) y))
(if (<= b 6.5e+151)
(fma (- 1.0 t) a (fma (- 1.0 y) z x))
(* (- b) (fma -1.0 (+ t y) 2.0)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.5e+43) {
tmp = fma(((t + y) - 2.0), b, (-z * y));
} else if (b <= 6.5e+151) {
tmp = fma((1.0 - t), a, fma((1.0 - y), z, x));
} else {
tmp = -b * fma(-1.0, (t + y), 2.0);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.5e+43) tmp = fma(Float64(Float64(t + y) - 2.0), b, Float64(Float64(-z) * y)); elseif (b <= 6.5e+151) tmp = fma(Float64(1.0 - t), a, fma(Float64(1.0 - y), z, x)); else tmp = Float64(Float64(-b) * fma(-1.0, Float64(t + y), 2.0)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.5e+43], N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + N[((-z) * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.5e+151], N[(N[(1.0 - t), $MachinePrecision] * a + N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision]), $MachinePrecision], N[((-b) * N[(-1.0 * N[(t + y), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.5 \cdot 10^{+43}:\\
\;\;\;\;\mathsf{fma}\left(\left(t + y\right) - 2, b, \left(-z\right) \cdot y\right)\\
\mathbf{elif}\;b \leq 6.5 \cdot 10^{+151}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(1 - y, z, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(-b\right) \cdot \mathsf{fma}\left(-1, t + y, 2\right)\\
\end{array}
\end{array}
if b < -1.50000000000000008e43Initial program 85.7%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6477.2
Applied rewrites77.2%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6481.3
lift-+.f64N/A
+-commutativeN/A
lower-+.f6481.3
Applied rewrites81.3%
if -1.50000000000000008e43 < b < 6.5000000000000002e151Initial program 99.4%
Taylor expanded in x around 0
Applied rewrites99.4%
Taylor expanded in b around 0
Applied rewrites85.1%
if 6.5000000000000002e151 < b Initial program 92.0%
Taylor expanded in x around 0
Applied rewrites96.0%
Taylor expanded in b around -inf
Applied rewrites88.4%
Final simplification84.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b) (fma -1.0 (+ t y) 2.0))))
(if (<= b -6e+43)
t_1
(if (<= b 6.5e+151) (fma (- 1.0 t) a (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 * fma(-1.0, (t + y), 2.0);
double tmp;
if (b <= -6e+43) {
tmp = t_1;
} else if (b <= 6.5e+151) {
tmp = fma((1.0 - t), a, fma((1.0 - y), z, x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(-b) * fma(-1.0, Float64(t + y), 2.0)) tmp = 0.0 if (b <= -6e+43) tmp = t_1; elseif (b <= 6.5e+151) tmp = fma(Float64(1.0 - t), a, 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[(-1.0 * N[(t + y), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -6e+43], t$95$1, If[LessEqual[b, 6.5e+151], N[(N[(1.0 - t), $MachinePrecision] * a + N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-b\right) \cdot \mathsf{fma}\left(-1, t + y, 2\right)\\
\mathbf{if}\;b \leq -6 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 6.5 \cdot 10^{+151}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(1 - y, z, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -6.00000000000000033e43 or 6.5000000000000002e151 < b Initial program 87.8%
Taylor expanded in x around 0
Applied rewrites94.6%
Taylor expanded in b around -inf
Applied rewrites80.0%
if -6.00000000000000033e43 < b < 6.5000000000000002e151Initial program 99.4%
Taylor expanded in x around 0
Applied rewrites99.4%
Taylor expanded in b around 0
Applied rewrites85.1%
Final simplification83.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)))
(if (<= t -1.3e+76)
t_1
(if (<= t 1.56e+31) (fma (- 1.0 y) z (+ 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 <= -1.3e+76) {
tmp = t_1;
} else if (t <= 1.56e+31) {
tmp = fma((1.0 - y), z, (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 <= -1.3e+76) tmp = t_1; elseif (t <= 1.56e+31) tmp = fma(Float64(1.0 - y), z, 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, -1.3e+76], t$95$1, If[LessEqual[t, 1.56e+31], N[(N[(1.0 - y), $MachinePrecision] * z + 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 -1.3 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.56 \cdot 10^{+31}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, a + x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.3e76 or 1.56000000000000004e31 < t Initial program 92.4%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6472.8
Applied rewrites72.8%
if -1.3e76 < t < 1.56000000000000004e31Initial program 98.7%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
Applied rewrites95.4%
Taylor expanded in b around 0
Applied rewrites69.2%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (- b a) t))) (if (<= t -5.5e+74) t_1 (if (<= t 2020.0) (+ (+ (fma -2.0 b z) x) 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 <= -5.5e+74) {
tmp = t_1;
} else if (t <= 2020.0) {
tmp = (fma(-2.0, b, z) + x) + 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 <= -5.5e+74) tmp = t_1; elseif (t <= 2020.0) tmp = Float64(Float64(fma(-2.0, b, z) + x) + 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, -5.5e+74], t$95$1, If[LessEqual[t, 2020.0], N[(N[(N[(-2.0 * b + z), $MachinePrecision] + x), $MachinePrecision] + a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -5.5 \cdot 10^{+74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2020:\\
\;\;\;\;\left(\mathsf{fma}\left(-2, b, z\right) + x\right) + a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.5000000000000003e74 or 2020 < t Initial program 93.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6469.4
Applied rewrites69.4%
if -5.5000000000000003e74 < t < 2020Initial program 98.6%
Taylor expanded in y around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/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
lower-+.f64N/A
+-commutativeN/A
Applied rewrites64.7%
Taylor expanded in t around 0
Applied rewrites62.8%
(FPCore (x y z t a b) :precision binary64 (if (<= t -9e+127) (* b t) (if (<= t -8e-177) (* 1.0 z) (if (<= t 8.5e-22) (* 1.0 a) (* b t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -9e+127) {
tmp = b * t;
} else if (t <= -8e-177) {
tmp = 1.0 * z;
} else if (t <= 8.5e-22) {
tmp = 1.0 * a;
} 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 <= (-9d+127)) then
tmp = b * t
else if (t <= (-8d-177)) then
tmp = 1.0d0 * z
else if (t <= 8.5d-22) then
tmp = 1.0d0 * a
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 <= -9e+127) {
tmp = b * t;
} else if (t <= -8e-177) {
tmp = 1.0 * z;
} else if (t <= 8.5e-22) {
tmp = 1.0 * a;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -9e+127: tmp = b * t elif t <= -8e-177: tmp = 1.0 * z elif t <= 8.5e-22: tmp = 1.0 * a else: tmp = b * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -9e+127) tmp = Float64(b * t); elseif (t <= -8e-177) tmp = Float64(1.0 * z); elseif (t <= 8.5e-22) tmp = Float64(1.0 * a); else tmp = Float64(b * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -9e+127) tmp = b * t; elseif (t <= -8e-177) tmp = 1.0 * z; elseif (t <= 8.5e-22) tmp = 1.0 * a; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -9e+127], N[(b * t), $MachinePrecision], If[LessEqual[t, -8e-177], N[(1.0 * z), $MachinePrecision], If[LessEqual[t, 8.5e-22], N[(1.0 * a), $MachinePrecision], N[(b * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9 \cdot 10^{+127}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;t \leq -8 \cdot 10^{-177}:\\
\;\;\;\;1 \cdot z\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{-22}:\\
\;\;\;\;1 \cdot a\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if t < -9.00000000000000068e127 or 8.5000000000000001e-22 < t Initial program 92.2%
Taylor expanded in x around 0
Applied rewrites96.1%
Taylor expanded in b around -inf
Applied rewrites41.1%
Taylor expanded in t around inf
Applied rewrites35.7%
if -9.00000000000000068e127 < t < -7.99999999999999962e-177Initial program 96.9%
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
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f6442.3
Applied rewrites42.3%
Taylor expanded in y around 0
Applied rewrites26.6%
if -7.99999999999999962e-177 < t < 8.5000000000000001e-22Initial 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--.f6419.1
Applied rewrites19.1%
Taylor expanded in t around 0
Applied rewrites19.1%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (- b a) t))) (if (<= t -5.5e+74) t_1 (if (<= t 2020.0) (+ (+ z x) 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 <= -5.5e+74) {
tmp = t_1;
} else if (t <= 2020.0) {
tmp = (z + x) + a;
} 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 <= (-5.5d+74)) then
tmp = t_1
else if (t <= 2020.0d0) then
tmp = (z + x) + a
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 <= -5.5e+74) {
tmp = t_1;
} else if (t <= 2020.0) {
tmp = (z + x) + a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (b - a) * t tmp = 0 if t <= -5.5e+74: tmp = t_1 elif t <= 2020.0: tmp = (z + x) + 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 <= -5.5e+74) tmp = t_1; elseif (t <= 2020.0) tmp = Float64(Float64(z + x) + a); 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 <= -5.5e+74) tmp = t_1; elseif (t <= 2020.0) tmp = (z + x) + a; 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, -5.5e+74], t$95$1, If[LessEqual[t, 2020.0], N[(N[(z + x), $MachinePrecision] + a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -5.5 \cdot 10^{+74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2020:\\
\;\;\;\;\left(z + x\right) + a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.5000000000000003e74 or 2020 < t Initial program 93.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6469.4
Applied rewrites69.4%
if -5.5000000000000003e74 < t < 2020Initial program 98.6%
Taylor expanded in y around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/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
lower-+.f64N/A
+-commutativeN/A
Applied rewrites64.7%
Taylor expanded in t around 0
Applied rewrites62.8%
Taylor expanded in b around 0
Applied rewrites50.2%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.05e+128) (* (- a) t) (if (<= t 1.25e+104) (+ (+ z x) a) (* b t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.05e+128) {
tmp = -a * t;
} else if (t <= 1.25e+104) {
tmp = (z + x) + a;
} 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+128)) then
tmp = -a * t
else if (t <= 1.25d+104) then
tmp = (z + x) + a
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+128) {
tmp = -a * t;
} else if (t <= 1.25e+104) {
tmp = (z + x) + a;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.05e+128: tmp = -a * t elif t <= 1.25e+104: tmp = (z + x) + a else: tmp = b * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.05e+128) tmp = Float64(Float64(-a) * t); elseif (t <= 1.25e+104) tmp = Float64(Float64(z + x) + a); 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+128) tmp = -a * t; elseif (t <= 1.25e+104) tmp = (z + x) + a; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.05e+128], N[((-a) * t), $MachinePrecision], If[LessEqual[t, 1.25e+104], N[(N[(z + x), $MachinePrecision] + a), $MachinePrecision], N[(b * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{+128}:\\
\;\;\;\;\left(-a\right) \cdot t\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{+104}:\\
\;\;\;\;\left(z + x\right) + a\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if t < -1.05e128Initial program 94.4%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6475.6
Applied rewrites75.6%
Taylor expanded in a around inf
Applied rewrites54.3%
if -1.05e128 < t < 1.2499999999999999e104Initial program 98.4%
Taylor expanded in y around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/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
lower-+.f64N/A
+-commutativeN/A
Applied rewrites68.8%
Taylor expanded in t around 0
Applied rewrites55.6%
Taylor expanded in b around 0
Applied rewrites45.9%
if 1.2499999999999999e104 < t Initial program 86.1%
Taylor expanded in x around 0
Applied rewrites97.2%
Taylor expanded in b around -inf
Applied rewrites58.1%
Taylor expanded in t around inf
Applied rewrites55.8%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.65e+184) (* b t) (if (<= t 1.25e+104) (+ (+ z x) a) (* b t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.65e+184) {
tmp = b * t;
} else if (t <= 1.25e+104) {
tmp = (z + x) + a;
} 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.65d+184)) then
tmp = b * t
else if (t <= 1.25d+104) then
tmp = (z + x) + a
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.65e+184) {
tmp = b * t;
} else if (t <= 1.25e+104) {
tmp = (z + x) + a;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.65e+184: tmp = b * t elif t <= 1.25e+104: tmp = (z + x) + a else: tmp = b * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.65e+184) tmp = Float64(b * t); elseif (t <= 1.25e+104) tmp = Float64(Float64(z + x) + a); 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.65e+184) tmp = b * t; elseif (t <= 1.25e+104) tmp = (z + x) + a; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.65e+184], N[(b * t), $MachinePrecision], If[LessEqual[t, 1.25e+104], N[(N[(z + x), $MachinePrecision] + a), $MachinePrecision], N[(b * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.65 \cdot 10^{+184}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{+104}:\\
\;\;\;\;\left(z + x\right) + a\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if t < -1.6499999999999999e184 or 1.2499999999999999e104 < t Initial program 89.2%
Taylor expanded in x around 0
Applied rewrites95.4%
Taylor expanded in b around -inf
Applied rewrites47.3%
Taylor expanded in t around inf
Applied rewrites44.3%
if -1.6499999999999999e184 < t < 1.2499999999999999e104Initial program 98.4%
Taylor expanded in y around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/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
lower-+.f64N/A
+-commutativeN/A
Applied rewrites69.4%
Taylor expanded in t around 0
Applied rewrites54.3%
Taylor expanded in b around 0
Applied rewrites44.9%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1e+87) (* b t) (if (<= t 8.5e-22) (* 1.0 a) (* b t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1e+87) {
tmp = b * t;
} else if (t <= 8.5e-22) {
tmp = 1.0 * a;
} 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 <= (-1d+87)) then
tmp = b * t
else if (t <= 8.5d-22) then
tmp = 1.0d0 * a
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 <= -1e+87) {
tmp = b * t;
} else if (t <= 8.5e-22) {
tmp = 1.0 * a;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1e+87: tmp = b * t elif t <= 8.5e-22: tmp = 1.0 * a else: tmp = b * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1e+87) tmp = Float64(b * t); elseif (t <= 8.5e-22) tmp = Float64(1.0 * a); else tmp = Float64(b * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1e+87) tmp = b * t; elseif (t <= 8.5e-22) tmp = 1.0 * a; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1e+87], N[(b * t), $MachinePrecision], If[LessEqual[t, 8.5e-22], N[(1.0 * a), $MachinePrecision], N[(b * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{+87}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{-22}:\\
\;\;\;\;1 \cdot a\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if t < -9.9999999999999996e86 or 8.5000000000000001e-22 < t Initial program 93.0%
Taylor expanded in x around 0
Applied rewrites96.5%
Taylor expanded in b around -inf
Applied rewrites40.0%
Taylor expanded in t around inf
Applied rewrites34.2%
if -9.9999999999999996e86 < t < 8.5000000000000001e-22Initial program 98.6%
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--.f6419.5
Applied rewrites19.5%
Taylor expanded in t around 0
Applied rewrites16.3%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.15e+42) (* b t) (if (<= t 2.0) (* -2.0 b) (* b t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.15e+42) {
tmp = b * t;
} else if (t <= 2.0) {
tmp = -2.0 * b;
} 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.15d+42)) then
tmp = b * t
else if (t <= 2.0d0) then
tmp = (-2.0d0) * b
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.15e+42) {
tmp = b * t;
} else if (t <= 2.0) {
tmp = -2.0 * b;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.15e+42: tmp = b * t elif t <= 2.0: tmp = -2.0 * b else: tmp = b * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.15e+42) tmp = Float64(b * t); elseif (t <= 2.0) tmp = Float64(-2.0 * b); 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.15e+42) tmp = b * t; elseif (t <= 2.0) tmp = -2.0 * b; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.15e+42], N[(b * t), $MachinePrecision], If[LessEqual[t, 2.0], N[(-2.0 * b), $MachinePrecision], N[(b * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{+42}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;t \leq 2:\\
\;\;\;\;-2 \cdot b\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if t < -1.15e42 or 2 < t Initial program 92.7%
Taylor expanded in x around 0
Applied rewrites95.9%
Taylor expanded in b around -inf
Applied rewrites38.9%
Taylor expanded in t around inf
Applied rewrites31.9%
if -1.15e42 < t < 2Initial program 99.2%
Taylor expanded in y around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/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
lower-+.f64N/A
+-commutativeN/A
Applied rewrites64.1%
Taylor expanded in t around 0
Applied rewrites62.7%
Taylor expanded in b around inf
Applied rewrites14.2%
(FPCore (x y z t a b) :precision binary64 (* b t))
double code(double x, double y, double z, double t, double a, double b) {
return b * t;
}
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 = b * t
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return b * t;
}
def code(x, y, z, t, a, b): return b * t
function code(x, y, z, t, a, b) return Float64(b * t) end
function tmp = code(x, y, z, t, a, b) tmp = b * t; end
code[x_, y_, z_, t_, a_, b_] := N[(b * t), $MachinePrecision]
\begin{array}{l}
\\
b \cdot t
\end{array}
Initial program 96.1%
Taylor expanded in x around 0
Applied rewrites98.0%
Taylor expanded in b around -inf
Applied rewrites34.9%
Taylor expanded in t around inf
Applied rewrites16.6%
herbie shell --seed 2024332
(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)))