
(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 15 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 (* y (- x))))
(if (<= y -4e+272)
(* y t)
(if (<= y -3.8e+126)
t_1
(if (<= y -0.0011)
(* y t)
(if (<= y 1.02e-286)
x
(if (<= y 3.55e-155)
(* z x)
(if (<= y 4.2e-52)
x
(if (<= y 5.2e+65)
(* z x)
(if (<= y 1e+233) t_1 (* y t)))))))))))
double code(double x, double y, double z, double t) {
double t_1 = y * -x;
double tmp;
if (y <= -4e+272) {
tmp = y * t;
} else if (y <= -3.8e+126) {
tmp = t_1;
} else if (y <= -0.0011) {
tmp = y * t;
} else if (y <= 1.02e-286) {
tmp = x;
} else if (y <= 3.55e-155) {
tmp = z * x;
} else if (y <= 4.2e-52) {
tmp = x;
} else if (y <= 5.2e+65) {
tmp = z * x;
} else if (y <= 1e+233) {
tmp = t_1;
} 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) :: tmp
t_1 = y * -x
if (y <= (-4d+272)) then
tmp = y * t
else if (y <= (-3.8d+126)) then
tmp = t_1
else if (y <= (-0.0011d0)) then
tmp = y * t
else if (y <= 1.02d-286) then
tmp = x
else if (y <= 3.55d-155) then
tmp = z * x
else if (y <= 4.2d-52) then
tmp = x
else if (y <= 5.2d+65) then
tmp = z * x
else if (y <= 1d+233) then
tmp = t_1
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 = y * -x;
double tmp;
if (y <= -4e+272) {
tmp = y * t;
} else if (y <= -3.8e+126) {
tmp = t_1;
} else if (y <= -0.0011) {
tmp = y * t;
} else if (y <= 1.02e-286) {
tmp = x;
} else if (y <= 3.55e-155) {
tmp = z * x;
} else if (y <= 4.2e-52) {
tmp = x;
} else if (y <= 5.2e+65) {
tmp = z * x;
} else if (y <= 1e+233) {
tmp = t_1;
} else {
tmp = y * t;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * -x tmp = 0 if y <= -4e+272: tmp = y * t elif y <= -3.8e+126: tmp = t_1 elif y <= -0.0011: tmp = y * t elif y <= 1.02e-286: tmp = x elif y <= 3.55e-155: tmp = z * x elif y <= 4.2e-52: tmp = x elif y <= 5.2e+65: tmp = z * x elif y <= 1e+233: tmp = t_1 else: tmp = y * t return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(-x)) tmp = 0.0 if (y <= -4e+272) tmp = Float64(y * t); elseif (y <= -3.8e+126) tmp = t_1; elseif (y <= -0.0011) tmp = Float64(y * t); elseif (y <= 1.02e-286) tmp = x; elseif (y <= 3.55e-155) tmp = Float64(z * x); elseif (y <= 4.2e-52) tmp = x; elseif (y <= 5.2e+65) tmp = Float64(z * x); elseif (y <= 1e+233) tmp = t_1; else tmp = Float64(y * t); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * -x; tmp = 0.0; if (y <= -4e+272) tmp = y * t; elseif (y <= -3.8e+126) tmp = t_1; elseif (y <= -0.0011) tmp = y * t; elseif (y <= 1.02e-286) tmp = x; elseif (y <= 3.55e-155) tmp = z * x; elseif (y <= 4.2e-52) tmp = x; elseif (y <= 5.2e+65) tmp = z * x; elseif (y <= 1e+233) tmp = t_1; else tmp = y * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * (-x)), $MachinePrecision]}, If[LessEqual[y, -4e+272], N[(y * t), $MachinePrecision], If[LessEqual[y, -3.8e+126], t$95$1, If[LessEqual[y, -0.0011], N[(y * t), $MachinePrecision], If[LessEqual[y, 1.02e-286], x, If[LessEqual[y, 3.55e-155], N[(z * x), $MachinePrecision], If[LessEqual[y, 4.2e-52], x, If[LessEqual[y, 5.2e+65], N[(z * x), $MachinePrecision], If[LessEqual[y, 1e+233], t$95$1, N[(y * t), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(-x\right)\\
\mathbf{if}\;y \leq -4 \cdot 10^{+272}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{+126}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -0.0011:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;y \leq 1.02 \cdot 10^{-286}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 3.55 \cdot 10^{-155}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{-52}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{+65}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;y \leq 10^{+233}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot t\\
\end{array}
\end{array}
if y < -4.0000000000000003e272 or -3.80000000000000017e126 < y < -0.00110000000000000007 or 9.99999999999999974e232 < y Initial program 100.0%
Taylor expanded in x around 0 70.1%
Taylor expanded in y around inf 49.2%
if -4.0000000000000003e272 < y < -3.80000000000000017e126 or 5.20000000000000005e65 < y < 9.99999999999999974e232Initial program 100.0%
Taylor expanded in y around inf 89.3%
Taylor expanded in t around 0 56.5%
mul-1-neg56.5%
distribute-rgt-neg-in56.5%
Simplified56.5%
if -0.00110000000000000007 < y < 1.01999999999999996e-286 or 3.55e-155 < y < 4.1999999999999997e-52Initial program 100.0%
Taylor expanded in y around inf 53.8%
*-commutative53.8%
Simplified53.8%
Taylor expanded in y around 0 45.0%
if 1.01999999999999996e-286 < y < 3.55e-155 or 4.1999999999999997e-52 < y < 5.20000000000000005e65Initial program 100.0%
Taylor expanded in x around inf 62.7%
mul-1-neg62.7%
unsub-neg62.7%
distribute-lft-out--62.7%
*-rgt-identity62.7%
Simplified62.7%
Taylor expanded in z around inf 46.8%
Final simplification49.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- x t))))
(if (<= z -4.5e+77)
t_1
(if (<= z -3.8e+37)
(* y (- t x))
(if (<= z -65000000.0)
t_1
(if (<= z -9.5e-116)
(* (- y z) t)
(if (<= z 3.4e-230)
(- x (* y x))
(if (<= z 5.8e+17) (+ x (* y t)) t_1))))))))
double code(double x, double y, double z, double t) {
double t_1 = z * (x - t);
double tmp;
if (z <= -4.5e+77) {
tmp = t_1;
} else if (z <= -3.8e+37) {
tmp = y * (t - x);
} else if (z <= -65000000.0) {
tmp = t_1;
} else if (z <= -9.5e-116) {
tmp = (y - z) * t;
} else if (z <= 3.4e-230) {
tmp = x - (y * x);
} else if (z <= 5.8e+17) {
tmp = x + (y * 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 = z * (x - t)
if (z <= (-4.5d+77)) then
tmp = t_1
else if (z <= (-3.8d+37)) then
tmp = y * (t - x)
else if (z <= (-65000000.0d0)) then
tmp = t_1
else if (z <= (-9.5d-116)) then
tmp = (y - z) * t
else if (z <= 3.4d-230) then
tmp = x - (y * x)
else if (z <= 5.8d+17) then
tmp = x + (y * 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 = z * (x - t);
double tmp;
if (z <= -4.5e+77) {
tmp = t_1;
} else if (z <= -3.8e+37) {
tmp = y * (t - x);
} else if (z <= -65000000.0) {
tmp = t_1;
} else if (z <= -9.5e-116) {
tmp = (y - z) * t;
} else if (z <= 3.4e-230) {
tmp = x - (y * x);
} else if (z <= 5.8e+17) {
tmp = x + (y * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (x - t) tmp = 0 if z <= -4.5e+77: tmp = t_1 elif z <= -3.8e+37: tmp = y * (t - x) elif z <= -65000000.0: tmp = t_1 elif z <= -9.5e-116: tmp = (y - z) * t elif z <= 3.4e-230: tmp = x - (y * x) elif z <= 5.8e+17: tmp = x + (y * t) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(x - t)) tmp = 0.0 if (z <= -4.5e+77) tmp = t_1; elseif (z <= -3.8e+37) tmp = Float64(y * Float64(t - x)); elseif (z <= -65000000.0) tmp = t_1; elseif (z <= -9.5e-116) tmp = Float64(Float64(y - z) * t); elseif (z <= 3.4e-230) tmp = Float64(x - Float64(y * x)); elseif (z <= 5.8e+17) tmp = Float64(x + Float64(y * t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * (x - t); tmp = 0.0; if (z <= -4.5e+77) tmp = t_1; elseif (z <= -3.8e+37) tmp = y * (t - x); elseif (z <= -65000000.0) tmp = t_1; elseif (z <= -9.5e-116) tmp = (y - z) * t; elseif (z <= 3.4e-230) tmp = x - (y * x); elseif (z <= 5.8e+17) tmp = x + (y * t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.5e+77], t$95$1, If[LessEqual[z, -3.8e+37], N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -65000000.0], t$95$1, If[LessEqual[z, -9.5e-116], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 3.4e-230], N[(x - N[(y * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e+17], N[(x + N[(y * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(x - t\right)\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{+77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{+37}:\\
\;\;\;\;y \cdot \left(t - x\right)\\
\mathbf{elif}\;z \leq -65000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -9.5 \cdot 10^{-116}:\\
\;\;\;\;\left(y - z\right) \cdot t\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-230}:\\
\;\;\;\;x - y \cdot x\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{+17}:\\
\;\;\;\;x + y \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.50000000000000024e77 or -3.7999999999999999e37 < z < -6.5e7 or 5.8e17 < z Initial program 100.0%
Taylor expanded in y around inf 84.1%
sub-neg84.1%
+-commutative84.1%
associate-+l+84.1%
+-commutative84.1%
mul-1-neg84.1%
unsub-neg84.1%
div-sub90.5%
unsub-neg90.5%
mul-1-neg90.5%
sub-neg90.5%
+-commutative90.5%
Simplified90.5%
Taylor expanded in z around -inf 84.5%
mul-1-neg84.5%
distribute-rgt-neg-in84.5%
sub-neg84.5%
distribute-neg-in84.5%
remove-double-neg84.5%
Simplified84.5%
if -4.50000000000000024e77 < z < -3.7999999999999999e37Initial program 100.0%
Taylor expanded in y around inf 88.7%
if -6.5e7 < z < -9.4999999999999998e-116Initial program 100.0%
Taylor expanded in x around 0 68.8%
if -9.4999999999999998e-116 < z < 3.4e-230Initial program 100.0%
Taylor expanded in x around inf 81.1%
mul-1-neg81.1%
unsub-neg81.1%
distribute-lft-out--81.1%
*-rgt-identity81.1%
Simplified81.1%
Taylor expanded in z around 0 81.1%
if 3.4e-230 < z < 5.8e17Initial program 100.0%
Taylor expanded in y around inf 90.0%
*-commutative90.0%
Simplified90.0%
Taylor expanded in t around inf 77.3%
Final simplification80.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- x t))) (t_2 (* y (- t x))))
(if (<= z -1.45e+77)
t_1
(if (<= z -4e+37)
t_2
(if (<= z -4300000000.0)
t_1
(if (<= z -7.2e-64)
(* (- y z) t)
(if (<= z 2.9e+18) (+ x t_2) t_1)))))))
double code(double x, double y, double z, double t) {
double t_1 = z * (x - t);
double t_2 = y * (t - x);
double tmp;
if (z <= -1.45e+77) {
tmp = t_1;
} else if (z <= -4e+37) {
tmp = t_2;
} else if (z <= -4300000000.0) {
tmp = t_1;
} else if (z <= -7.2e-64) {
tmp = (y - z) * t;
} else if (z <= 2.9e+18) {
tmp = x + 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 = z * (x - t)
t_2 = y * (t - x)
if (z <= (-1.45d+77)) then
tmp = t_1
else if (z <= (-4d+37)) then
tmp = t_2
else if (z <= (-4300000000.0d0)) then
tmp = t_1
else if (z <= (-7.2d-64)) then
tmp = (y - z) * t
else if (z <= 2.9d+18) then
tmp = x + 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 = z * (x - t);
double t_2 = y * (t - x);
double tmp;
if (z <= -1.45e+77) {
tmp = t_1;
} else if (z <= -4e+37) {
tmp = t_2;
} else if (z <= -4300000000.0) {
tmp = t_1;
} else if (z <= -7.2e-64) {
tmp = (y - z) * t;
} else if (z <= 2.9e+18) {
tmp = x + t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (x - t) t_2 = y * (t - x) tmp = 0 if z <= -1.45e+77: tmp = t_1 elif z <= -4e+37: tmp = t_2 elif z <= -4300000000.0: tmp = t_1 elif z <= -7.2e-64: tmp = (y - z) * t elif z <= 2.9e+18: tmp = x + t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(x - t)) t_2 = Float64(y * Float64(t - x)) tmp = 0.0 if (z <= -1.45e+77) tmp = t_1; elseif (z <= -4e+37) tmp = t_2; elseif (z <= -4300000000.0) tmp = t_1; elseif (z <= -7.2e-64) tmp = Float64(Float64(y - z) * t); elseif (z <= 2.9e+18) tmp = Float64(x + t_2); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * (x - t); t_2 = y * (t - x); tmp = 0.0; if (z <= -1.45e+77) tmp = t_1; elseif (z <= -4e+37) tmp = t_2; elseif (z <= -4300000000.0) tmp = t_1; elseif (z <= -7.2e-64) tmp = (y - z) * t; elseif (z <= 2.9e+18) tmp = x + t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.45e+77], t$95$1, If[LessEqual[z, -4e+37], t$95$2, If[LessEqual[z, -4300000000.0], t$95$1, If[LessEqual[z, -7.2e-64], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 2.9e+18], N[(x + t$95$2), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(x - t\right)\\
t_2 := y \cdot \left(t - x\right)\\
\mathbf{if}\;z \leq -1.45 \cdot 10^{+77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4 \cdot 10^{+37}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -4300000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7.2 \cdot 10^{-64}:\\
\;\;\;\;\left(y - z\right) \cdot t\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{+18}:\\
\;\;\;\;x + t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.4500000000000001e77 or -3.99999999999999982e37 < z < -4.3e9 or 2.9e18 < z Initial program 100.0%
Taylor expanded in y around inf 84.1%
sub-neg84.1%
+-commutative84.1%
associate-+l+84.1%
+-commutative84.1%
mul-1-neg84.1%
unsub-neg84.1%
div-sub90.5%
unsub-neg90.5%
mul-1-neg90.5%
sub-neg90.5%
+-commutative90.5%
Simplified90.5%
Taylor expanded in z around -inf 84.5%
mul-1-neg84.5%
distribute-rgt-neg-in84.5%
sub-neg84.5%
distribute-neg-in84.5%
remove-double-neg84.5%
Simplified84.5%
if -1.4500000000000001e77 < z < -3.99999999999999982e37Initial program 100.0%
Taylor expanded in y around inf 88.7%
if -4.3e9 < z < -7.1999999999999996e-64Initial program 100.0%
Taylor expanded in x around 0 73.1%
if -7.1999999999999996e-64 < z < 2.9e18Initial program 100.0%
Taylor expanded in y around inf 95.1%
*-commutative95.1%
Simplified95.1%
Final simplification88.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- y z) t)))
(if (<= z -4.3e-65)
t_1
(if (<= z 8.5e+17)
(+ x (* y t))
(if (or (<= z 9e+42) (and (not (<= z 3.7e+171)) (<= z 6.3e+246)))
(* z x)
t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = (y - z) * t;
double tmp;
if (z <= -4.3e-65) {
tmp = t_1;
} else if (z <= 8.5e+17) {
tmp = x + (y * t);
} else if ((z <= 9e+42) || (!(z <= 3.7e+171) && (z <= 6.3e+246))) {
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 - z) * t
if (z <= (-4.3d-65)) then
tmp = t_1
else if (z <= 8.5d+17) then
tmp = x + (y * t)
else if ((z <= 9d+42) .or. (.not. (z <= 3.7d+171)) .and. (z <= 6.3d+246)) 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 - z) * t;
double tmp;
if (z <= -4.3e-65) {
tmp = t_1;
} else if (z <= 8.5e+17) {
tmp = x + (y * t);
} else if ((z <= 9e+42) || (!(z <= 3.7e+171) && (z <= 6.3e+246))) {
tmp = z * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - z) * t tmp = 0 if z <= -4.3e-65: tmp = t_1 elif z <= 8.5e+17: tmp = x + (y * t) elif (z <= 9e+42) or (not (z <= 3.7e+171) and (z <= 6.3e+246)): tmp = z * x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - z) * t) tmp = 0.0 if (z <= -4.3e-65) tmp = t_1; elseif (z <= 8.5e+17) tmp = Float64(x + Float64(y * t)); elseif ((z <= 9e+42) || (!(z <= 3.7e+171) && (z <= 6.3e+246))) tmp = Float64(z * x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - z) * t; tmp = 0.0; if (z <= -4.3e-65) tmp = t_1; elseif (z <= 8.5e+17) tmp = x + (y * t); elseif ((z <= 9e+42) || (~((z <= 3.7e+171)) && (z <= 6.3e+246))) tmp = z * x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[z, -4.3e-65], t$95$1, If[LessEqual[z, 8.5e+17], N[(x + N[(y * t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 9e+42], And[N[Not[LessEqual[z, 3.7e+171]], $MachinePrecision], LessEqual[z, 6.3e+246]]], N[(z * x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot t\\
\mathbf{if}\;z \leq -4.3 \cdot 10^{-65}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+17}:\\
\;\;\;\;x + y \cdot t\\
\mathbf{elif}\;z \leq 9 \cdot 10^{+42} \lor \neg \left(z \leq 3.7 \cdot 10^{+171}\right) \land z \leq 6.3 \cdot 10^{+246}:\\
\;\;\;\;z \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.30000000000000024e-65 or 9.00000000000000025e42 < z < 3.69999999999999998e171 or 6.3e246 < z Initial program 100.0%
Taylor expanded in x around 0 64.5%
if -4.30000000000000024e-65 < z < 8.5e17Initial program 100.0%
Taylor expanded in y around inf 95.1%
*-commutative95.1%
Simplified95.1%
Taylor expanded in t around inf 71.7%
if 8.5e17 < z < 9.00000000000000025e42 or 3.69999999999999998e171 < z < 6.3e246Initial program 100.0%
Taylor expanded in x around inf 75.8%
mul-1-neg75.8%
unsub-neg75.8%
distribute-lft-out--75.8%
*-rgt-identity75.8%
Simplified75.8%
Taylor expanded in z around inf 76.0%
Final simplification68.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (- t x))) (t_2 (* (- y z) t)))
(if (<= y -2e+54)
t_1
(if (<= y -6.8e-232)
t_2
(if (<= y 9e-287)
x
(if (<= y 5e-190) (* z x) (if (<= y 7.2e+66) t_2 t_1)))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (t - x);
double t_2 = (y - z) * t;
double tmp;
if (y <= -2e+54) {
tmp = t_1;
} else if (y <= -6.8e-232) {
tmp = t_2;
} else if (y <= 9e-287) {
tmp = x;
} else if (y <= 5e-190) {
tmp = z * x;
} else if (y <= 7.2e+66) {
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 = (y - z) * t
if (y <= (-2d+54)) then
tmp = t_1
else if (y <= (-6.8d-232)) then
tmp = t_2
else if (y <= 9d-287) then
tmp = x
else if (y <= 5d-190) then
tmp = z * x
else if (y <= 7.2d+66) 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 = (y - z) * t;
double tmp;
if (y <= -2e+54) {
tmp = t_1;
} else if (y <= -6.8e-232) {
tmp = t_2;
} else if (y <= 9e-287) {
tmp = x;
} else if (y <= 5e-190) {
tmp = z * x;
} else if (y <= 7.2e+66) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (t - x) t_2 = (y - z) * t tmp = 0 if y <= -2e+54: tmp = t_1 elif y <= -6.8e-232: tmp = t_2 elif y <= 9e-287: tmp = x elif y <= 5e-190: tmp = z * x elif y <= 7.2e+66: 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(Float64(y - z) * t) tmp = 0.0 if (y <= -2e+54) tmp = t_1; elseif (y <= -6.8e-232) tmp = t_2; elseif (y <= 9e-287) tmp = x; elseif (y <= 5e-190) tmp = Float64(z * x); elseif (y <= 7.2e+66) 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 = (y - z) * t; tmp = 0.0; if (y <= -2e+54) tmp = t_1; elseif (y <= -6.8e-232) tmp = t_2; elseif (y <= 9e-287) tmp = x; elseif (y <= 5e-190) tmp = z * x; elseif (y <= 7.2e+66) 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[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[y, -2e+54], t$95$1, If[LessEqual[y, -6.8e-232], t$95$2, If[LessEqual[y, 9e-287], x, If[LessEqual[y, 5e-190], N[(z * x), $MachinePrecision], If[LessEqual[y, 7.2e+66], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(t - x\right)\\
t_2 := \left(y - z\right) \cdot t\\
\mathbf{if}\;y \leq -2 \cdot 10^{+54}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -6.8 \cdot 10^{-232}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 9 \cdot 10^{-287}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 5 \cdot 10^{-190}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{+66}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.0000000000000002e54 or 7.2e66 < y Initial program 100.0%
Taylor expanded in y around inf 87.5%
if -2.0000000000000002e54 < y < -6.8000000000000004e-232 or 5.00000000000000034e-190 < y < 7.2e66Initial program 100.0%
Taylor expanded in x around 0 50.7%
if -6.8000000000000004e-232 < y < 9.00000000000000034e-287Initial program 100.0%
Taylor expanded in y around inf 55.1%
*-commutative55.1%
Simplified55.1%
Taylor expanded in y around 0 54.9%
if 9.00000000000000034e-287 < y < 5.00000000000000034e-190Initial program 100.0%
Taylor expanded in x around inf 82.1%
mul-1-neg82.1%
unsub-neg82.1%
distribute-lft-out--82.1%
*-rgt-identity82.1%
Simplified82.1%
Taylor expanded in z around inf 61.7%
Final simplification66.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (- t x))))
(if (<= y -2e+54)
t_1
(if (<= y -3.4e+40)
(* z (- x t))
(if (<= y -2.15e-61)
(+ x t_1)
(if (<= y 2.5e+66) (- x (* z (- t x))) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (t - x);
double tmp;
if (y <= -2e+54) {
tmp = t_1;
} else if (y <= -3.4e+40) {
tmp = z * (x - t);
} else if (y <= -2.15e-61) {
tmp = x + t_1;
} else if (y <= 2.5e+66) {
tmp = x - (z * (t - 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 * (t - x)
if (y <= (-2d+54)) then
tmp = t_1
else if (y <= (-3.4d+40)) then
tmp = z * (x - t)
else if (y <= (-2.15d-61)) then
tmp = x + t_1
else if (y <= 2.5d+66) then
tmp = x - (z * (t - 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 * (t - x);
double tmp;
if (y <= -2e+54) {
tmp = t_1;
} else if (y <= -3.4e+40) {
tmp = z * (x - t);
} else if (y <= -2.15e-61) {
tmp = x + t_1;
} else if (y <= 2.5e+66) {
tmp = x - (z * (t - x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (t - x) tmp = 0 if y <= -2e+54: tmp = t_1 elif y <= -3.4e+40: tmp = z * (x - t) elif y <= -2.15e-61: tmp = x + t_1 elif y <= 2.5e+66: tmp = x - (z * (t - x)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(t - x)) tmp = 0.0 if (y <= -2e+54) tmp = t_1; elseif (y <= -3.4e+40) tmp = Float64(z * Float64(x - t)); elseif (y <= -2.15e-61) tmp = Float64(x + t_1); elseif (y <= 2.5e+66) tmp = Float64(x - Float64(z * Float64(t - x))); 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 <= -2e+54) tmp = t_1; elseif (y <= -3.4e+40) tmp = z * (x - t); elseif (y <= -2.15e-61) tmp = x + t_1; elseif (y <= 2.5e+66) tmp = x - (z * (t - x)); 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, -2e+54], t$95$1, If[LessEqual[y, -3.4e+40], N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.15e-61], N[(x + t$95$1), $MachinePrecision], If[LessEqual[y, 2.5e+66], N[(x - N[(z * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(t - x\right)\\
\mathbf{if}\;y \leq -2 \cdot 10^{+54}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.4 \cdot 10^{+40}:\\
\;\;\;\;z \cdot \left(x - t\right)\\
\mathbf{elif}\;y \leq -2.15 \cdot 10^{-61}:\\
\;\;\;\;x + t\_1\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+66}:\\
\;\;\;\;x - z \cdot \left(t - x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.0000000000000002e54 or 2.49999999999999996e66 < y Initial program 100.0%
Taylor expanded in y around inf 87.5%
if -2.0000000000000002e54 < y < -3.39999999999999989e40Initial program 100.0%
Taylor expanded in y around inf 100.0%
sub-neg100.0%
+-commutative100.0%
associate-+l+100.0%
+-commutative100.0%
mul-1-neg100.0%
unsub-neg100.0%
div-sub100.0%
unsub-neg100.0%
mul-1-neg100.0%
sub-neg100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in z around -inf 100.0%
mul-1-neg100.0%
distribute-rgt-neg-in100.0%
sub-neg100.0%
distribute-neg-in100.0%
remove-double-neg100.0%
Simplified100.0%
if -3.39999999999999989e40 < y < -2.1500000000000002e-61Initial program 99.9%
Taylor expanded in y around inf 74.3%
*-commutative74.3%
Simplified74.3%
if -2.1500000000000002e-61 < y < 2.49999999999999996e66Initial program 100.0%
Taylor expanded in y around 0 94.5%
mul-1-neg94.5%
unsub-neg94.5%
Simplified94.5%
Final simplification89.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- x t))))
(if (<= z -1.65e+77)
t_1
(if (<= z -29000.0)
(- x (* (- y z) x))
(if (<= z -2.9e-30)
(* (- y z) t)
(if (<= z 4.3e+18) (+ x (* y (- t x))) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = z * (x - t);
double tmp;
if (z <= -1.65e+77) {
tmp = t_1;
} else if (z <= -29000.0) {
tmp = x - ((y - z) * x);
} else if (z <= -2.9e-30) {
tmp = (y - z) * t;
} else if (z <= 4.3e+18) {
tmp = x + (y * (t - 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 * (x - t)
if (z <= (-1.65d+77)) then
tmp = t_1
else if (z <= (-29000.0d0)) then
tmp = x - ((y - z) * x)
else if (z <= (-2.9d-30)) then
tmp = (y - z) * t
else if (z <= 4.3d+18) then
tmp = x + (y * (t - 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 * (x - t);
double tmp;
if (z <= -1.65e+77) {
tmp = t_1;
} else if (z <= -29000.0) {
tmp = x - ((y - z) * x);
} else if (z <= -2.9e-30) {
tmp = (y - z) * t;
} else if (z <= 4.3e+18) {
tmp = x + (y * (t - x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (x - t) tmp = 0 if z <= -1.65e+77: tmp = t_1 elif z <= -29000.0: tmp = x - ((y - z) * x) elif z <= -2.9e-30: tmp = (y - z) * t elif z <= 4.3e+18: tmp = x + (y * (t - x)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(x - t)) tmp = 0.0 if (z <= -1.65e+77) tmp = t_1; elseif (z <= -29000.0) tmp = Float64(x - Float64(Float64(y - z) * x)); elseif (z <= -2.9e-30) tmp = Float64(Float64(y - z) * t); elseif (z <= 4.3e+18) tmp = Float64(x + Float64(y * Float64(t - x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * (x - t); tmp = 0.0; if (z <= -1.65e+77) tmp = t_1; elseif (z <= -29000.0) tmp = x - ((y - z) * x); elseif (z <= -2.9e-30) tmp = (y - z) * t; elseif (z <= 4.3e+18) tmp = x + (y * (t - x)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.65e+77], t$95$1, If[LessEqual[z, -29000.0], N[(x - N[(N[(y - z), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.9e-30], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 4.3e+18], N[(x + N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(x - t\right)\\
\mathbf{if}\;z \leq -1.65 \cdot 10^{+77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -29000:\\
\;\;\;\;x - \left(y - z\right) \cdot x\\
\mathbf{elif}\;z \leq -2.9 \cdot 10^{-30}:\\
\;\;\;\;\left(y - z\right) \cdot t\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{+18}:\\
\;\;\;\;x + y \cdot \left(t - x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.6499999999999999e77 or 4.3e18 < z Initial program 100.0%
Taylor expanded in y around inf 84.0%
sub-neg84.0%
+-commutative84.0%
associate-+l+84.0%
+-commutative84.0%
mul-1-neg84.0%
unsub-neg84.0%
div-sub90.7%
unsub-neg90.7%
mul-1-neg90.7%
sub-neg90.7%
+-commutative90.7%
Simplified90.7%
Taylor expanded in z around -inf 86.1%
mul-1-neg86.1%
distribute-rgt-neg-in86.1%
sub-neg86.1%
distribute-neg-in86.1%
remove-double-neg86.1%
Simplified86.1%
if -1.6499999999999999e77 < z < -29000Initial program 100.0%
Taylor expanded in x around inf 69.9%
mul-1-neg69.9%
unsub-neg69.9%
distribute-lft-out--69.9%
*-rgt-identity69.9%
Simplified69.9%
if -29000 < z < -2.89999999999999989e-30Initial program 100.0%
Taylor expanded in x around 0 78.5%
if -2.89999999999999989e-30 < z < 4.3e18Initial program 100.0%
Taylor expanded in y around inf 92.7%
*-commutative92.7%
Simplified92.7%
Final simplification88.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- y z) t)) (t_2 (- x (* y x))))
(if (<= t -7e-119)
t_1
(if (<= t 1.6e-71)
t_2
(if (<= t 1.65e-44) (* z x) (if (<= t 1000000.0) t_2 t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = (y - z) * t;
double t_2 = x - (y * x);
double tmp;
if (t <= -7e-119) {
tmp = t_1;
} else if (t <= 1.6e-71) {
tmp = t_2;
} else if (t <= 1.65e-44) {
tmp = z * x;
} else if (t <= 1000000.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 - z) * t
t_2 = x - (y * x)
if (t <= (-7d-119)) then
tmp = t_1
else if (t <= 1.6d-71) then
tmp = t_2
else if (t <= 1.65d-44) then
tmp = z * x
else if (t <= 1000000.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 - z) * t;
double t_2 = x - (y * x);
double tmp;
if (t <= -7e-119) {
tmp = t_1;
} else if (t <= 1.6e-71) {
tmp = t_2;
} else if (t <= 1.65e-44) {
tmp = z * x;
} else if (t <= 1000000.0) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - z) * t t_2 = x - (y * x) tmp = 0 if t <= -7e-119: tmp = t_1 elif t <= 1.6e-71: tmp = t_2 elif t <= 1.65e-44: tmp = z * x elif t <= 1000000.0: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - z) * t) t_2 = Float64(x - Float64(y * x)) tmp = 0.0 if (t <= -7e-119) tmp = t_1; elseif (t <= 1.6e-71) tmp = t_2; elseif (t <= 1.65e-44) tmp = Float64(z * x); elseif (t <= 1000000.0) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - z) * t; t_2 = x - (y * x); tmp = 0.0; if (t <= -7e-119) tmp = t_1; elseif (t <= 1.6e-71) tmp = t_2; elseif (t <= 1.65e-44) tmp = z * x; elseif (t <= 1000000.0) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(y * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7e-119], t$95$1, If[LessEqual[t, 1.6e-71], t$95$2, If[LessEqual[t, 1.65e-44], N[(z * x), $MachinePrecision], If[LessEqual[t, 1000000.0], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot t\\
t_2 := x - y \cdot x\\
\mathbf{if}\;t \leq -7 \cdot 10^{-119}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-71}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{-44}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;t \leq 1000000:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -7e-119 or 1e6 < t Initial program 100.0%
Taylor expanded in x around 0 77.5%
if -7e-119 < t < 1.5999999999999999e-71 or 1.65000000000000003e-44 < t < 1e6Initial program 100.0%
Taylor expanded in x around inf 88.6%
mul-1-neg88.6%
unsub-neg88.6%
distribute-lft-out--88.6%
*-rgt-identity88.6%
Simplified88.6%
Taylor expanded in z around 0 66.8%
if 1.5999999999999999e-71 < t < 1.65000000000000003e-44Initial program 100.0%
Taylor expanded in x around inf 63.3%
mul-1-neg63.3%
unsub-neg63.3%
distribute-lft-out--63.3%
*-rgt-identity63.3%
Simplified63.3%
Taylor expanded in z around inf 63.2%
Final simplification72.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -0.0027)
(* y t)
(if (<= y 9.5e-288)
x
(if (<= y 1.2e-156) (* z x) (if (<= y 0.0013) x (* y t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -0.0027) {
tmp = y * t;
} else if (y <= 9.5e-288) {
tmp = x;
} else if (y <= 1.2e-156) {
tmp = z * x;
} else if (y <= 0.0013) {
tmp = x;
} 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) :: tmp
if (y <= (-0.0027d0)) then
tmp = y * t
else if (y <= 9.5d-288) then
tmp = x
else if (y <= 1.2d-156) then
tmp = z * x
else if (y <= 0.0013d0) then
tmp = x
else
tmp = y * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -0.0027) {
tmp = y * t;
} else if (y <= 9.5e-288) {
tmp = x;
} else if (y <= 1.2e-156) {
tmp = z * x;
} else if (y <= 0.0013) {
tmp = x;
} else {
tmp = y * t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -0.0027: tmp = y * t elif y <= 9.5e-288: tmp = x elif y <= 1.2e-156: tmp = z * x elif y <= 0.0013: tmp = x else: tmp = y * t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -0.0027) tmp = Float64(y * t); elseif (y <= 9.5e-288) tmp = x; elseif (y <= 1.2e-156) tmp = Float64(z * x); elseif (y <= 0.0013) tmp = x; else tmp = Float64(y * t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -0.0027) tmp = y * t; elseif (y <= 9.5e-288) tmp = x; elseif (y <= 1.2e-156) tmp = z * x; elseif (y <= 0.0013) tmp = x; else tmp = y * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -0.0027], N[(y * t), $MachinePrecision], If[LessEqual[y, 9.5e-288], x, If[LessEqual[y, 1.2e-156], N[(z * x), $MachinePrecision], If[LessEqual[y, 0.0013], x, N[(y * t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.0027:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{-288}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{-156}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;y \leq 0.0013:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot t\\
\end{array}
\end{array}
if y < -0.0027000000000000001 or 0.0012999999999999999 < y Initial program 100.0%
Taylor expanded in x around 0 57.7%
Taylor expanded in y around inf 41.6%
if -0.0027000000000000001 < y < 9.49999999999999955e-288 or 1.2e-156 < y < 0.0012999999999999999Initial program 100.0%
Taylor expanded in y around inf 51.8%
*-commutative51.8%
Simplified51.8%
Taylor expanded in y around 0 43.1%
if 9.49999999999999955e-288 < y < 1.2e-156Initial program 100.0%
Taylor expanded in x around inf 74.0%
mul-1-neg74.0%
unsub-neg74.0%
distribute-lft-out--74.0%
*-rgt-identity74.0%
Simplified74.0%
Taylor expanded in z around inf 53.9%
Final simplification43.4%
(FPCore (x y z t) :precision binary64 (if (or (<= (- y z) -5e-8) (not (<= (- y z) 2e-76))) (* (- y z) t) x))
double code(double x, double y, double z, double t) {
double tmp;
if (((y - z) <= -5e-8) || !((y - z) <= 2e-76)) {
tmp = (y - z) * t;
} 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 (((y - z) <= (-5d-8)) .or. (.not. ((y - z) <= 2d-76))) then
tmp = (y - z) * t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((y - z) <= -5e-8) || !((y - z) <= 2e-76)) {
tmp = (y - z) * t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((y - z) <= -5e-8) or not ((y - z) <= 2e-76): tmp = (y - z) * t else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(y - z) <= -5e-8) || !(Float64(y - z) <= 2e-76)) tmp = Float64(Float64(y - z) * t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((y - z) <= -5e-8) || ~(((y - z) <= 2e-76))) tmp = (y - z) * t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(y - z), $MachinePrecision], -5e-8], N[Not[LessEqual[N[(y - z), $MachinePrecision], 2e-76]], $MachinePrecision]], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y - z \leq -5 \cdot 10^{-8} \lor \neg \left(y - z \leq 2 \cdot 10^{-76}\right):\\
\;\;\;\;\left(y - z\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if (-.f64 y z) < -4.9999999999999998e-8 or 1.99999999999999985e-76 < (-.f64 y z) Initial program 100.0%
Taylor expanded in x around 0 56.5%
if -4.9999999999999998e-8 < (-.f64 y z) < 1.99999999999999985e-76Initial program 100.0%
Taylor expanded in y around inf 91.1%
*-commutative91.1%
Simplified91.1%
Taylor expanded in y around 0 78.5%
Final simplification61.4%
(FPCore (x y z t) :precision binary64 (if (<= z -6e-56) (* z (- t)) (if (<= z -8.5e-116) (* y t) (if (<= z 1700000000000.0) x (* z x)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6e-56) {
tmp = z * -t;
} else if (z <= -8.5e-116) {
tmp = y * t;
} else if (z <= 1700000000000.0) {
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 <= (-6d-56)) then
tmp = z * -t
else if (z <= (-8.5d-116)) then
tmp = y * t
else if (z <= 1700000000000.0d0) 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 <= -6e-56) {
tmp = z * -t;
} else if (z <= -8.5e-116) {
tmp = y * t;
} else if (z <= 1700000000000.0) {
tmp = x;
} else {
tmp = z * x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -6e-56: tmp = z * -t elif z <= -8.5e-116: tmp = y * t elif z <= 1700000000000.0: tmp = x else: tmp = z * x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -6e-56) tmp = Float64(z * Float64(-t)); elseif (z <= -8.5e-116) tmp = Float64(y * t); elseif (z <= 1700000000000.0) tmp = x; else tmp = Float64(z * x); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -6e-56) tmp = z * -t; elseif (z <= -8.5e-116) tmp = y * t; elseif (z <= 1700000000000.0) tmp = x; else tmp = z * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -6e-56], N[(z * (-t)), $MachinePrecision], If[LessEqual[z, -8.5e-116], N[(y * t), $MachinePrecision], If[LessEqual[z, 1700000000000.0], x, N[(z * x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{-56}:\\
\;\;\;\;z \cdot \left(-t\right)\\
\mathbf{elif}\;z \leq -8.5 \cdot 10^{-116}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq 1700000000000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;z \cdot x\\
\end{array}
\end{array}
if z < -5.99999999999999979e-56Initial program 100.0%
Taylor expanded in x around 0 60.2%
Taylor expanded in y around 0 49.0%
mul-1-neg49.0%
*-commutative49.0%
distribute-rgt-neg-in49.0%
Simplified49.0%
if -5.99999999999999979e-56 < z < -8.4999999999999995e-116Initial program 99.9%
Taylor expanded in x around 0 69.7%
Taylor expanded in y around inf 60.4%
if -8.4999999999999995e-116 < z < 1.7e12Initial program 100.0%
Taylor expanded in y around inf 94.3%
*-commutative94.3%
Simplified94.3%
Taylor expanded in y around 0 43.4%
if 1.7e12 < z Initial program 100.0%
Taylor expanded in x around inf 53.4%
mul-1-neg53.4%
unsub-neg53.4%
distribute-lft-out--53.4%
*-rgt-identity53.4%
Simplified53.4%
Taylor expanded in z around inf 48.2%
Final simplification47.4%
(FPCore (x y z t) :precision binary64 (if (or (<= y -0.00125) (not (<= y 9.8e-6))) (* y t) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -0.00125) || !(y <= 9.8e-6)) {
tmp = y * t;
} 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 ((y <= (-0.00125d0)) .or. (.not. (y <= 9.8d-6))) then
tmp = y * t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -0.00125) || !(y <= 9.8e-6)) {
tmp = y * t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -0.00125) or not (y <= 9.8e-6): tmp = y * t else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -0.00125) || !(y <= 9.8e-6)) tmp = Float64(y * t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -0.00125) || ~((y <= 9.8e-6))) tmp = y * t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -0.00125], N[Not[LessEqual[y, 9.8e-6]], $MachinePrecision]], N[(y * t), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.00125 \lor \neg \left(y \leq 9.8 \cdot 10^{-6}\right):\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -0.00125000000000000003 or 9.79999999999999934e-6 < y Initial program 100.0%
Taylor expanded in x around 0 57.7%
Taylor expanded in y around inf 41.6%
if -0.00125000000000000003 < y < 9.79999999999999934e-6Initial program 100.0%
Taylor expanded in y around inf 46.1%
*-commutative46.1%
Simplified46.1%
Taylor expanded in y around 0 39.0%
Final simplification40.2%
(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 y around inf 61.0%
*-commutative61.0%
Simplified61.0%
Taylor expanded in y around 0 21.4%
(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 2024097
(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))))