
(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 13 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%
Final simplification100.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (- x))))
(if (<= x -3.7e+185)
t_1
(if (<= x -3.2e+140)
(* z x)
(if (<= x -4.7e+80)
t_1
(if (<= x -5.7e-18)
x
(if (<= x 1.05e+26)
(* z (- t))
(if (or (<= x 2.9e+182) (not (<= x 1.55e+222)))
(* z x)
t_1))))))))
double code(double x, double y, double z, double t) {
double t_1 = y * -x;
double tmp;
if (x <= -3.7e+185) {
tmp = t_1;
} else if (x <= -3.2e+140) {
tmp = z * x;
} else if (x <= -4.7e+80) {
tmp = t_1;
} else if (x <= -5.7e-18) {
tmp = x;
} else if (x <= 1.05e+26) {
tmp = z * -t;
} else if ((x <= 2.9e+182) || !(x <= 1.55e+222)) {
tmp = z * 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 = y * -x
if (x <= (-3.7d+185)) then
tmp = t_1
else if (x <= (-3.2d+140)) then
tmp = z * x
else if (x <= (-4.7d+80)) then
tmp = t_1
else if (x <= (-5.7d-18)) then
tmp = x
else if (x <= 1.05d+26) then
tmp = z * -t
else if ((x <= 2.9d+182) .or. (.not. (x <= 1.55d+222))) then
tmp = z * x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * -x;
double tmp;
if (x <= -3.7e+185) {
tmp = t_1;
} else if (x <= -3.2e+140) {
tmp = z * x;
} else if (x <= -4.7e+80) {
tmp = t_1;
} else if (x <= -5.7e-18) {
tmp = x;
} else if (x <= 1.05e+26) {
tmp = z * -t;
} else if ((x <= 2.9e+182) || !(x <= 1.55e+222)) {
tmp = z * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * -x tmp = 0 if x <= -3.7e+185: tmp = t_1 elif x <= -3.2e+140: tmp = z * x elif x <= -4.7e+80: tmp = t_1 elif x <= -5.7e-18: tmp = x elif x <= 1.05e+26: tmp = z * -t elif (x <= 2.9e+182) or not (x <= 1.55e+222): tmp = z * x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(-x)) tmp = 0.0 if (x <= -3.7e+185) tmp = t_1; elseif (x <= -3.2e+140) tmp = Float64(z * x); elseif (x <= -4.7e+80) tmp = t_1; elseif (x <= -5.7e-18) tmp = x; elseif (x <= 1.05e+26) tmp = Float64(z * Float64(-t)); elseif ((x <= 2.9e+182) || !(x <= 1.55e+222)) tmp = Float64(z * x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * -x; tmp = 0.0; if (x <= -3.7e+185) tmp = t_1; elseif (x <= -3.2e+140) tmp = z * x; elseif (x <= -4.7e+80) tmp = t_1; elseif (x <= -5.7e-18) tmp = x; elseif (x <= 1.05e+26) tmp = z * -t; elseif ((x <= 2.9e+182) || ~((x <= 1.55e+222))) tmp = z * x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * (-x)), $MachinePrecision]}, If[LessEqual[x, -3.7e+185], t$95$1, If[LessEqual[x, -3.2e+140], N[(z * x), $MachinePrecision], If[LessEqual[x, -4.7e+80], t$95$1, If[LessEqual[x, -5.7e-18], x, If[LessEqual[x, 1.05e+26], N[(z * (-t)), $MachinePrecision], If[Or[LessEqual[x, 2.9e+182], N[Not[LessEqual[x, 1.55e+222]], $MachinePrecision]], N[(z * x), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(-x\right)\\
\mathbf{if}\;x \leq -3.7 \cdot 10^{+185}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -3.2 \cdot 10^{+140}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;x \leq -4.7 \cdot 10^{+80}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -5.7 \cdot 10^{-18}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{+26}:\\
\;\;\;\;z \cdot \left(-t\right)\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{+182} \lor \neg \left(x \leq 1.55 \cdot 10^{+222}\right):\\
\;\;\;\;z \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.6999999999999997e185 or -3.20000000000000011e140 < x < -4.70000000000000009e80 or 2.8999999999999998e182 < x < 1.5499999999999999e222Initial program 100.0%
Taylor expanded in x around inf 87.4%
mul-1-neg87.4%
unsub-neg87.4%
Simplified87.4%
Taylor expanded in y around inf 63.0%
mul-1-neg63.0%
distribute-rgt-neg-out63.0%
Simplified63.0%
if -3.6999999999999997e185 < x < -3.20000000000000011e140 or 1.05e26 < x < 2.8999999999999998e182 or 1.5499999999999999e222 < x Initial program 100.0%
Taylor expanded in x around inf 88.0%
mul-1-neg88.0%
unsub-neg88.0%
Simplified88.0%
Taylor expanded in z around inf 50.4%
*-commutative50.4%
Simplified50.4%
if -4.70000000000000009e80 < x < -5.69999999999999971e-18Initial program 99.9%
add-cube-cbrt99.1%
pow399.2%
Applied egg-rr99.2%
Taylor expanded in x around inf 51.4%
if -5.69999999999999971e-18 < x < 1.05e26Initial program 100.0%
add-cube-cbrt98.6%
pow398.6%
Applied egg-rr98.6%
Taylor expanded in y around 0 55.4%
mul-1-neg55.4%
pow-base-155.4%
*-lft-identity55.4%
unsub-neg55.4%
Simplified55.4%
Taylor expanded in x around 0 44.4%
associate-*r*44.4%
mul-1-neg44.4%
Simplified44.4%
Final simplification49.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- x (* z t))) (t_2 (+ x (* y t))) (t_3 (* x (+ (- z y) 1.0))))
(if (<= x -5.5e-64)
t_3
(if (<= x -6.5e-213)
t_1
(if (<= x -5e-299)
t_2
(if (<= x 3.9e-243)
t_1
(if (<= x 2.4e-212) t_2 (if (<= x 1.25e-5) t_1 t_3))))))))
double code(double x, double y, double z, double t) {
double t_1 = x - (z * t);
double t_2 = x + (y * t);
double t_3 = x * ((z - y) + 1.0);
double tmp;
if (x <= -5.5e-64) {
tmp = t_3;
} else if (x <= -6.5e-213) {
tmp = t_1;
} else if (x <= -5e-299) {
tmp = t_2;
} else if (x <= 3.9e-243) {
tmp = t_1;
} else if (x <= 2.4e-212) {
tmp = t_2;
} else if (x <= 1.25e-5) {
tmp = t_1;
} else {
tmp = t_3;
}
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 = x - (z * t)
t_2 = x + (y * t)
t_3 = x * ((z - y) + 1.0d0)
if (x <= (-5.5d-64)) then
tmp = t_3
else if (x <= (-6.5d-213)) then
tmp = t_1
else if (x <= (-5d-299)) then
tmp = t_2
else if (x <= 3.9d-243) then
tmp = t_1
else if (x <= 2.4d-212) then
tmp = t_2
else if (x <= 1.25d-5) then
tmp = t_1
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x - (z * t);
double t_2 = x + (y * t);
double t_3 = x * ((z - y) + 1.0);
double tmp;
if (x <= -5.5e-64) {
tmp = t_3;
} else if (x <= -6.5e-213) {
tmp = t_1;
} else if (x <= -5e-299) {
tmp = t_2;
} else if (x <= 3.9e-243) {
tmp = t_1;
} else if (x <= 2.4e-212) {
tmp = t_2;
} else if (x <= 1.25e-5) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t): t_1 = x - (z * t) t_2 = x + (y * t) t_3 = x * ((z - y) + 1.0) tmp = 0 if x <= -5.5e-64: tmp = t_3 elif x <= -6.5e-213: tmp = t_1 elif x <= -5e-299: tmp = t_2 elif x <= 3.9e-243: tmp = t_1 elif x <= 2.4e-212: tmp = t_2 elif x <= 1.25e-5: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t) t_1 = Float64(x - Float64(z * t)) t_2 = Float64(x + Float64(y * t)) t_3 = Float64(x * Float64(Float64(z - y) + 1.0)) tmp = 0.0 if (x <= -5.5e-64) tmp = t_3; elseif (x <= -6.5e-213) tmp = t_1; elseif (x <= -5e-299) tmp = t_2; elseif (x <= 3.9e-243) tmp = t_1; elseif (x <= 2.4e-212) tmp = t_2; elseif (x <= 1.25e-5) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x - (z * t); t_2 = x + (y * t); t_3 = x * ((z - y) + 1.0); tmp = 0.0; if (x <= -5.5e-64) tmp = t_3; elseif (x <= -6.5e-213) tmp = t_1; elseif (x <= -5e-299) tmp = t_2; elseif (x <= 3.9e-243) tmp = t_1; elseif (x <= 2.4e-212) tmp = t_2; elseif (x <= 1.25e-5) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(N[(z - y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.5e-64], t$95$3, If[LessEqual[x, -6.5e-213], t$95$1, If[LessEqual[x, -5e-299], t$95$2, If[LessEqual[x, 3.9e-243], t$95$1, If[LessEqual[x, 2.4e-212], t$95$2, If[LessEqual[x, 1.25e-5], t$95$1, t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - z \cdot t\\
t_2 := x + y \cdot t\\
t_3 := x \cdot \left(\left(z - y\right) + 1\right)\\
\mathbf{if}\;x \leq -5.5 \cdot 10^{-64}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq -6.5 \cdot 10^{-213}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -5 \cdot 10^{-299}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 3.9 \cdot 10^{-243}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.4 \cdot 10^{-212}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 1.25 \cdot 10^{-5}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if x < -5.4999999999999999e-64 or 1.25000000000000006e-5 < x Initial program 100.0%
Taylor expanded in x around inf 79.2%
mul-1-neg79.2%
unsub-neg79.2%
Simplified79.2%
if -5.4999999999999999e-64 < x < -6.5e-213 or -4.99999999999999956e-299 < x < 3.90000000000000015e-243 or 2.39999999999999989e-212 < x < 1.25000000000000006e-5Initial program 100.0%
Taylor expanded in t around inf 79.8%
Taylor expanded in y around 0 61.2%
mul-1-neg61.2%
unsub-neg61.2%
*-commutative61.2%
Simplified61.2%
if -6.5e-213 < x < -4.99999999999999956e-299 or 3.90000000000000015e-243 < x < 2.39999999999999989e-212Initial program 99.9%
Taylor expanded in t around inf 94.8%
Taylor expanded in y around inf 77.4%
Final simplification72.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- t))))
(if (<= z -5.6e+186)
t_1
(if (<= z -1.15e+153)
(* z x)
(if (<= z -70000000000000.0)
t_1
(if (<= z 8.2e-20)
(+ x (* y t))
(if (<= z 3.2e+163) (- x (* z t)) (* z x))))))))
double code(double x, double y, double z, double t) {
double t_1 = z * -t;
double tmp;
if (z <= -5.6e+186) {
tmp = t_1;
} else if (z <= -1.15e+153) {
tmp = z * x;
} else if (z <= -70000000000000.0) {
tmp = t_1;
} else if (z <= 8.2e-20) {
tmp = x + (y * t);
} else if (z <= 3.2e+163) {
tmp = x - (z * t);
} 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) :: t_1
real(8) :: tmp
t_1 = z * -t
if (z <= (-5.6d+186)) then
tmp = t_1
else if (z <= (-1.15d+153)) then
tmp = z * x
else if (z <= (-70000000000000.0d0)) then
tmp = t_1
else if (z <= 8.2d-20) then
tmp = x + (y * t)
else if (z <= 3.2d+163) then
tmp = x - (z * t)
else
tmp = z * x
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 <= -5.6e+186) {
tmp = t_1;
} else if (z <= -1.15e+153) {
tmp = z * x;
} else if (z <= -70000000000000.0) {
tmp = t_1;
} else if (z <= 8.2e-20) {
tmp = x + (y * t);
} else if (z <= 3.2e+163) {
tmp = x - (z * t);
} else {
tmp = z * x;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * -t tmp = 0 if z <= -5.6e+186: tmp = t_1 elif z <= -1.15e+153: tmp = z * x elif z <= -70000000000000.0: tmp = t_1 elif z <= 8.2e-20: tmp = x + (y * t) elif z <= 3.2e+163: tmp = x - (z * t) else: tmp = z * x return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(-t)) tmp = 0.0 if (z <= -5.6e+186) tmp = t_1; elseif (z <= -1.15e+153) tmp = Float64(z * x); elseif (z <= -70000000000000.0) tmp = t_1; elseif (z <= 8.2e-20) tmp = Float64(x + Float64(y * t)); elseif (z <= 3.2e+163) tmp = Float64(x - Float64(z * t)); else tmp = Float64(z * x); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * -t; tmp = 0.0; if (z <= -5.6e+186) tmp = t_1; elseif (z <= -1.15e+153) tmp = z * x; elseif (z <= -70000000000000.0) tmp = t_1; elseif (z <= 8.2e-20) tmp = x + (y * t); elseif (z <= 3.2e+163) tmp = x - (z * t); else tmp = z * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * (-t)), $MachinePrecision]}, If[LessEqual[z, -5.6e+186], t$95$1, If[LessEqual[z, -1.15e+153], N[(z * x), $MachinePrecision], If[LessEqual[z, -70000000000000.0], t$95$1, If[LessEqual[z, 8.2e-20], N[(x + N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.2e+163], N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision], N[(z * x), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(-t\right)\\
\mathbf{if}\;z \leq -5.6 \cdot 10^{+186}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{+153}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;z \leq -70000000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{-20}:\\
\;\;\;\;x + y \cdot t\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+163}:\\
\;\;\;\;x - z \cdot t\\
\mathbf{else}:\\
\;\;\;\;z \cdot x\\
\end{array}
\end{array}
if z < -5.60000000000000037e186 or -1.1500000000000001e153 < z < -7e13Initial program 100.0%
add-cube-cbrt99.0%
pow399.0%
Applied egg-rr99.0%
Taylor expanded in y around 0 83.7%
mul-1-neg83.7%
pow-base-183.7%
*-lft-identity83.7%
unsub-neg83.7%
Simplified83.7%
Taylor expanded in x around 0 53.8%
associate-*r*53.8%
mul-1-neg53.8%
Simplified53.8%
if -5.60000000000000037e186 < z < -1.1500000000000001e153 or 3.1999999999999998e163 < z Initial program 99.9%
Taylor expanded in x around inf 71.6%
mul-1-neg71.6%
unsub-neg71.6%
Simplified71.6%
Taylor expanded in z around inf 68.3%
*-commutative68.3%
Simplified68.3%
if -7e13 < z < 8.2000000000000002e-20Initial program 100.0%
Taylor expanded in t around inf 75.6%
Taylor expanded in y around inf 66.9%
if 8.2000000000000002e-20 < z < 3.1999999999999998e163Initial program 100.0%
Taylor expanded in t around inf 56.2%
Taylor expanded in y around 0 46.6%
mul-1-neg46.6%
unsub-neg46.6%
*-commutative46.6%
Simplified46.6%
Final simplification60.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- t))))
(if (<= z -2.9e+186)
t_1
(if (<= z -7.5e+151)
(* z x)
(if (<= z -3.2e+42)
t_1
(if (<= z 7.2e+97)
(* x (- 1.0 y))
(if (<= z 1.85e+164) t_1 (* z x))))))))
double code(double x, double y, double z, double t) {
double t_1 = z * -t;
double tmp;
if (z <= -2.9e+186) {
tmp = t_1;
} else if (z <= -7.5e+151) {
tmp = z * x;
} else if (z <= -3.2e+42) {
tmp = t_1;
} else if (z <= 7.2e+97) {
tmp = x * (1.0 - y);
} else if (z <= 1.85e+164) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = z * -t
if (z <= (-2.9d+186)) then
tmp = t_1
else if (z <= (-7.5d+151)) then
tmp = z * x
else if (z <= (-3.2d+42)) then
tmp = t_1
else if (z <= 7.2d+97) then
tmp = x * (1.0d0 - y)
else if (z <= 1.85d+164) then
tmp = t_1
else
tmp = z * x
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 <= -2.9e+186) {
tmp = t_1;
} else if (z <= -7.5e+151) {
tmp = z * x;
} else if (z <= -3.2e+42) {
tmp = t_1;
} else if (z <= 7.2e+97) {
tmp = x * (1.0 - y);
} else if (z <= 1.85e+164) {
tmp = t_1;
} else {
tmp = z * x;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * -t tmp = 0 if z <= -2.9e+186: tmp = t_1 elif z <= -7.5e+151: tmp = z * x elif z <= -3.2e+42: tmp = t_1 elif z <= 7.2e+97: tmp = x * (1.0 - y) elif z <= 1.85e+164: tmp = t_1 else: tmp = z * x return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(-t)) tmp = 0.0 if (z <= -2.9e+186) tmp = t_1; elseif (z <= -7.5e+151) tmp = Float64(z * x); elseif (z <= -3.2e+42) tmp = t_1; elseif (z <= 7.2e+97) tmp = Float64(x * Float64(1.0 - y)); elseif (z <= 1.85e+164) tmp = t_1; else tmp = Float64(z * x); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * -t; tmp = 0.0; if (z <= -2.9e+186) tmp = t_1; elseif (z <= -7.5e+151) tmp = z * x; elseif (z <= -3.2e+42) tmp = t_1; elseif (z <= 7.2e+97) tmp = x * (1.0 - y); elseif (z <= 1.85e+164) tmp = t_1; else tmp = z * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * (-t)), $MachinePrecision]}, If[LessEqual[z, -2.9e+186], t$95$1, If[LessEqual[z, -7.5e+151], N[(z * x), $MachinePrecision], If[LessEqual[z, -3.2e+42], t$95$1, If[LessEqual[z, 7.2e+97], N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.85e+164], t$95$1, N[(z * x), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(-t\right)\\
\mathbf{if}\;z \leq -2.9 \cdot 10^{+186}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{+151}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{+42}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{+97}:\\
\;\;\;\;x \cdot \left(1 - y\right)\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{+164}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot x\\
\end{array}
\end{array}
if z < -2.9e186 or -7.49999999999999977e151 < z < -3.20000000000000002e42 or 7.19999999999999932e97 < z < 1.85e164Initial program 100.0%
add-cube-cbrt99.0%
pow398.9%
Applied egg-rr98.9%
Taylor expanded in y around 0 83.4%
mul-1-neg83.4%
pow-base-183.4%
*-lft-identity83.4%
unsub-neg83.4%
Simplified83.4%
Taylor expanded in x around 0 57.2%
associate-*r*57.2%
mul-1-neg57.2%
Simplified57.2%
if -2.9e186 < z < -7.49999999999999977e151 or 1.85e164 < z Initial program 99.9%
Taylor expanded in x around inf 71.6%
mul-1-neg71.6%
unsub-neg71.6%
Simplified71.6%
Taylor expanded in z around inf 68.3%
*-commutative68.3%
Simplified68.3%
if -3.20000000000000002e42 < z < 7.19999999999999932e97Initial program 100.0%
Taylor expanded in x around inf 56.2%
mul-1-neg56.2%
unsub-neg56.2%
Simplified56.2%
Taylor expanded in z around 0 52.2%
Final simplification55.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- t))))
(if (<= z -1.55e+186)
t_1
(if (<= z -2.6e+152)
(* z x)
(if (<= z -3.4e+14)
t_1
(if (<= z 5.2e-14)
(+ x (* y t))
(if (<= z 1.85e+164) t_1 (* z x))))))))
double code(double x, double y, double z, double t) {
double t_1 = z * -t;
double tmp;
if (z <= -1.55e+186) {
tmp = t_1;
} else if (z <= -2.6e+152) {
tmp = z * x;
} else if (z <= -3.4e+14) {
tmp = t_1;
} else if (z <= 5.2e-14) {
tmp = x + (y * t);
} else if (z <= 1.85e+164) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = z * -t
if (z <= (-1.55d+186)) then
tmp = t_1
else if (z <= (-2.6d+152)) then
tmp = z * x
else if (z <= (-3.4d+14)) then
tmp = t_1
else if (z <= 5.2d-14) then
tmp = x + (y * t)
else if (z <= 1.85d+164) then
tmp = t_1
else
tmp = z * x
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 <= -1.55e+186) {
tmp = t_1;
} else if (z <= -2.6e+152) {
tmp = z * x;
} else if (z <= -3.4e+14) {
tmp = t_1;
} else if (z <= 5.2e-14) {
tmp = x + (y * t);
} else if (z <= 1.85e+164) {
tmp = t_1;
} else {
tmp = z * x;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * -t tmp = 0 if z <= -1.55e+186: tmp = t_1 elif z <= -2.6e+152: tmp = z * x elif z <= -3.4e+14: tmp = t_1 elif z <= 5.2e-14: tmp = x + (y * t) elif z <= 1.85e+164: tmp = t_1 else: tmp = z * x return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(-t)) tmp = 0.0 if (z <= -1.55e+186) tmp = t_1; elseif (z <= -2.6e+152) tmp = Float64(z * x); elseif (z <= -3.4e+14) tmp = t_1; elseif (z <= 5.2e-14) tmp = Float64(x + Float64(y * t)); elseif (z <= 1.85e+164) tmp = t_1; else tmp = Float64(z * x); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * -t; tmp = 0.0; if (z <= -1.55e+186) tmp = t_1; elseif (z <= -2.6e+152) tmp = z * x; elseif (z <= -3.4e+14) tmp = t_1; elseif (z <= 5.2e-14) tmp = x + (y * t); elseif (z <= 1.85e+164) tmp = t_1; else tmp = z * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * (-t)), $MachinePrecision]}, If[LessEqual[z, -1.55e+186], t$95$1, If[LessEqual[z, -2.6e+152], N[(z * x), $MachinePrecision], If[LessEqual[z, -3.4e+14], t$95$1, If[LessEqual[z, 5.2e-14], N[(x + N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.85e+164], t$95$1, N[(z * x), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(-t\right)\\
\mathbf{if}\;z \leq -1.55 \cdot 10^{+186}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{+152}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;z \leq -3.4 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-14}:\\
\;\;\;\;x + y \cdot t\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{+164}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot x\\
\end{array}
\end{array}
if z < -1.5500000000000001e186 or -2.6000000000000001e152 < z < -3.4e14 or 5.19999999999999993e-14 < z < 1.85e164Initial program 100.0%
add-cube-cbrt98.8%
pow398.8%
Applied egg-rr98.8%
Taylor expanded in y around 0 75.0%
mul-1-neg75.0%
pow-base-175.0%
*-lft-identity75.0%
unsub-neg75.0%
Simplified75.0%
Taylor expanded in x around 0 49.5%
associate-*r*49.5%
mul-1-neg49.5%
Simplified49.5%
if -1.5500000000000001e186 < z < -2.6000000000000001e152 or 1.85e164 < z Initial program 99.9%
Taylor expanded in x around inf 71.6%
mul-1-neg71.6%
unsub-neg71.6%
Simplified71.6%
Taylor expanded in z around inf 68.3%
*-commutative68.3%
Simplified68.3%
if -3.4e14 < z < 5.19999999999999993e-14Initial program 100.0%
Taylor expanded in t around inf 75.9%
Taylor expanded in y around inf 67.4%
Final simplification60.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (- x))))
(if (<= y -660000000000.0)
t_1
(if (<= y 1.26e-185) (* z x) (if (<= y 19.0) x t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = y * -x;
double tmp;
if (y <= -660000000000.0) {
tmp = t_1;
} else if (y <= 1.26e-185) {
tmp = z * x;
} else if (y <= 19.0) {
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 = y * -x
if (y <= (-660000000000.0d0)) then
tmp = t_1
else if (y <= 1.26d-185) then
tmp = z * x
else if (y <= 19.0d0) 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 = y * -x;
double tmp;
if (y <= -660000000000.0) {
tmp = t_1;
} else if (y <= 1.26e-185) {
tmp = z * x;
} else if (y <= 19.0) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * -x tmp = 0 if y <= -660000000000.0: tmp = t_1 elif y <= 1.26e-185: tmp = z * x elif y <= 19.0: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(-x)) tmp = 0.0 if (y <= -660000000000.0) tmp = t_1; elseif (y <= 1.26e-185) tmp = Float64(z * x); elseif (y <= 19.0) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * -x; tmp = 0.0; if (y <= -660000000000.0) tmp = t_1; elseif (y <= 1.26e-185) tmp = z * x; elseif (y <= 19.0) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * (-x)), $MachinePrecision]}, If[LessEqual[y, -660000000000.0], t$95$1, If[LessEqual[y, 1.26e-185], N[(z * x), $MachinePrecision], If[LessEqual[y, 19.0], x, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(-x\right)\\
\mathbf{if}\;y \leq -660000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.26 \cdot 10^{-185}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;y \leq 19:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -6.6e11 or 19 < y Initial program 100.0%
Taylor expanded in x around inf 49.8%
mul-1-neg49.8%
unsub-neg49.8%
Simplified49.8%
Taylor expanded in y around inf 43.2%
mul-1-neg43.2%
distribute-rgt-neg-out43.2%
Simplified43.2%
if -6.6e11 < y < 1.2599999999999999e-185Initial program 100.0%
Taylor expanded in x around inf 60.1%
mul-1-neg60.1%
unsub-neg60.1%
Simplified60.1%
Taylor expanded in z around inf 37.5%
*-commutative37.5%
Simplified37.5%
if 1.2599999999999999e-185 < y < 19Initial program 100.0%
add-cube-cbrt99.4%
pow399.3%
Applied egg-rr99.3%
Taylor expanded in x around inf 39.0%
Final simplification40.6%
(FPCore (x y z t) :precision binary64 (if (or (<= x -9.5e+29) (not (<= x 1.05e+28))) (* x (+ (- z y) 1.0)) (+ x (* (- y z) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -9.5e+29) || !(x <= 1.05e+28)) {
tmp = x * ((z - y) + 1.0);
} else {
tmp = x + ((y - z) * 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 ((x <= (-9.5d+29)) .or. (.not. (x <= 1.05d+28))) then
tmp = x * ((z - y) + 1.0d0)
else
tmp = x + ((y - z) * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -9.5e+29) || !(x <= 1.05e+28)) {
tmp = x * ((z - y) + 1.0);
} else {
tmp = x + ((y - z) * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -9.5e+29) or not (x <= 1.05e+28): tmp = x * ((z - y) + 1.0) else: tmp = x + ((y - z) * t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -9.5e+29) || !(x <= 1.05e+28)) tmp = Float64(x * Float64(Float64(z - y) + 1.0)); else tmp = Float64(x + Float64(Float64(y - z) * t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -9.5e+29) || ~((x <= 1.05e+28))) tmp = x * ((z - y) + 1.0); else tmp = x + ((y - z) * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -9.5e+29], N[Not[LessEqual[x, 1.05e+28]], $MachinePrecision]], N[(x * N[(N[(z - y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{+29} \lor \neg \left(x \leq 1.05 \cdot 10^{+28}\right):\\
\;\;\;\;x \cdot \left(\left(z - y\right) + 1\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - z\right) \cdot t\\
\end{array}
\end{array}
if x < -9.5000000000000003e29 or 1.04999999999999995e28 < x Initial program 100.0%
Taylor expanded in x around inf 87.5%
mul-1-neg87.5%
unsub-neg87.5%
Simplified87.5%
if -9.5000000000000003e29 < x < 1.04999999999999995e28Initial program 100.0%
Taylor expanded in t around inf 82.0%
Final simplification84.5%
(FPCore (x y z t) :precision binary64 (if (or (<= z -64000000000000.0) (not (<= z 2.2e+82))) (+ x (* z (- x t))) (+ x (* y (- t x)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -64000000000000.0) || !(z <= 2.2e+82)) {
tmp = x + (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 <= (-64000000000000.0d0)) .or. (.not. (z <= 2.2d+82))) then
tmp = x + (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 <= -64000000000000.0) || !(z <= 2.2e+82)) {
tmp = x + (z * (x - t));
} else {
tmp = x + (y * (t - x));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -64000000000000.0) or not (z <= 2.2e+82): tmp = x + (z * (x - t)) else: tmp = x + (y * (t - x)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -64000000000000.0) || !(z <= 2.2e+82)) tmp = Float64(x + 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 <= -64000000000000.0) || ~((z <= 2.2e+82))) tmp = x + (z * (x - t)); else tmp = x + (y * (t - x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -64000000000000.0], N[Not[LessEqual[z, 2.2e+82]], $MachinePrecision]], N[(x + N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -64000000000000 \lor \neg \left(z \leq 2.2 \cdot 10^{+82}\right):\\
\;\;\;\;x + z \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(t - x\right)\\
\end{array}
\end{array}
if z < -6.4e13 or 2.2000000000000001e82 < z Initial program 100.0%
add-cube-cbrt99.0%
pow398.9%
Applied egg-rr98.9%
Taylor expanded in y around 0 86.4%
mul-1-neg86.4%
pow-base-186.4%
*-lft-identity86.4%
unsub-neg86.4%
Simplified86.4%
if -6.4e13 < z < 2.2000000000000001e82Initial program 100.0%
Taylor expanded in y around inf 87.1%
*-commutative87.1%
Simplified87.1%
Final simplification86.8%
(FPCore (x y z t) :precision binary64 (if (<= x -2.7e+30) (* x (+ (- z y) 1.0)) (if (<= x 4.5e+27) (+ x (* (- y z) t)) (+ x (* x (- z y))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -2.7e+30) {
tmp = x * ((z - y) + 1.0);
} else if (x <= 4.5e+27) {
tmp = x + ((y - z) * t);
} else {
tmp = x + (x * (z - y));
}
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 <= (-2.7d+30)) then
tmp = x * ((z - y) + 1.0d0)
else if (x <= 4.5d+27) then
tmp = x + ((y - z) * t)
else
tmp = x + (x * (z - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -2.7e+30) {
tmp = x * ((z - y) + 1.0);
} else if (x <= 4.5e+27) {
tmp = x + ((y - z) * t);
} else {
tmp = x + (x * (z - y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -2.7e+30: tmp = x * ((z - y) + 1.0) elif x <= 4.5e+27: tmp = x + ((y - z) * t) else: tmp = x + (x * (z - y)) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -2.7e+30) tmp = Float64(x * Float64(Float64(z - y) + 1.0)); elseif (x <= 4.5e+27) tmp = Float64(x + Float64(Float64(y - z) * t)); else tmp = Float64(x + Float64(x * Float64(z - y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -2.7e+30) tmp = x * ((z - y) + 1.0); elseif (x <= 4.5e+27) tmp = x + ((y - z) * t); else tmp = x + (x * (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -2.7e+30], N[(x * N[(N[(z - y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.5e+27], N[(x + N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(x + N[(x * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.7 \cdot 10^{+30}:\\
\;\;\;\;x \cdot \left(\left(z - y\right) + 1\right)\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{+27}:\\
\;\;\;\;x + \left(y - z\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;x + x \cdot \left(z - y\right)\\
\end{array}
\end{array}
if x < -2.6999999999999999e30Initial program 99.9%
Taylor expanded in x around inf 86.4%
mul-1-neg86.4%
unsub-neg86.4%
Simplified86.4%
if -2.6999999999999999e30 < x < 4.4999999999999999e27Initial program 100.0%
Taylor expanded in t around inf 82.0%
if 4.4999999999999999e27 < x Initial program 100.0%
Taylor expanded in t around 0 88.6%
mul-1-neg88.6%
distribute-rgt-neg-in88.6%
neg-sub088.6%
sub-neg88.6%
+-commutative88.6%
associate--r+88.6%
neg-sub088.6%
remove-double-neg88.6%
Simplified88.6%
Final simplification84.5%
(FPCore (x y z t) :precision binary64 (if (or (<= z -14500.0) (not (<= z 2.7e-12))) (* z x) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -14500.0) || !(z <= 2.7e-12)) {
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 <= (-14500.0d0)) .or. (.not. (z <= 2.7d-12))) 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 <= -14500.0) || !(z <= 2.7e-12)) {
tmp = z * x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -14500.0) or not (z <= 2.7e-12): tmp = z * x else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -14500.0) || !(z <= 2.7e-12)) tmp = Float64(z * x); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -14500.0) || ~((z <= 2.7e-12))) tmp = z * x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -14500.0], N[Not[LessEqual[z, 2.7e-12]], $MachinePrecision]], N[(z * x), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -14500 \lor \neg \left(z \leq 2.7 \cdot 10^{-12}\right):\\
\;\;\;\;z \cdot x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -14500 or 2.6999999999999998e-12 < z Initial program 100.0%
Taylor expanded in x around inf 54.4%
mul-1-neg54.4%
unsub-neg54.4%
Simplified54.4%
Taylor expanded in z around inf 39.2%
*-commutative39.2%
Simplified39.2%
if -14500 < z < 2.6999999999999998e-12Initial program 100.0%
add-cube-cbrt99.0%
pow399.0%
Applied egg-rr99.0%
Taylor expanded in x around inf 28.8%
Final simplification34.0%
(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%
Final simplification100.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%
add-cube-cbrt99.0%
pow398.9%
Applied egg-rr98.9%
Taylor expanded in x around inf 15.8%
Final simplification15.8%
(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 2024043
(FPCore (x y z t)
:name "Data.Metrics.Snapshot:quantile from metrics-0.3.0.2"
:precision binary64
:alt
(+ x (+ (* t (- y z)) (* (- x) (- y z))))
(+ x (* (- y z) (- t x))))