
(FPCore (x y z t) :precision binary64 (+ x (* (- y z) (- t x))))
double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y - z) * (t - x))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
def code(x, y, z, t): return x + ((y - z) * (t - x))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - z) * Float64(t - x))) end
function tmp = code(x, y, z, t) tmp = x + ((y - z) * (t - x)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \left(t - x\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ x (* (- y z) (- t x))))
double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y - z) * (t - x))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
def code(x, y, z, t): return x + ((y - z) * (t - x))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - z) * Float64(t - x))) end
function tmp = code(x, y, z, t) tmp = x + ((y - z) * (t - x)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \left(t - x\right)
\end{array}
(FPCore (x y z t) :precision binary64 (fma (- y z) (- t x) x))
double code(double x, double y, double z, double t) {
return fma((y - z), (t - x), x);
}
function code(x, y, z, t) return fma(Float64(y - z), Float64(t - x), x) end
code[x_, y_, z_, t_] := N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y - z, t - x, x\right)
\end{array}
Initial program 100.0%
+-commutative100.0%
fma-define100.0%
Simplified100.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- t))) (t_2 (* x (+ z 1.0))) (t_3 (* y (- x))))
(if (<= y -3.9e+204)
(* y t)
(if (<= y -6.8e+76)
t_3
(if (<= y -3e+29)
t_1
(if (<= y 9e-297)
t_2
(if (<= y 2.9e-77)
t_1
(if (<= y 3.6e+53) t_2 (if (<= y 2.9e+118) t_3 (* y t))))))))))
double code(double x, double y, double z, double t) {
double t_1 = z * -t;
double t_2 = x * (z + 1.0);
double t_3 = y * -x;
double tmp;
if (y <= -3.9e+204) {
tmp = y * t;
} else if (y <= -6.8e+76) {
tmp = t_3;
} else if (y <= -3e+29) {
tmp = t_1;
} else if (y <= 9e-297) {
tmp = t_2;
} else if (y <= 2.9e-77) {
tmp = t_1;
} else if (y <= 3.6e+53) {
tmp = t_2;
} else if (y <= 2.9e+118) {
tmp = t_3;
} else {
tmp = y * t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = z * -t
t_2 = x * (z + 1.0d0)
t_3 = y * -x
if (y <= (-3.9d+204)) then
tmp = y * t
else if (y <= (-6.8d+76)) then
tmp = t_3
else if (y <= (-3d+29)) then
tmp = t_1
else if (y <= 9d-297) then
tmp = t_2
else if (y <= 2.9d-77) then
tmp = t_1
else if (y <= 3.6d+53) then
tmp = t_2
else if (y <= 2.9d+118) then
tmp = t_3
else
tmp = y * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = z * -t;
double t_2 = x * (z + 1.0);
double t_3 = y * -x;
double tmp;
if (y <= -3.9e+204) {
tmp = y * t;
} else if (y <= -6.8e+76) {
tmp = t_3;
} else if (y <= -3e+29) {
tmp = t_1;
} else if (y <= 9e-297) {
tmp = t_2;
} else if (y <= 2.9e-77) {
tmp = t_1;
} else if (y <= 3.6e+53) {
tmp = t_2;
} else if (y <= 2.9e+118) {
tmp = t_3;
} else {
tmp = y * t;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * -t t_2 = x * (z + 1.0) t_3 = y * -x tmp = 0 if y <= -3.9e+204: tmp = y * t elif y <= -6.8e+76: tmp = t_3 elif y <= -3e+29: tmp = t_1 elif y <= 9e-297: tmp = t_2 elif y <= 2.9e-77: tmp = t_1 elif y <= 3.6e+53: tmp = t_2 elif y <= 2.9e+118: tmp = t_3 else: tmp = y * t return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(-t)) t_2 = Float64(x * Float64(z + 1.0)) t_3 = Float64(y * Float64(-x)) tmp = 0.0 if (y <= -3.9e+204) tmp = Float64(y * t); elseif (y <= -6.8e+76) tmp = t_3; elseif (y <= -3e+29) tmp = t_1; elseif (y <= 9e-297) tmp = t_2; elseif (y <= 2.9e-77) tmp = t_1; elseif (y <= 3.6e+53) tmp = t_2; elseif (y <= 2.9e+118) tmp = t_3; else tmp = Float64(y * t); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * -t; t_2 = x * (z + 1.0); t_3 = y * -x; tmp = 0.0; if (y <= -3.9e+204) tmp = y * t; elseif (y <= -6.8e+76) tmp = t_3; elseif (y <= -3e+29) tmp = t_1; elseif (y <= 9e-297) tmp = t_2; elseif (y <= 2.9e-77) tmp = t_1; elseif (y <= 3.6e+53) tmp = t_2; elseif (y <= 2.9e+118) tmp = t_3; else tmp = y * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * (-t)), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y * (-x)), $MachinePrecision]}, If[LessEqual[y, -3.9e+204], N[(y * t), $MachinePrecision], If[LessEqual[y, -6.8e+76], t$95$3, If[LessEqual[y, -3e+29], t$95$1, If[LessEqual[y, 9e-297], t$95$2, If[LessEqual[y, 2.9e-77], t$95$1, If[LessEqual[y, 3.6e+53], t$95$2, If[LessEqual[y, 2.9e+118], t$95$3, N[(y * t), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(-t\right)\\
t_2 := x \cdot \left(z + 1\right)\\
t_3 := y \cdot \left(-x\right)\\
\mathbf{if}\;y \leq -3.9 \cdot 10^{+204}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;y \leq -6.8 \cdot 10^{+76}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq -3 \cdot 10^{+29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 9 \cdot 10^{-297}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{-77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{+53}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{+118}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;y \cdot t\\
\end{array}
\end{array}
if y < -3.90000000000000017e204 or 2.90000000000000016e118 < y Initial program 100.0%
Taylor expanded in y around inf 87.1%
associate--l+87.1%
+-commutative87.1%
mul-1-neg87.1%
unsub-neg87.1%
div-sub87.1%
unsub-neg87.1%
mul-1-neg87.1%
mul-1-neg87.1%
distribute-rgt-neg-in87.1%
sub-neg87.1%
+-commutative87.1%
distribute-neg-in87.1%
remove-double-neg87.1%
sub-neg87.1%
Simplified87.1%
Taylor expanded in t around inf 63.8%
neg-mul-163.8%
sub-neg63.8%
Simplified63.8%
Taylor expanded in z around 0 57.6%
if -3.90000000000000017e204 < y < -6.7999999999999994e76 or 3.6e53 < y < 2.90000000000000016e118Initial program 100.0%
Taylor expanded in x around inf 72.7%
mul-1-neg72.7%
unsub-neg72.7%
Simplified72.7%
Taylor expanded in y around inf 66.8%
mul-1-neg66.8%
Simplified66.8%
if -6.7999999999999994e76 < y < -2.9999999999999999e29 or 8.99999999999999951e-297 < y < 2.8999999999999999e-77Initial program 99.9%
Taylor expanded in y around inf 68.6%
associate--l+68.6%
+-commutative68.6%
mul-1-neg68.6%
unsub-neg68.6%
div-sub73.0%
unsub-neg73.0%
mul-1-neg73.0%
mul-1-neg73.0%
distribute-rgt-neg-in73.0%
sub-neg73.0%
+-commutative73.0%
distribute-neg-in73.0%
remove-double-neg73.0%
sub-neg73.0%
Simplified73.0%
Taylor expanded in t around inf 46.8%
neg-mul-146.8%
sub-neg46.8%
Simplified46.8%
Taylor expanded in y around 0 58.2%
associate-*r*58.2%
mul-1-neg58.2%
Simplified58.2%
if -2.9999999999999999e29 < y < 8.99999999999999951e-297 or 2.8999999999999999e-77 < y < 3.6e53Initial program 99.9%
Taylor expanded in x around inf 65.0%
mul-1-neg65.0%
unsub-neg65.0%
Simplified65.0%
Taylor expanded in y around 0 60.0%
+-commutative60.0%
Simplified60.0%
Final simplification59.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (- t x))) (t_2 (* x (+ z 1.0))))
(if (<= y -28500.0)
t_1
(if (<= y 8.2e-297)
t_2
(if (<= y 6.2e-77) (* z (- t)) (if (<= y 470000000000.0) t_2 t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (t - x);
double t_2 = x * (z + 1.0);
double tmp;
if (y <= -28500.0) {
tmp = t_1;
} else if (y <= 8.2e-297) {
tmp = t_2;
} else if (y <= 6.2e-77) {
tmp = z * -t;
} else if (y <= 470000000000.0) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y * (t - x)
t_2 = x * (z + 1.0d0)
if (y <= (-28500.0d0)) then
tmp = t_1
else if (y <= 8.2d-297) then
tmp = t_2
else if (y <= 6.2d-77) then
tmp = z * -t
else if (y <= 470000000000.0d0) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * (t - x);
double t_2 = x * (z + 1.0);
double tmp;
if (y <= -28500.0) {
tmp = t_1;
} else if (y <= 8.2e-297) {
tmp = t_2;
} else if (y <= 6.2e-77) {
tmp = z * -t;
} else if (y <= 470000000000.0) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (t - x) t_2 = x * (z + 1.0) tmp = 0 if y <= -28500.0: tmp = t_1 elif y <= 8.2e-297: tmp = t_2 elif y <= 6.2e-77: tmp = z * -t elif y <= 470000000000.0: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(t - x)) t_2 = Float64(x * Float64(z + 1.0)) tmp = 0.0 if (y <= -28500.0) tmp = t_1; elseif (y <= 8.2e-297) tmp = t_2; elseif (y <= 6.2e-77) tmp = Float64(z * Float64(-t)); elseif (y <= 470000000000.0) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (t - x); t_2 = x * (z + 1.0); tmp = 0.0; if (y <= -28500.0) tmp = t_1; elseif (y <= 8.2e-297) tmp = t_2; elseif (y <= 6.2e-77) tmp = z * -t; elseif (y <= 470000000000.0) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -28500.0], t$95$1, If[LessEqual[y, 8.2e-297], t$95$2, If[LessEqual[y, 6.2e-77], N[(z * (-t)), $MachinePrecision], If[LessEqual[y, 470000000000.0], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(t - x\right)\\
t_2 := x \cdot \left(z + 1\right)\\
\mathbf{if}\;y \leq -28500:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{-297}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-77}:\\
\;\;\;\;z \cdot \left(-t\right)\\
\mathbf{elif}\;y \leq 470000000000:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -28500 or 4.7e11 < y Initial program 100.0%
Taylor expanded in y around inf 91.7%
associate--l+91.7%
+-commutative91.7%
mul-1-neg91.7%
unsub-neg91.7%
div-sub91.7%
unsub-neg91.7%
mul-1-neg91.7%
mul-1-neg91.7%
distribute-rgt-neg-in91.7%
sub-neg91.7%
+-commutative91.7%
distribute-neg-in91.7%
remove-double-neg91.7%
sub-neg91.7%
Simplified91.7%
Taylor expanded in y around inf 81.6%
if -28500 < y < 8.2000000000000004e-297 or 6.20000000000000016e-77 < y < 4.7e11Initial program 99.9%
Taylor expanded in x around inf 65.0%
mul-1-neg65.0%
unsub-neg65.0%
Simplified65.0%
Taylor expanded in y around 0 63.9%
+-commutative63.9%
Simplified63.9%
if 8.2000000000000004e-297 < y < 6.20000000000000016e-77Initial program 99.9%
Taylor expanded in y around inf 62.5%
associate--l+62.5%
+-commutative62.5%
mul-1-neg62.5%
unsub-neg62.5%
div-sub67.6%
unsub-neg67.6%
mul-1-neg67.6%
mul-1-neg67.6%
distribute-rgt-neg-in67.6%
sub-neg67.6%
+-commutative67.6%
distribute-neg-in67.6%
remove-double-neg67.6%
sub-neg67.6%
Simplified67.6%
Taylor expanded in t around inf 39.0%
neg-mul-139.0%
sub-neg39.0%
Simplified39.0%
Taylor expanded in y around 0 57.9%
associate-*r*57.9%
mul-1-neg57.9%
Simplified57.9%
Final simplification70.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (- t x))))
(if (<= y -5.8e+27)
t_1
(if (<= y -3.5e-63)
(* x (+ (- z y) 1.0))
(if (<= y 5500000000.0) (- x (* z t)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = y * (t - x);
double tmp;
if (y <= -5.8e+27) {
tmp = t_1;
} else if (y <= -3.5e-63) {
tmp = x * ((z - y) + 1.0);
} else if (y <= 5500000000.0) {
tmp = x - (z * t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = y * (t - x)
if (y <= (-5.8d+27)) then
tmp = t_1
else if (y <= (-3.5d-63)) then
tmp = x * ((z - y) + 1.0d0)
else if (y <= 5500000000.0d0) then
tmp = x - (z * t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * (t - x);
double tmp;
if (y <= -5.8e+27) {
tmp = t_1;
} else if (y <= -3.5e-63) {
tmp = x * ((z - y) + 1.0);
} else if (y <= 5500000000.0) {
tmp = x - (z * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (t - x) tmp = 0 if y <= -5.8e+27: tmp = t_1 elif y <= -3.5e-63: tmp = x * ((z - y) + 1.0) elif y <= 5500000000.0: tmp = x - (z * t) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(t - x)) tmp = 0.0 if (y <= -5.8e+27) tmp = t_1; elseif (y <= -3.5e-63) tmp = Float64(x * Float64(Float64(z - y) + 1.0)); elseif (y <= 5500000000.0) tmp = Float64(x - Float64(z * t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (t - x); tmp = 0.0; if (y <= -5.8e+27) tmp = t_1; elseif (y <= -3.5e-63) tmp = x * ((z - y) + 1.0); elseif (y <= 5500000000.0) tmp = x - (z * t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.8e+27], t$95$1, If[LessEqual[y, -3.5e-63], N[(x * N[(N[(z - y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5500000000.0], N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(t - x\right)\\
\mathbf{if}\;y \leq -5.8 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.5 \cdot 10^{-63}:\\
\;\;\;\;x \cdot \left(\left(z - y\right) + 1\right)\\
\mathbf{elif}\;y \leq 5500000000:\\
\;\;\;\;x - z \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.8000000000000002e27 or 5.5e9 < y Initial program 100.0%
Taylor expanded in y around inf 91.2%
associate--l+91.2%
+-commutative91.2%
mul-1-neg91.2%
unsub-neg91.2%
div-sub91.2%
unsub-neg91.2%
mul-1-neg91.2%
mul-1-neg91.2%
distribute-rgt-neg-in91.2%
sub-neg91.2%
+-commutative91.2%
distribute-neg-in91.2%
remove-double-neg91.2%
sub-neg91.2%
Simplified91.2%
Taylor expanded in y around inf 83.6%
if -5.8000000000000002e27 < y < -3.50000000000000003e-63Initial program 100.0%
Taylor expanded in x around inf 85.1%
mul-1-neg85.1%
unsub-neg85.1%
Simplified85.1%
if -3.50000000000000003e-63 < y < 5.5e9Initial program 99.9%
Taylor expanded in t around inf 83.6%
Taylor expanded in y around 0 74.2%
mul-1-neg74.2%
unsub-neg74.2%
Simplified74.2%
Final simplification79.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (- t x))))
(if (<= y -1.4e+70)
t_1
(if (<= y -2.65e-114)
(* z (- x t))
(if (<= y 7500000000.0) (- x (* z t)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = y * (t - x);
double tmp;
if (y <= -1.4e+70) {
tmp = t_1;
} else if (y <= -2.65e-114) {
tmp = z * (x - t);
} else if (y <= 7500000000.0) {
tmp = x - (z * t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = y * (t - x)
if (y <= (-1.4d+70)) then
tmp = t_1
else if (y <= (-2.65d-114)) then
tmp = z * (x - t)
else if (y <= 7500000000.0d0) then
tmp = x - (z * t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * (t - x);
double tmp;
if (y <= -1.4e+70) {
tmp = t_1;
} else if (y <= -2.65e-114) {
tmp = z * (x - t);
} else if (y <= 7500000000.0) {
tmp = x - (z * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (t - x) tmp = 0 if y <= -1.4e+70: tmp = t_1 elif y <= -2.65e-114: tmp = z * (x - t) elif y <= 7500000000.0: tmp = x - (z * t) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(t - x)) tmp = 0.0 if (y <= -1.4e+70) tmp = t_1; elseif (y <= -2.65e-114) tmp = Float64(z * Float64(x - t)); elseif (y <= 7500000000.0) tmp = Float64(x - Float64(z * t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (t - x); tmp = 0.0; if (y <= -1.4e+70) tmp = t_1; elseif (y <= -2.65e-114) tmp = z * (x - t); elseif (y <= 7500000000.0) tmp = x - (z * t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.4e+70], t$95$1, If[LessEqual[y, -2.65e-114], N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7500000000.0], N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(t - x\right)\\
\mathbf{if}\;y \leq -1.4 \cdot 10^{+70}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.65 \cdot 10^{-114}:\\
\;\;\;\;z \cdot \left(x - t\right)\\
\mathbf{elif}\;y \leq 7500000000:\\
\;\;\;\;x - z \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.39999999999999995e70 or 7.5e9 < y Initial program 100.0%
Taylor expanded in y around inf 90.2%
associate--l+90.2%
+-commutative90.2%
mul-1-neg90.2%
unsub-neg90.2%
div-sub90.2%
unsub-neg90.2%
mul-1-neg90.2%
mul-1-neg90.2%
distribute-rgt-neg-in90.2%
sub-neg90.2%
+-commutative90.2%
distribute-neg-in90.2%
remove-double-neg90.2%
sub-neg90.2%
Simplified90.2%
Taylor expanded in y around inf 89.1%
if -1.39999999999999995e70 < y < -2.64999999999999986e-114Initial program 100.0%
Taylor expanded in y around 0 69.5%
mul-1-neg69.5%
unsub-neg69.5%
Simplified69.5%
Taylor expanded in z around inf 55.9%
if -2.64999999999999986e-114 < y < 7.5e9Initial program 99.9%
Taylor expanded in t around inf 84.1%
Taylor expanded in y around 0 75.9%
mul-1-neg75.9%
unsub-neg75.9%
Simplified75.9%
Final simplification78.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (- t x))))
(if (<= y -850.0)
t_1
(if (<= y 3e-297)
(* x (+ z 1.0))
(if (<= y 12500000000.0) (* z (- x t)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = y * (t - x);
double tmp;
if (y <= -850.0) {
tmp = t_1;
} else if (y <= 3e-297) {
tmp = x * (z + 1.0);
} else if (y <= 12500000000.0) {
tmp = z * (x - t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = y * (t - x)
if (y <= (-850.0d0)) then
tmp = t_1
else if (y <= 3d-297) then
tmp = x * (z + 1.0d0)
else if (y <= 12500000000.0d0) then
tmp = z * (x - t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * (t - x);
double tmp;
if (y <= -850.0) {
tmp = t_1;
} else if (y <= 3e-297) {
tmp = x * (z + 1.0);
} else if (y <= 12500000000.0) {
tmp = z * (x - t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (t - x) tmp = 0 if y <= -850.0: tmp = t_1 elif y <= 3e-297: tmp = x * (z + 1.0) elif y <= 12500000000.0: tmp = z * (x - t) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(t - x)) tmp = 0.0 if (y <= -850.0) tmp = t_1; elseif (y <= 3e-297) tmp = Float64(x * Float64(z + 1.0)); elseif (y <= 12500000000.0) tmp = Float64(z * Float64(x - t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (t - x); tmp = 0.0; if (y <= -850.0) tmp = t_1; elseif (y <= 3e-297) tmp = x * (z + 1.0); elseif (y <= 12500000000.0) tmp = z * (x - t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -850.0], t$95$1, If[LessEqual[y, 3e-297], N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 12500000000.0], N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(t - x\right)\\
\mathbf{if}\;y \leq -850:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-297}:\\
\;\;\;\;x \cdot \left(z + 1\right)\\
\mathbf{elif}\;y \leq 12500000000:\\
\;\;\;\;z \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -850 or 1.25e10 < y Initial program 100.0%
Taylor expanded in y around inf 91.7%
associate--l+91.7%
+-commutative91.7%
mul-1-neg91.7%
unsub-neg91.7%
div-sub91.7%
unsub-neg91.7%
mul-1-neg91.7%
mul-1-neg91.7%
distribute-rgt-neg-in91.7%
sub-neg91.7%
+-commutative91.7%
distribute-neg-in91.7%
remove-double-neg91.7%
sub-neg91.7%
Simplified91.7%
Taylor expanded in y around inf 81.6%
if -850 < y < 2.99999999999999995e-297Initial program 100.0%
Taylor expanded in x around inf 66.7%
mul-1-neg66.7%
unsub-neg66.7%
Simplified66.7%
Taylor expanded in y around 0 66.7%
+-commutative66.7%
Simplified66.7%
if 2.99999999999999995e-297 < y < 1.25e10Initial program 99.9%
Taylor expanded in y around 0 90.1%
mul-1-neg90.1%
unsub-neg90.1%
Simplified90.1%
Taylor expanded in z around inf 66.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- t))))
(if (<= z -4.6e+65)
t_1
(if (<= z -4.2e-54) (* y t) (if (<= z 7e+57) (* x (- 1.0 y)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = z * -t;
double tmp;
if (z <= -4.6e+65) {
tmp = t_1;
} else if (z <= -4.2e-54) {
tmp = y * t;
} else if (z <= 7e+57) {
tmp = x * (1.0 - y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = z * -t
if (z <= (-4.6d+65)) then
tmp = t_1
else if (z <= (-4.2d-54)) then
tmp = y * t
else if (z <= 7d+57) then
tmp = x * (1.0d0 - y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = z * -t;
double tmp;
if (z <= -4.6e+65) {
tmp = t_1;
} else if (z <= -4.2e-54) {
tmp = y * t;
} else if (z <= 7e+57) {
tmp = x * (1.0 - y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * -t tmp = 0 if z <= -4.6e+65: tmp = t_1 elif z <= -4.2e-54: tmp = y * t elif z <= 7e+57: tmp = x * (1.0 - y) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(-t)) tmp = 0.0 if (z <= -4.6e+65) tmp = t_1; elseif (z <= -4.2e-54) tmp = Float64(y * t); elseif (z <= 7e+57) tmp = Float64(x * Float64(1.0 - y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * -t; tmp = 0.0; if (z <= -4.6e+65) tmp = t_1; elseif (z <= -4.2e-54) tmp = y * t; elseif (z <= 7e+57) tmp = x * (1.0 - y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * (-t)), $MachinePrecision]}, If[LessEqual[z, -4.6e+65], t$95$1, If[LessEqual[z, -4.2e-54], N[(y * t), $MachinePrecision], If[LessEqual[z, 7e+57], N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(-t\right)\\
\mathbf{if}\;z \leq -4.6 \cdot 10^{+65}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4.2 \cdot 10^{-54}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+57}:\\
\;\;\;\;x \cdot \left(1 - y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.6e65 or 6.9999999999999995e57 < z Initial program 100.0%
Taylor expanded in y around inf 73.8%
associate--l+73.8%
+-commutative73.8%
mul-1-neg73.8%
unsub-neg73.8%
div-sub77.4%
unsub-neg77.4%
mul-1-neg77.4%
mul-1-neg77.4%
distribute-rgt-neg-in77.4%
sub-neg77.4%
+-commutative77.4%
distribute-neg-in77.4%
remove-double-neg77.4%
sub-neg77.4%
Simplified77.4%
Taylor expanded in t around inf 50.1%
neg-mul-150.1%
sub-neg50.1%
Simplified50.1%
Taylor expanded in y around 0 51.4%
associate-*r*51.4%
mul-1-neg51.4%
Simplified51.4%
if -4.6e65 < z < -4.2e-54Initial program 100.0%
Taylor expanded in y around inf 76.7%
associate--l+76.7%
+-commutative76.7%
mul-1-neg76.7%
unsub-neg76.7%
div-sub81.8%
unsub-neg81.8%
mul-1-neg81.8%
mul-1-neg81.8%
distribute-rgt-neg-in81.8%
sub-neg81.8%
+-commutative81.8%
distribute-neg-in81.8%
remove-double-neg81.8%
sub-neg81.8%
Simplified81.8%
Taylor expanded in t around inf 58.8%
neg-mul-158.8%
sub-neg58.8%
Simplified58.8%
Taylor expanded in z around 0 58.3%
if -4.2e-54 < z < 6.9999999999999995e57Initial program 99.9%
Taylor expanded in x around inf 60.9%
mul-1-neg60.9%
unsub-neg60.9%
Simplified60.9%
Taylor expanded in z around 0 58.3%
Final simplification55.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- t))))
(if (<= z -3.4e+60)
t_1
(if (<= z 3.8e-276) (* y t) (if (<= z 2.5e-23) x t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = z * -t;
double tmp;
if (z <= -3.4e+60) {
tmp = t_1;
} else if (z <= 3.8e-276) {
tmp = y * t;
} else if (z <= 2.5e-23) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = z * -t
if (z <= (-3.4d+60)) then
tmp = t_1
else if (z <= 3.8d-276) then
tmp = y * t
else if (z <= 2.5d-23) then
tmp = x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = z * -t;
double tmp;
if (z <= -3.4e+60) {
tmp = t_1;
} else if (z <= 3.8e-276) {
tmp = y * t;
} else if (z <= 2.5e-23) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * -t tmp = 0 if z <= -3.4e+60: tmp = t_1 elif z <= 3.8e-276: tmp = y * t elif z <= 2.5e-23: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(-t)) tmp = 0.0 if (z <= -3.4e+60) tmp = t_1; elseif (z <= 3.8e-276) tmp = Float64(y * t); elseif (z <= 2.5e-23) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * -t; tmp = 0.0; if (z <= -3.4e+60) tmp = t_1; elseif (z <= 3.8e-276) tmp = y * t; elseif (z <= 2.5e-23) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * (-t)), $MachinePrecision]}, If[LessEqual[z, -3.4e+60], t$95$1, If[LessEqual[z, 3.8e-276], N[(y * t), $MachinePrecision], If[LessEqual[z, 2.5e-23], x, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(-t\right)\\
\mathbf{if}\;z \leq -3.4 \cdot 10^{+60}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-276}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-23}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.4e60 or 2.5000000000000001e-23 < z Initial program 100.0%
Taylor expanded in y around inf 75.2%
associate--l+75.2%
+-commutative75.2%
mul-1-neg75.2%
unsub-neg75.2%
div-sub78.5%
unsub-neg78.5%
mul-1-neg78.5%
mul-1-neg78.5%
distribute-rgt-neg-in78.5%
sub-neg78.5%
+-commutative78.5%
distribute-neg-in78.5%
remove-double-neg78.5%
sub-neg78.5%
Simplified78.5%
Taylor expanded in t around inf 48.0%
neg-mul-148.0%
sub-neg48.0%
Simplified48.0%
Taylor expanded in y around 0 48.2%
associate-*r*48.2%
mul-1-neg48.2%
Simplified48.2%
if -3.4e60 < z < 3.8e-276Initial program 100.0%
Taylor expanded in y around inf 83.8%
associate--l+83.8%
+-commutative83.8%
mul-1-neg83.8%
unsub-neg83.8%
div-sub85.4%
unsub-neg85.4%
mul-1-neg85.4%
mul-1-neg85.4%
distribute-rgt-neg-in85.4%
sub-neg85.4%
+-commutative85.4%
distribute-neg-in85.4%
remove-double-neg85.4%
sub-neg85.4%
Simplified85.4%
Taylor expanded in t around inf 49.1%
neg-mul-149.1%
sub-neg49.1%
Simplified49.1%
Taylor expanded in z around 0 46.2%
if 3.8e-276 < z < 2.5000000000000001e-23Initial program 99.9%
Taylor expanded in t around inf 77.7%
Taylor expanded in x around inf 46.7%
Final simplification47.3%
(FPCore (x y z t) :precision binary64 (if (<= z -5.8e+51) (* z x) (if (<= z 5.1e-276) (* y t) (if (<= z 6.5e-14) x (* z x)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -5.8e+51) {
tmp = z * x;
} else if (z <= 5.1e-276) {
tmp = y * t;
} else if (z <= 6.5e-14) {
tmp = x;
} else {
tmp = z * x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-5.8d+51)) then
tmp = z * x
else if (z <= 5.1d-276) then
tmp = y * t
else if (z <= 6.5d-14) then
tmp = x
else
tmp = z * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -5.8e+51) {
tmp = z * x;
} else if (z <= 5.1e-276) {
tmp = y * t;
} else if (z <= 6.5e-14) {
tmp = x;
} else {
tmp = z * x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -5.8e+51: tmp = z * x elif z <= 5.1e-276: tmp = y * t elif z <= 6.5e-14: tmp = x else: tmp = z * x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -5.8e+51) tmp = Float64(z * x); elseif (z <= 5.1e-276) tmp = Float64(y * t); elseif (z <= 6.5e-14) tmp = x; else tmp = Float64(z * x); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -5.8e+51) tmp = z * x; elseif (z <= 5.1e-276) tmp = y * t; elseif (z <= 6.5e-14) tmp = x; else tmp = z * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -5.8e+51], N[(z * x), $MachinePrecision], If[LessEqual[z, 5.1e-276], N[(y * t), $MachinePrecision], If[LessEqual[z, 6.5e-14], x, N[(z * x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{+51}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;z \leq 5.1 \cdot 10^{-276}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-14}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;z \cdot x\\
\end{array}
\end{array}
if z < -5.7999999999999997e51 or 6.5000000000000001e-14 < z Initial program 100.0%
Taylor expanded in x around inf 50.1%
mul-1-neg50.1%
unsub-neg50.1%
Simplified50.1%
Taylor expanded in z around inf 35.5%
if -5.7999999999999997e51 < z < 5.09999999999999968e-276Initial program 100.0%
Taylor expanded in y around inf 84.7%
associate--l+84.7%
+-commutative84.7%
mul-1-neg84.7%
unsub-neg84.7%
div-sub85.1%
unsub-neg85.1%
mul-1-neg85.1%
mul-1-neg85.1%
distribute-rgt-neg-in85.1%
sub-neg85.1%
+-commutative85.1%
distribute-neg-in85.1%
remove-double-neg85.1%
sub-neg85.1%
Simplified85.1%
Taylor expanded in t around inf 49.0%
neg-mul-149.0%
sub-neg49.0%
Simplified49.0%
Taylor expanded in z around 0 46.0%
if 5.09999999999999968e-276 < z < 6.5000000000000001e-14Initial program 99.9%
Taylor expanded in t around inf 77.7%
Taylor expanded in x around inf 46.7%
Final simplification41.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.3e+70) (not (<= y 1.08e+15))) (* y (- t x)) (+ x (* z (- x t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.3e+70) || !(y <= 1.08e+15)) {
tmp = y * (t - x);
} else {
tmp = x + (z * (x - t));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.3d+70)) .or. (.not. (y <= 1.08d+15))) then
tmp = y * (t - x)
else
tmp = x + (z * (x - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.3e+70) || !(y <= 1.08e+15)) {
tmp = y * (t - x);
} else {
tmp = x + (z * (x - t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.3e+70) or not (y <= 1.08e+15): tmp = y * (t - x) else: tmp = x + (z * (x - t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.3e+70) || !(y <= 1.08e+15)) tmp = Float64(y * Float64(t - x)); else tmp = Float64(x + Float64(z * Float64(x - t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.3e+70) || ~((y <= 1.08e+15))) tmp = y * (t - x); else tmp = x + (z * (x - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.3e+70], N[Not[LessEqual[y, 1.08e+15]], $MachinePrecision]], N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{+70} \lor \neg \left(y \leq 1.08 \cdot 10^{+15}\right):\\
\;\;\;\;y \cdot \left(t - x\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(x - t\right)\\
\end{array}
\end{array}
if y < -1.3e70 or 1.08e15 < y Initial program 100.0%
Taylor expanded in y around inf 90.2%
associate--l+90.2%
+-commutative90.2%
mul-1-neg90.2%
unsub-neg90.2%
div-sub90.2%
unsub-neg90.2%
mul-1-neg90.2%
mul-1-neg90.2%
distribute-rgt-neg-in90.2%
sub-neg90.2%
+-commutative90.2%
distribute-neg-in90.2%
remove-double-neg90.2%
sub-neg90.2%
Simplified90.2%
Taylor expanded in y around inf 89.1%
if -1.3e70 < y < 1.08e15Initial program 99.9%
Taylor expanded in y around 0 85.8%
mul-1-neg85.8%
unsub-neg85.8%
Simplified85.8%
Final simplification87.1%
(FPCore (x y z t) :precision binary64 (if (or (<= t -2.22e-100) (not (<= t 4.9e-54))) (- x (* t (- z y))) (* x (+ (- z y) 1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2.22e-100) || !(t <= 4.9e-54)) {
tmp = x - (t * (z - y));
} else {
tmp = x * ((z - y) + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-2.22d-100)) .or. (.not. (t <= 4.9d-54))) then
tmp = x - (t * (z - y))
else
tmp = x * ((z - y) + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2.22e-100) || !(t <= 4.9e-54)) {
tmp = x - (t * (z - y));
} else {
tmp = x * ((z - y) + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -2.22e-100) or not (t <= 4.9e-54): tmp = x - (t * (z - y)) else: tmp = x * ((z - y) + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -2.22e-100) || !(t <= 4.9e-54)) tmp = Float64(x - Float64(t * Float64(z - y))); else tmp = Float64(x * Float64(Float64(z - y) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -2.22e-100) || ~((t <= 4.9e-54))) tmp = x - (t * (z - y)); else tmp = x * ((z - y) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -2.22e-100], N[Not[LessEqual[t, 4.9e-54]], $MachinePrecision]], N[(x - N[(t * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(z - y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.22 \cdot 10^{-100} \lor \neg \left(t \leq 4.9 \cdot 10^{-54}\right):\\
\;\;\;\;x - t \cdot \left(z - y\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\left(z - y\right) + 1\right)\\
\end{array}
\end{array}
if t < -2.2199999999999999e-100 or 4.90000000000000021e-54 < t Initial program 100.0%
Taylor expanded in t around inf 84.6%
if -2.2199999999999999e-100 < t < 4.90000000000000021e-54Initial program 99.9%
Taylor expanded in x around inf 87.0%
mul-1-neg87.0%
unsub-neg87.0%
Simplified87.0%
Final simplification85.5%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.02e+51) (not (<= z 4e+44))) (* z (- x t)) (+ x (* y (- t x)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.02e+51) || !(z <= 4e+44)) {
tmp = z * (x - t);
} else {
tmp = x + (y * (t - x));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-1.02d+51)) .or. (.not. (z <= 4d+44))) then
tmp = z * (x - t)
else
tmp = x + (y * (t - x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.02e+51) || !(z <= 4e+44)) {
tmp = z * (x - t);
} else {
tmp = x + (y * (t - x));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.02e+51) or not (z <= 4e+44): tmp = z * (x - t) else: tmp = x + (y * (t - x)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.02e+51) || !(z <= 4e+44)) tmp = Float64(z * Float64(x - t)); else tmp = Float64(x + Float64(y * Float64(t - x))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.02e+51) || ~((z <= 4e+44))) tmp = z * (x - t); else tmp = x + (y * (t - x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.02e+51], N[Not[LessEqual[z, 4e+44]], $MachinePrecision]], N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.02 \cdot 10^{+51} \lor \neg \left(z \leq 4 \cdot 10^{+44}\right):\\
\;\;\;\;z \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(t - x\right)\\
\end{array}
\end{array}
if z < -1.02e51 or 4.0000000000000004e44 < z Initial program 100.0%
Taylor expanded in y around 0 81.6%
mul-1-neg81.6%
unsub-neg81.6%
Simplified81.6%
Taylor expanded in z around inf 81.6%
if -1.02e51 < z < 4.0000000000000004e44Initial program 99.9%
Taylor expanded in y around inf 88.6%
*-commutative88.6%
Simplified88.6%
Final simplification85.5%
(FPCore (x y z t) :precision binary64 (if (or (<= z -6e+50) (not (<= z 6.5e-14))) (* z (- x t)) (+ x (* y t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -6e+50) || !(z <= 6.5e-14)) {
tmp = z * (x - t);
} else {
tmp = x + (y * t);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-6d+50)) .or. (.not. (z <= 6.5d-14))) then
tmp = z * (x - t)
else
tmp = x + (y * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -6e+50) || !(z <= 6.5e-14)) {
tmp = z * (x - t);
} else {
tmp = x + (y * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -6e+50) or not (z <= 6.5e-14): tmp = z * (x - t) else: tmp = x + (y * t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -6e+50) || !(z <= 6.5e-14)) tmp = Float64(z * Float64(x - t)); else tmp = Float64(x + Float64(y * t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -6e+50) || ~((z <= 6.5e-14))) tmp = z * (x - t); else tmp = x + (y * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -6e+50], N[Not[LessEqual[z, 6.5e-14]], $MachinePrecision]], N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+50} \lor \neg \left(z \leq 6.5 \cdot 10^{-14}\right):\\
\;\;\;\;z \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot t\\
\end{array}
\end{array}
if z < -5.9999999999999996e50 or 6.5000000000000001e-14 < z Initial program 100.0%
Taylor expanded in y around 0 77.2%
mul-1-neg77.2%
unsub-neg77.2%
Simplified77.2%
Taylor expanded in z around inf 77.2%
if -5.9999999999999996e50 < z < 6.5000000000000001e-14Initial program 99.9%
Taylor expanded in t around inf 78.6%
Taylor expanded in y around inf 70.9%
Final simplification74.0%
(FPCore (x y z t) :precision binary64 (if (<= x -8.8e+89) (* z x) (if (<= x 1.9e+20) (* y t) (* y (- x)))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -8.8e+89) {
tmp = z * x;
} else if (x <= 1.9e+20) {
tmp = y * t;
} else {
tmp = y * -x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-8.8d+89)) then
tmp = z * x
else if (x <= 1.9d+20) then
tmp = y * t
else
tmp = y * -x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -8.8e+89) {
tmp = z * x;
} else if (x <= 1.9e+20) {
tmp = y * t;
} else {
tmp = y * -x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -8.8e+89: tmp = z * x elif x <= 1.9e+20: tmp = y * t else: tmp = y * -x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -8.8e+89) tmp = Float64(z * x); elseif (x <= 1.9e+20) tmp = Float64(y * t); else tmp = Float64(y * Float64(-x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -8.8e+89) tmp = z * x; elseif (x <= 1.9e+20) tmp = y * t; else tmp = y * -x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -8.8e+89], N[(z * x), $MachinePrecision], If[LessEqual[x, 1.9e+20], N[(y * t), $MachinePrecision], N[(y * (-x)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.8 \cdot 10^{+89}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;x \leq 1.9 \cdot 10^{+20}:\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\end{array}
\end{array}
if x < -8.8000000000000001e89Initial program 100.0%
Taylor expanded in x around inf 90.2%
mul-1-neg90.2%
unsub-neg90.2%
Simplified90.2%
Taylor expanded in z around inf 41.3%
if -8.8000000000000001e89 < x < 1.9e20Initial program 99.9%
Taylor expanded in y around inf 86.4%
associate--l+86.4%
+-commutative86.4%
mul-1-neg86.4%
unsub-neg86.4%
div-sub86.4%
unsub-neg86.4%
mul-1-neg86.4%
mul-1-neg86.4%
distribute-rgt-neg-in86.4%
sub-neg86.4%
+-commutative86.4%
distribute-neg-in86.4%
remove-double-neg86.4%
sub-neg86.4%
Simplified86.4%
Taylor expanded in t around inf 58.6%
neg-mul-158.6%
sub-neg58.6%
Simplified58.6%
Taylor expanded in z around 0 39.1%
if 1.9e20 < x Initial program 100.0%
Taylor expanded in x around inf 91.1%
mul-1-neg91.1%
unsub-neg91.1%
Simplified91.1%
Taylor expanded in y around inf 44.5%
mul-1-neg44.5%
Simplified44.5%
Final simplification40.5%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.0) (not (<= z 6.5e-14))) (* z x) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.0) || !(z <= 6.5e-14)) {
tmp = z * x;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-1.0d0)) .or. (.not. (z <= 6.5d-14))) then
tmp = z * x
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.0) || !(z <= 6.5e-14)) {
tmp = z * x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.0) or not (z <= 6.5e-14): tmp = z * x else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.0) || !(z <= 6.5e-14)) tmp = Float64(z * x); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.0) || ~((z <= 6.5e-14))) tmp = z * x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.0], N[Not[LessEqual[z, 6.5e-14]], $MachinePrecision]], N[(z * x), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \lor \neg \left(z \leq 6.5 \cdot 10^{-14}\right):\\
\;\;\;\;z \cdot x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1 or 6.5000000000000001e-14 < z Initial program 100.0%
Taylor expanded in x around inf 49.8%
mul-1-neg49.8%
unsub-neg49.8%
Simplified49.8%
Taylor expanded in z around inf 34.5%
if -1 < z < 6.5000000000000001e-14Initial program 99.9%
Taylor expanded in t around inf 79.0%
Taylor expanded in x around inf 37.0%
Final simplification35.7%
(FPCore (x y z t) :precision binary64 (+ x (* (- y z) (- t x))))
double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y - z) * (t - x))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
def code(x, y, z, t): return x + ((y - z) * (t - x))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - z) * Float64(t - x))) end
function tmp = code(x, y, z, t) tmp = x + ((y - z) * (t - x)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \left(t - x\right)
\end{array}
Initial program 100.0%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 100.0%
Taylor expanded in t around inf 68.4%
Taylor expanded in x around inf 19.3%
(FPCore (x y z t) :precision binary64 (+ x (+ (* t (- y z)) (* (- x) (- y z)))))
double code(double x, double y, double z, double t) {
return x + ((t * (y - z)) + (-x * (y - z)));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((t * (y - z)) + (-x * (y - z)))
end function
public static double code(double x, double y, double z, double t) {
return x + ((t * (y - z)) + (-x * (y - z)));
}
def code(x, y, z, t): return x + ((t * (y - z)) + (-x * (y - z)))
function code(x, y, z, t) return Float64(x + Float64(Float64(t * Float64(y - z)) + Float64(Float64(-x) * Float64(y - z)))) end
function tmp = code(x, y, z, t) tmp = x + ((t * (y - z)) + (-x * (y - z))); end
code[x_, y_, z_, t_] := N[(x + N[(N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision] + N[((-x) * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(t \cdot \left(y - z\right) + \left(-x\right) \cdot \left(y - z\right)\right)
\end{array}
herbie shell --seed 2024123
(FPCore (x y z t)
:name "Data.Metrics.Snapshot:quantile from metrics-0.3.0.2"
:precision binary64
:alt
(! :herbie-platform default (+ x (+ (* t (- y z)) (* (- x) (- y z)))))
(+ x (* (- y z) (- t x))))