
(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 18 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-def100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (- t x)))
(t_2 (* (- y z) t))
(t_3 (* z (- x t)))
(t_4 (* x (+ z 1.0))))
(if (<= y -5.9e+54)
t_1
(if (<= y -1.5e+17)
t_3
(if (<= y -5.2e-84)
(+ x (* y t))
(if (<= y -4.8e-111)
t_2
(if (<= y -7.8e-193)
t_4
(if (<= y 1.2e-259)
t_3
(if (<= y 8.6e-62) t_4 (if (<= y 2.3e+21) 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 t_3 = z * (x - t);
double t_4 = x * (z + 1.0);
double tmp;
if (y <= -5.9e+54) {
tmp = t_1;
} else if (y <= -1.5e+17) {
tmp = t_3;
} else if (y <= -5.2e-84) {
tmp = x + (y * t);
} else if (y <= -4.8e-111) {
tmp = t_2;
} else if (y <= -7.8e-193) {
tmp = t_4;
} else if (y <= 1.2e-259) {
tmp = t_3;
} else if (y <= 8.6e-62) {
tmp = t_4;
} else if (y <= 2.3e+21) {
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) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = y * (t - x)
t_2 = (y - z) * t
t_3 = z * (x - t)
t_4 = x * (z + 1.0d0)
if (y <= (-5.9d+54)) then
tmp = t_1
else if (y <= (-1.5d+17)) then
tmp = t_3
else if (y <= (-5.2d-84)) then
tmp = x + (y * t)
else if (y <= (-4.8d-111)) then
tmp = t_2
else if (y <= (-7.8d-193)) then
tmp = t_4
else if (y <= 1.2d-259) then
tmp = t_3
else if (y <= 8.6d-62) then
tmp = t_4
else if (y <= 2.3d+21) 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 t_3 = z * (x - t);
double t_4 = x * (z + 1.0);
double tmp;
if (y <= -5.9e+54) {
tmp = t_1;
} else if (y <= -1.5e+17) {
tmp = t_3;
} else if (y <= -5.2e-84) {
tmp = x + (y * t);
} else if (y <= -4.8e-111) {
tmp = t_2;
} else if (y <= -7.8e-193) {
tmp = t_4;
} else if (y <= 1.2e-259) {
tmp = t_3;
} else if (y <= 8.6e-62) {
tmp = t_4;
} else if (y <= 2.3e+21) {
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 t_3 = z * (x - t) t_4 = x * (z + 1.0) tmp = 0 if y <= -5.9e+54: tmp = t_1 elif y <= -1.5e+17: tmp = t_3 elif y <= -5.2e-84: tmp = x + (y * t) elif y <= -4.8e-111: tmp = t_2 elif y <= -7.8e-193: tmp = t_4 elif y <= 1.2e-259: tmp = t_3 elif y <= 8.6e-62: tmp = t_4 elif y <= 2.3e+21: 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) t_3 = Float64(z * Float64(x - t)) t_4 = Float64(x * Float64(z + 1.0)) tmp = 0.0 if (y <= -5.9e+54) tmp = t_1; elseif (y <= -1.5e+17) tmp = t_3; elseif (y <= -5.2e-84) tmp = Float64(x + Float64(y * t)); elseif (y <= -4.8e-111) tmp = t_2; elseif (y <= -7.8e-193) tmp = t_4; elseif (y <= 1.2e-259) tmp = t_3; elseif (y <= 8.6e-62) tmp = t_4; elseif (y <= 2.3e+21) 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; t_3 = z * (x - t); t_4 = x * (z + 1.0); tmp = 0.0; if (y <= -5.9e+54) tmp = t_1; elseif (y <= -1.5e+17) tmp = t_3; elseif (y <= -5.2e-84) tmp = x + (y * t); elseif (y <= -4.8e-111) tmp = t_2; elseif (y <= -7.8e-193) tmp = t_4; elseif (y <= 1.2e-259) tmp = t_3; elseif (y <= 8.6e-62) tmp = t_4; elseif (y <= 2.3e+21) 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]}, Block[{t$95$3 = N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.9e+54], t$95$1, If[LessEqual[y, -1.5e+17], t$95$3, If[LessEqual[y, -5.2e-84], N[(x + N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.8e-111], t$95$2, If[LessEqual[y, -7.8e-193], t$95$4, If[LessEqual[y, 1.2e-259], t$95$3, If[LessEqual[y, 8.6e-62], t$95$4, If[LessEqual[y, 2.3e+21], 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\\
t_3 := z \cdot \left(x - t\right)\\
t_4 := x \cdot \left(z + 1\right)\\
\mathbf{if}\;y \leq -5.9 \cdot 10^{+54}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.5 \cdot 10^{+17}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq -5.2 \cdot 10^{-84}:\\
\;\;\;\;x + y \cdot t\\
\mathbf{elif}\;y \leq -4.8 \cdot 10^{-111}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -7.8 \cdot 10^{-193}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{-259}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq 8.6 \cdot 10^{-62}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{+21}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.8999999999999997e54 or 2.3e21 < y Initial program 100.0%
Taylor expanded in x around 0 96.1%
fma-def96.9%
+-commutative96.9%
mul-1-neg96.9%
neg-sub096.9%
associate-+l-96.9%
associate--r+96.9%
+-commutative96.9%
neg-sub096.9%
distribute-rgt-neg-in96.9%
mul-1-neg96.9%
mul-1-neg96.9%
distribute-rgt-neg-in96.9%
neg-sub096.9%
+-commutative96.9%
associate--r+96.9%
associate-+l-96.9%
neg-sub096.9%
mul-1-neg96.9%
+-commutative96.9%
mul-1-neg96.9%
Simplified96.9%
Taylor expanded in y around inf 85.9%
neg-mul-185.9%
sub-neg85.9%
Simplified85.9%
if -5.8999999999999997e54 < y < -1.5e17 or -7.7999999999999997e-193 < y < 1.2e-259Initial program 100.0%
Taylor expanded in x around 0 96.9%
fma-def97.0%
+-commutative97.0%
mul-1-neg97.0%
neg-sub097.0%
associate-+l-97.0%
associate--r+97.0%
+-commutative97.0%
neg-sub097.0%
distribute-rgt-neg-in97.0%
mul-1-neg97.0%
mul-1-neg97.0%
distribute-rgt-neg-in97.0%
neg-sub097.0%
+-commutative97.0%
associate--r+97.0%
associate-+l-97.0%
neg-sub097.0%
mul-1-neg97.0%
+-commutative97.0%
mul-1-neg97.0%
Simplified97.0%
Taylor expanded in z around inf 85.1%
mul-1-neg85.1%
sub-neg85.1%
Simplified85.1%
if -1.5e17 < y < -5.2e-84Initial program 99.9%
Taylor expanded in t around inf 87.7%
Taylor expanded in y around inf 72.7%
*-commutative72.7%
Simplified72.7%
if -5.2e-84 < y < -4.8000000000000001e-111 or 8.5999999999999993e-62 < y < 2.3e21Initial program 100.0%
Taylor expanded in x around 0 100.0%
fma-def100.0%
+-commutative100.0%
mul-1-neg100.0%
neg-sub0100.0%
associate-+l-100.0%
associate--r+100.0%
+-commutative100.0%
neg-sub0100.0%
distribute-rgt-neg-in100.0%
mul-1-neg100.0%
mul-1-neg100.0%
distribute-rgt-neg-in100.0%
neg-sub0100.0%
+-commutative100.0%
associate--r+100.0%
associate-+l-100.0%
neg-sub0100.0%
mul-1-neg100.0%
+-commutative100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 74.6%
if -4.8000000000000001e-111 < y < -7.7999999999999997e-193 or 1.2e-259 < y < 8.5999999999999993e-62Initial program 100.0%
Taylor expanded in y around 0 94.7%
mul-1-neg94.7%
unsub-neg94.7%
Simplified94.7%
Taylor expanded in x around inf 71.1%
cancel-sign-sub-inv71.1%
metadata-eval71.1%
*-lft-identity71.1%
Simplified71.1%
Final simplification80.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (+ z 1.0))) (t_2 (* y (- t x))) (t_3 (* (- y z) t)))
(if (<= y -1.85e+55)
t_2
(if (<= y -3.6e-110)
t_3
(if (<= y -4.8e-191)
t_1
(if (<= y 1.3e-275)
t_3
(if (<= y 7.4e-61) t_1 (if (<= y 1.3e+15) t_3 t_2))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (z + 1.0);
double t_2 = y * (t - x);
double t_3 = (y - z) * t;
double tmp;
if (y <= -1.85e+55) {
tmp = t_2;
} else if (y <= -3.6e-110) {
tmp = t_3;
} else if (y <= -4.8e-191) {
tmp = t_1;
} else if (y <= 1.3e-275) {
tmp = t_3;
} else if (y <= 7.4e-61) {
tmp = t_1;
} else if (y <= 1.3e+15) {
tmp = t_3;
} else {
tmp = t_2;
}
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 + 1.0d0)
t_2 = y * (t - x)
t_3 = (y - z) * t
if (y <= (-1.85d+55)) then
tmp = t_2
else if (y <= (-3.6d-110)) then
tmp = t_3
else if (y <= (-4.8d-191)) then
tmp = t_1
else if (y <= 1.3d-275) then
tmp = t_3
else if (y <= 7.4d-61) then
tmp = t_1
else if (y <= 1.3d+15) then
tmp = t_3
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (z + 1.0);
double t_2 = y * (t - x);
double t_3 = (y - z) * t;
double tmp;
if (y <= -1.85e+55) {
tmp = t_2;
} else if (y <= -3.6e-110) {
tmp = t_3;
} else if (y <= -4.8e-191) {
tmp = t_1;
} else if (y <= 1.3e-275) {
tmp = t_3;
} else if (y <= 7.4e-61) {
tmp = t_1;
} else if (y <= 1.3e+15) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (z + 1.0) t_2 = y * (t - x) t_3 = (y - z) * t tmp = 0 if y <= -1.85e+55: tmp = t_2 elif y <= -3.6e-110: tmp = t_3 elif y <= -4.8e-191: tmp = t_1 elif y <= 1.3e-275: tmp = t_3 elif y <= 7.4e-61: tmp = t_1 elif y <= 1.3e+15: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(z + 1.0)) t_2 = Float64(y * Float64(t - x)) t_3 = Float64(Float64(y - z) * t) tmp = 0.0 if (y <= -1.85e+55) tmp = t_2; elseif (y <= -3.6e-110) tmp = t_3; elseif (y <= -4.8e-191) tmp = t_1; elseif (y <= 1.3e-275) tmp = t_3; elseif (y <= 7.4e-61) tmp = t_1; elseif (y <= 1.3e+15) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (z + 1.0); t_2 = y * (t - x); t_3 = (y - z) * t; tmp = 0.0; if (y <= -1.85e+55) tmp = t_2; elseif (y <= -3.6e-110) tmp = t_3; elseif (y <= -4.8e-191) tmp = t_1; elseif (y <= 1.3e-275) tmp = t_3; elseif (y <= 7.4e-61) tmp = t_1; elseif (y <= 1.3e+15) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[y, -1.85e+55], t$95$2, If[LessEqual[y, -3.6e-110], t$95$3, If[LessEqual[y, -4.8e-191], t$95$1, If[LessEqual[y, 1.3e-275], t$95$3, If[LessEqual[y, 7.4e-61], t$95$1, If[LessEqual[y, 1.3e+15], t$95$3, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(z + 1\right)\\
t_2 := y \cdot \left(t - x\right)\\
t_3 := \left(y - z\right) \cdot t\\
\mathbf{if}\;y \leq -1.85 \cdot 10^{+55}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -3.6 \cdot 10^{-110}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq -4.8 \cdot 10^{-191}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-275}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq 7.4 \cdot 10^{-61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{+15}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.8500000000000001e55 or 1.3e15 < y Initial program 100.0%
Taylor expanded in x around 0 96.1%
fma-def96.9%
+-commutative96.9%
mul-1-neg96.9%
neg-sub096.9%
associate-+l-96.9%
associate--r+96.9%
+-commutative96.9%
neg-sub096.9%
distribute-rgt-neg-in96.9%
mul-1-neg96.9%
mul-1-neg96.9%
distribute-rgt-neg-in96.9%
neg-sub096.9%
+-commutative96.9%
associate--r+96.9%
associate-+l-96.9%
neg-sub096.9%
mul-1-neg96.9%
+-commutative96.9%
mul-1-neg96.9%
Simplified96.9%
Taylor expanded in y around inf 85.9%
neg-mul-185.9%
sub-neg85.9%
Simplified85.9%
if -1.8500000000000001e55 < y < -3.59999999999999995e-110 or -4.7999999999999998e-191 < y < 1.29999999999999996e-275 or 7.3999999999999999e-61 < y < 1.3e15Initial program 100.0%
Taylor expanded in x around 0 98.5%
fma-def98.5%
+-commutative98.5%
mul-1-neg98.5%
neg-sub098.5%
associate-+l-98.5%
associate--r+98.5%
+-commutative98.5%
neg-sub098.5%
distribute-rgt-neg-in98.5%
mul-1-neg98.5%
mul-1-neg98.5%
distribute-rgt-neg-in98.5%
neg-sub098.5%
+-commutative98.5%
associate--r+98.5%
associate-+l-98.5%
neg-sub098.5%
mul-1-neg98.5%
+-commutative98.5%
mul-1-neg98.5%
Simplified98.5%
Taylor expanded in t around inf 69.8%
if -3.59999999999999995e-110 < y < -4.7999999999999998e-191 or 1.29999999999999996e-275 < y < 7.3999999999999999e-61Initial program 100.0%
Taylor expanded in y around 0 96.7%
mul-1-neg96.7%
unsub-neg96.7%
Simplified96.7%
Taylor expanded in x around inf 71.8%
cancel-sign-sub-inv71.8%
metadata-eval71.8%
*-lft-identity71.8%
Simplified71.8%
Final simplification78.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (+ z 1.0))) (t_2 (* y (- t x))) (t_3 (* (- y z) t)))
(if (<= y -1.9e+56)
t_2
(if (<= y -5.2e-111)
t_3
(if (<= y -2e-207)
t_1
(if (<= y 2.95e-260)
(* z (- x t))
(if (<= y 5.2e-61) t_1 (if (<= y 2.5e+24) t_3 t_2))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (z + 1.0);
double t_2 = y * (t - x);
double t_3 = (y - z) * t;
double tmp;
if (y <= -1.9e+56) {
tmp = t_2;
} else if (y <= -5.2e-111) {
tmp = t_3;
} else if (y <= -2e-207) {
tmp = t_1;
} else if (y <= 2.95e-260) {
tmp = z * (x - t);
} else if (y <= 5.2e-61) {
tmp = t_1;
} else if (y <= 2.5e+24) {
tmp = t_3;
} else {
tmp = t_2;
}
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 + 1.0d0)
t_2 = y * (t - x)
t_3 = (y - z) * t
if (y <= (-1.9d+56)) then
tmp = t_2
else if (y <= (-5.2d-111)) then
tmp = t_3
else if (y <= (-2d-207)) then
tmp = t_1
else if (y <= 2.95d-260) then
tmp = z * (x - t)
else if (y <= 5.2d-61) then
tmp = t_1
else if (y <= 2.5d+24) then
tmp = t_3
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (z + 1.0);
double t_2 = y * (t - x);
double t_3 = (y - z) * t;
double tmp;
if (y <= -1.9e+56) {
tmp = t_2;
} else if (y <= -5.2e-111) {
tmp = t_3;
} else if (y <= -2e-207) {
tmp = t_1;
} else if (y <= 2.95e-260) {
tmp = z * (x - t);
} else if (y <= 5.2e-61) {
tmp = t_1;
} else if (y <= 2.5e+24) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (z + 1.0) t_2 = y * (t - x) t_3 = (y - z) * t tmp = 0 if y <= -1.9e+56: tmp = t_2 elif y <= -5.2e-111: tmp = t_3 elif y <= -2e-207: tmp = t_1 elif y <= 2.95e-260: tmp = z * (x - t) elif y <= 5.2e-61: tmp = t_1 elif y <= 2.5e+24: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(z + 1.0)) t_2 = Float64(y * Float64(t - x)) t_3 = Float64(Float64(y - z) * t) tmp = 0.0 if (y <= -1.9e+56) tmp = t_2; elseif (y <= -5.2e-111) tmp = t_3; elseif (y <= -2e-207) tmp = t_1; elseif (y <= 2.95e-260) tmp = Float64(z * Float64(x - t)); elseif (y <= 5.2e-61) tmp = t_1; elseif (y <= 2.5e+24) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (z + 1.0); t_2 = y * (t - x); t_3 = (y - z) * t; tmp = 0.0; if (y <= -1.9e+56) tmp = t_2; elseif (y <= -5.2e-111) tmp = t_3; elseif (y <= -2e-207) tmp = t_1; elseif (y <= 2.95e-260) tmp = z * (x - t); elseif (y <= 5.2e-61) tmp = t_1; elseif (y <= 2.5e+24) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[y, -1.9e+56], t$95$2, If[LessEqual[y, -5.2e-111], t$95$3, If[LessEqual[y, -2e-207], t$95$1, If[LessEqual[y, 2.95e-260], N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.2e-61], t$95$1, If[LessEqual[y, 2.5e+24], t$95$3, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(z + 1\right)\\
t_2 := y \cdot \left(t - x\right)\\
t_3 := \left(y - z\right) \cdot t\\
\mathbf{if}\;y \leq -1.9 \cdot 10^{+56}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -5.2 \cdot 10^{-111}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq -2 \cdot 10^{-207}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.95 \cdot 10^{-260}:\\
\;\;\;\;z \cdot \left(x - t\right)\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{-61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+24}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.89999999999999998e56 or 2.50000000000000023e24 < y Initial program 100.0%
Taylor expanded in x around 0 96.1%
fma-def96.9%
+-commutative96.9%
mul-1-neg96.9%
neg-sub096.9%
associate-+l-96.9%
associate--r+96.9%
+-commutative96.9%
neg-sub096.9%
distribute-rgt-neg-in96.9%
mul-1-neg96.9%
mul-1-neg96.9%
distribute-rgt-neg-in96.9%
neg-sub096.9%
+-commutative96.9%
associate--r+96.9%
associate-+l-96.9%
neg-sub096.9%
mul-1-neg96.9%
+-commutative96.9%
mul-1-neg96.9%
Simplified96.9%
Taylor expanded in y around inf 85.9%
neg-mul-185.9%
sub-neg85.9%
Simplified85.9%
if -1.89999999999999998e56 < y < -5.19999999999999965e-111 or 5.20000000000000021e-61 < y < 2.50000000000000023e24Initial program 100.0%
Taylor expanded in x around 0 100.0%
fma-def100.0%
+-commutative100.0%
mul-1-neg100.0%
neg-sub0100.0%
associate-+l-100.0%
associate--r+100.0%
+-commutative100.0%
neg-sub0100.0%
distribute-rgt-neg-in100.0%
mul-1-neg100.0%
mul-1-neg100.0%
distribute-rgt-neg-in100.0%
neg-sub0100.0%
+-commutative100.0%
associate--r+100.0%
associate-+l-100.0%
neg-sub0100.0%
mul-1-neg100.0%
+-commutative100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 65.5%
if -5.19999999999999965e-111 < y < -1.99999999999999985e-207 or 2.95e-260 < y < 5.20000000000000021e-61Initial program 100.0%
Taylor expanded in y around 0 94.7%
mul-1-neg94.7%
unsub-neg94.7%
Simplified94.7%
Taylor expanded in x around inf 71.1%
cancel-sign-sub-inv71.1%
metadata-eval71.1%
*-lft-identity71.1%
Simplified71.1%
if -1.99999999999999985e-207 < y < 2.95e-260Initial program 99.9%
Taylor expanded in x around 0 95.9%
fma-def96.0%
+-commutative96.0%
mul-1-neg96.0%
neg-sub096.0%
associate-+l-96.0%
associate--r+96.0%
+-commutative96.0%
neg-sub096.0%
distribute-rgt-neg-in96.0%
mul-1-neg96.0%
mul-1-neg96.0%
distribute-rgt-neg-in96.0%
neg-sub096.0%
+-commutative96.0%
associate--r+96.0%
associate-+l-96.0%
neg-sub096.0%
mul-1-neg96.0%
+-commutative96.0%
mul-1-neg96.0%
Simplified96.0%
Taylor expanded in z around inf 84.1%
mul-1-neg84.1%
sub-neg84.1%
Simplified84.1%
Final simplification78.8%
(FPCore (x y z t)
:precision binary64
(if (<= z -56000000000000.0)
(* t (- z))
(if (<= z -4.1e-32)
(* y (- x))
(if (<= z 4.5e-291)
(* y t)
(if (<= z 9.5e-206) x (if (<= z 3.05e+57) (* y t) (* z x)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -56000000000000.0) {
tmp = t * -z;
} else if (z <= -4.1e-32) {
tmp = y * -x;
} else if (z <= 4.5e-291) {
tmp = y * t;
} else if (z <= 9.5e-206) {
tmp = x;
} else if (z <= 3.05e+57) {
tmp = y * 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) :: tmp
if (z <= (-56000000000000.0d0)) then
tmp = t * -z
else if (z <= (-4.1d-32)) then
tmp = y * -x
else if (z <= 4.5d-291) then
tmp = y * t
else if (z <= 9.5d-206) then
tmp = x
else if (z <= 3.05d+57) then
tmp = y * t
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 <= -56000000000000.0) {
tmp = t * -z;
} else if (z <= -4.1e-32) {
tmp = y * -x;
} else if (z <= 4.5e-291) {
tmp = y * t;
} else if (z <= 9.5e-206) {
tmp = x;
} else if (z <= 3.05e+57) {
tmp = y * t;
} else {
tmp = z * x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -56000000000000.0: tmp = t * -z elif z <= -4.1e-32: tmp = y * -x elif z <= 4.5e-291: tmp = y * t elif z <= 9.5e-206: tmp = x elif z <= 3.05e+57: tmp = y * t else: tmp = z * x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -56000000000000.0) tmp = Float64(t * Float64(-z)); elseif (z <= -4.1e-32) tmp = Float64(y * Float64(-x)); elseif (z <= 4.5e-291) tmp = Float64(y * t); elseif (z <= 9.5e-206) tmp = x; elseif (z <= 3.05e+57) tmp = Float64(y * t); else tmp = Float64(z * x); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -56000000000000.0) tmp = t * -z; elseif (z <= -4.1e-32) tmp = y * -x; elseif (z <= 4.5e-291) tmp = y * t; elseif (z <= 9.5e-206) tmp = x; elseif (z <= 3.05e+57) tmp = y * t; else tmp = z * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -56000000000000.0], N[(t * (-z)), $MachinePrecision], If[LessEqual[z, -4.1e-32], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 4.5e-291], N[(y * t), $MachinePrecision], If[LessEqual[z, 9.5e-206], x, If[LessEqual[z, 3.05e+57], N[(y * t), $MachinePrecision], N[(z * x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -56000000000000:\\
\;\;\;\;t \cdot \left(-z\right)\\
\mathbf{elif}\;z \leq -4.1 \cdot 10^{-32}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-291}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{-206}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.05 \cdot 10^{+57}:\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;z \cdot x\\
\end{array}
\end{array}
if z < -5.6e13Initial program 100.0%
Taylor expanded in y around 0 73.3%
mul-1-neg73.3%
unsub-neg73.3%
Simplified73.3%
Taylor expanded in t around inf 50.9%
*-commutative50.9%
Simplified50.9%
Taylor expanded in x around 0 51.0%
mul-1-neg51.0%
distribute-rgt-neg-out51.0%
Simplified51.0%
if -5.6e13 < z < -4.09999999999999975e-32Initial program 99.9%
Taylor expanded in x around 0 100.0%
fma-def100.0%
+-commutative100.0%
mul-1-neg100.0%
neg-sub0100.0%
associate-+l-100.0%
associate--r+100.0%
+-commutative100.0%
neg-sub0100.0%
distribute-rgt-neg-in100.0%
mul-1-neg100.0%
mul-1-neg100.0%
distribute-rgt-neg-in100.0%
neg-sub0100.0%
+-commutative100.0%
associate--r+100.0%
associate-+l-100.0%
neg-sub0100.0%
mul-1-neg100.0%
+-commutative100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in y around inf 69.2%
neg-mul-169.2%
sub-neg69.2%
Simplified69.2%
Taylor expanded in t around 0 50.2%
mul-1-neg50.2%
distribute-rgt-neg-in50.2%
Simplified50.2%
if -4.09999999999999975e-32 < z < 4.49999999999999974e-291 or 9.49999999999999979e-206 < z < 3.04999999999999988e57Initial program 100.0%
Taylor expanded in x around 0 96.6%
fma-def97.4%
+-commutative97.4%
mul-1-neg97.4%
neg-sub097.4%
associate-+l-97.4%
associate--r+97.4%
+-commutative97.4%
neg-sub097.4%
distribute-rgt-neg-in97.4%
mul-1-neg97.4%
mul-1-neg97.4%
distribute-rgt-neg-in97.4%
neg-sub097.4%
+-commutative97.4%
associate--r+97.4%
associate-+l-97.4%
neg-sub097.4%
mul-1-neg97.4%
+-commutative97.4%
mul-1-neg97.4%
Simplified97.4%
Taylor expanded in y around inf 66.0%
neg-mul-166.0%
sub-neg66.0%
Simplified66.0%
Taylor expanded in t around inf 48.5%
*-commutative48.5%
Simplified48.5%
if 4.49999999999999974e-291 < z < 9.49999999999999979e-206Initial program 99.9%
Taylor expanded in y around inf 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in y around 0 72.8%
if 3.04999999999999988e57 < z Initial program 100.0%
Taylor expanded in y around 0 75.6%
mul-1-neg75.6%
unsub-neg75.6%
Simplified75.6%
Taylor expanded in x around inf 47.7%
cancel-sign-sub-inv47.7%
metadata-eval47.7%
*-lft-identity47.7%
Simplified47.7%
Taylor expanded in z around inf 47.7%
Final simplification50.5%
(FPCore (x y z t)
:precision binary64
(if (or (<= x -8.4e-20)
(not (or (<= x 1.05e-110) (and (not (<= x 1.9e-45)) (<= x 8.2e+47)))))
(* x (- 1.0 y))
(* (- y z) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -8.4e-20) || !((x <= 1.05e-110) || (!(x <= 1.9e-45) && (x <= 8.2e+47)))) {
tmp = x * (1.0 - y);
} else {
tmp = (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 <= (-8.4d-20)) .or. (.not. (x <= 1.05d-110) .or. (.not. (x <= 1.9d-45)) .and. (x <= 8.2d+47))) then
tmp = x * (1.0d0 - y)
else
tmp = (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 <= -8.4e-20) || !((x <= 1.05e-110) || (!(x <= 1.9e-45) && (x <= 8.2e+47)))) {
tmp = x * (1.0 - y);
} else {
tmp = (y - z) * t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -8.4e-20) or not ((x <= 1.05e-110) or (not (x <= 1.9e-45) and (x <= 8.2e+47))): tmp = x * (1.0 - y) else: tmp = (y - z) * t return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -8.4e-20) || !((x <= 1.05e-110) || (!(x <= 1.9e-45) && (x <= 8.2e+47)))) tmp = Float64(x * Float64(1.0 - y)); else tmp = Float64(Float64(y - z) * t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -8.4e-20) || ~(((x <= 1.05e-110) || (~((x <= 1.9e-45)) && (x <= 8.2e+47))))) tmp = x * (1.0 - y); else tmp = (y - z) * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -8.4e-20], N[Not[Or[LessEqual[x, 1.05e-110], And[N[Not[LessEqual[x, 1.9e-45]], $MachinePrecision], LessEqual[x, 8.2e+47]]]], $MachinePrecision]], N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.4 \cdot 10^{-20} \lor \neg \left(x \leq 1.05 \cdot 10^{-110} \lor \neg \left(x \leq 1.9 \cdot 10^{-45}\right) \land x \leq 8.2 \cdot 10^{+47}\right):\\
\;\;\;\;x \cdot \left(1 - y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y - z\right) \cdot t\\
\end{array}
\end{array}
if x < -8.3999999999999996e-20 or 1.05000000000000001e-110 < x < 1.89999999999999999e-45 or 8.2000000000000002e47 < x Initial program 99.9%
Taylor expanded in y around inf 73.3%
*-commutative73.3%
Simplified73.3%
Taylor expanded in x around inf 63.5%
mul-1-neg63.5%
sub-neg63.5%
Simplified63.5%
if -8.3999999999999996e-20 < x < 1.05000000000000001e-110 or 1.89999999999999999e-45 < x < 8.2000000000000002e47Initial program 100.0%
Taylor expanded in x around 0 100.0%
fma-def100.0%
+-commutative100.0%
mul-1-neg100.0%
neg-sub0100.0%
associate-+l-100.0%
associate--r+100.0%
+-commutative100.0%
neg-sub0100.0%
distribute-rgt-neg-in100.0%
mul-1-neg100.0%
mul-1-neg100.0%
distribute-rgt-neg-in100.0%
neg-sub0100.0%
+-commutative100.0%
associate--r+100.0%
associate-+l-100.0%
neg-sub0100.0%
mul-1-neg100.0%
+-commutative100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 80.4%
Final simplification72.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (- t x))))
(if (<= y -6.2e+54)
t_1
(if (<= y -1850000000000.0)
(* z (- x t))
(if (<= y -4e-96)
(+ x (* y t))
(if (<= y 55000000000000.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 <= -6.2e+54) {
tmp = t_1;
} else if (y <= -1850000000000.0) {
tmp = z * (x - t);
} else if (y <= -4e-96) {
tmp = x + (y * t);
} else if (y <= 55000000000000.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 <= (-6.2d+54)) then
tmp = t_1
else if (y <= (-1850000000000.0d0)) then
tmp = z * (x - t)
else if (y <= (-4d-96)) then
tmp = x + (y * t)
else if (y <= 55000000000000.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 <= -6.2e+54) {
tmp = t_1;
} else if (y <= -1850000000000.0) {
tmp = z * (x - t);
} else if (y <= -4e-96) {
tmp = x + (y * t);
} else if (y <= 55000000000000.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 <= -6.2e+54: tmp = t_1 elif y <= -1850000000000.0: tmp = z * (x - t) elif y <= -4e-96: tmp = x + (y * t) elif y <= 55000000000000.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 <= -6.2e+54) tmp = t_1; elseif (y <= -1850000000000.0) tmp = Float64(z * Float64(x - t)); elseif (y <= -4e-96) tmp = Float64(x + Float64(y * t)); elseif (y <= 55000000000000.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 <= -6.2e+54) tmp = t_1; elseif (y <= -1850000000000.0) tmp = z * (x - t); elseif (y <= -4e-96) tmp = x + (y * t); elseif (y <= 55000000000000.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, -6.2e+54], t$95$1, If[LessEqual[y, -1850000000000.0], N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4e-96], N[(x + N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 55000000000000.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 -6.2 \cdot 10^{+54}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1850000000000:\\
\;\;\;\;z \cdot \left(x - t\right)\\
\mathbf{elif}\;y \leq -4 \cdot 10^{-96}:\\
\;\;\;\;x + y \cdot t\\
\mathbf{elif}\;y \leq 55000000000000:\\
\;\;\;\;x - z \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -6.1999999999999999e54 or 5.5e13 < y Initial program 100.0%
Taylor expanded in x around 0 96.1%
fma-def96.9%
+-commutative96.9%
mul-1-neg96.9%
neg-sub096.9%
associate-+l-96.9%
associate--r+96.9%
+-commutative96.9%
neg-sub096.9%
distribute-rgt-neg-in96.9%
mul-1-neg96.9%
mul-1-neg96.9%
distribute-rgt-neg-in96.9%
neg-sub096.9%
+-commutative96.9%
associate--r+96.9%
associate-+l-96.9%
neg-sub096.9%
mul-1-neg96.9%
+-commutative96.9%
mul-1-neg96.9%
Simplified96.9%
Taylor expanded in y around inf 85.9%
neg-mul-185.9%
sub-neg85.9%
Simplified85.9%
if -6.1999999999999999e54 < y < -1.85e12Initial program 100.0%
Taylor expanded in x around 0 100.0%
fma-def100.0%
+-commutative100.0%
mul-1-neg100.0%
neg-sub0100.0%
associate-+l-100.0%
associate--r+100.0%
+-commutative100.0%
neg-sub0100.0%
distribute-rgt-neg-in100.0%
mul-1-neg100.0%
mul-1-neg100.0%
distribute-rgt-neg-in100.0%
neg-sub0100.0%
+-commutative100.0%
associate--r+100.0%
associate-+l-100.0%
neg-sub0100.0%
mul-1-neg100.0%
+-commutative100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in z around inf 88.2%
mul-1-neg88.2%
sub-neg88.2%
Simplified88.2%
if -1.85e12 < y < -3.9999999999999996e-96Initial program 99.9%
Taylor expanded in t around inf 89.3%
Taylor expanded in y around inf 72.2%
*-commutative72.2%
Simplified72.2%
if -3.9999999999999996e-96 < y < 5.5e13Initial program 100.0%
Taylor expanded in y around 0 92.4%
mul-1-neg92.4%
unsub-neg92.4%
Simplified92.4%
Taylor expanded in t around inf 74.1%
*-commutative74.1%
Simplified74.1%
Final simplification80.3%
(FPCore (x y z t)
:precision binary64
(if (<= z -1.16e+61)
(* t (- z))
(if (<= z 2.6e-293)
(* y t)
(if (<= z 1.6e-205) x (if (<= z 8.5e+56) (* y t) (* z x))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.16e+61) {
tmp = t * -z;
} else if (z <= 2.6e-293) {
tmp = y * t;
} else if (z <= 1.6e-205) {
tmp = x;
} else if (z <= 8.5e+56) {
tmp = y * 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) :: tmp
if (z <= (-1.16d+61)) then
tmp = t * -z
else if (z <= 2.6d-293) then
tmp = y * t
else if (z <= 1.6d-205) then
tmp = x
else if (z <= 8.5d+56) then
tmp = y * t
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 <= -1.16e+61) {
tmp = t * -z;
} else if (z <= 2.6e-293) {
tmp = y * t;
} else if (z <= 1.6e-205) {
tmp = x;
} else if (z <= 8.5e+56) {
tmp = y * t;
} else {
tmp = z * x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.16e+61: tmp = t * -z elif z <= 2.6e-293: tmp = y * t elif z <= 1.6e-205: tmp = x elif z <= 8.5e+56: tmp = y * t else: tmp = z * x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.16e+61) tmp = Float64(t * Float64(-z)); elseif (z <= 2.6e-293) tmp = Float64(y * t); elseif (z <= 1.6e-205) tmp = x; elseif (z <= 8.5e+56) tmp = Float64(y * t); else tmp = Float64(z * x); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.16e+61) tmp = t * -z; elseif (z <= 2.6e-293) tmp = y * t; elseif (z <= 1.6e-205) tmp = x; elseif (z <= 8.5e+56) tmp = y * t; else tmp = z * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.16e+61], N[(t * (-z)), $MachinePrecision], If[LessEqual[z, 2.6e-293], N[(y * t), $MachinePrecision], If[LessEqual[z, 1.6e-205], x, If[LessEqual[z, 8.5e+56], N[(y * t), $MachinePrecision], N[(z * x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.16 \cdot 10^{+61}:\\
\;\;\;\;t \cdot \left(-z\right)\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-293}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-205}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+56}:\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;z \cdot x\\
\end{array}
\end{array}
if z < -1.16e61Initial program 100.0%
Taylor expanded in y around 0 81.4%
mul-1-neg81.4%
unsub-neg81.4%
Simplified81.4%
Taylor expanded in t around inf 54.0%
*-commutative54.0%
Simplified54.0%
Taylor expanded in x around 0 53.9%
mul-1-neg53.9%
distribute-rgt-neg-out53.9%
Simplified53.9%
if -1.16e61 < z < 2.5999999999999998e-293 or 1.60000000000000005e-205 < z < 8.4999999999999998e56Initial program 100.0%
Taylor expanded in x around 0 97.3%
fma-def98.0%
+-commutative98.0%
mul-1-neg98.0%
neg-sub098.0%
associate-+l-98.0%
associate--r+98.0%
+-commutative98.0%
neg-sub098.0%
distribute-rgt-neg-in98.0%
mul-1-neg98.0%
mul-1-neg98.0%
distribute-rgt-neg-in98.0%
neg-sub098.0%
+-commutative98.0%
associate--r+98.0%
associate-+l-98.0%
neg-sub098.0%
mul-1-neg98.0%
+-commutative98.0%
mul-1-neg98.0%
Simplified98.0%
Taylor expanded in y around inf 66.2%
neg-mul-166.2%
sub-neg66.2%
Simplified66.2%
Taylor expanded in t around inf 44.7%
*-commutative44.7%
Simplified44.7%
if 2.5999999999999998e-293 < z < 1.60000000000000005e-205Initial program 99.9%
Taylor expanded in y around inf 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in y around 0 72.8%
if 8.4999999999999998e56 < z Initial program 100.0%
Taylor expanded in y around 0 75.6%
mul-1-neg75.6%
unsub-neg75.6%
Simplified75.6%
Taylor expanded in x around inf 47.7%
cancel-sign-sub-inv47.7%
metadata-eval47.7%
*-lft-identity47.7%
Simplified47.7%
Taylor expanded in z around inf 47.7%
Final simplification48.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- x (* t (- z y)))))
(if (<= t -0.78)
t_1
(if (<= t -2.6e-58)
(- x (* y (- x t)))
(if (<= t 200.0) (* x (+ (- z y) 1.0)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = x - (t * (z - y));
double tmp;
if (t <= -0.78) {
tmp = t_1;
} else if (t <= -2.6e-58) {
tmp = x - (y * (x - t));
} else if (t <= 200.0) {
tmp = x * ((z - y) + 1.0);
} 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 = x - (t * (z - y))
if (t <= (-0.78d0)) then
tmp = t_1
else if (t <= (-2.6d-58)) then
tmp = x - (y * (x - t))
else if (t <= 200.0d0) then
tmp = x * ((z - y) + 1.0d0)
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 = x - (t * (z - y));
double tmp;
if (t <= -0.78) {
tmp = t_1;
} else if (t <= -2.6e-58) {
tmp = x - (y * (x - t));
} else if (t <= 200.0) {
tmp = x * ((z - y) + 1.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x - (t * (z - y)) tmp = 0 if t <= -0.78: tmp = t_1 elif t <= -2.6e-58: tmp = x - (y * (x - t)) elif t <= 200.0: tmp = x * ((z - y) + 1.0) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x - Float64(t * Float64(z - y))) tmp = 0.0 if (t <= -0.78) tmp = t_1; elseif (t <= -2.6e-58) tmp = Float64(x - Float64(y * Float64(x - t))); elseif (t <= 200.0) tmp = Float64(x * Float64(Float64(z - y) + 1.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x - (t * (z - y)); tmp = 0.0; if (t <= -0.78) tmp = t_1; elseif (t <= -2.6e-58) tmp = x - (y * (x - t)); elseif (t <= 200.0) tmp = x * ((z - y) + 1.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x - N[(t * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -0.78], t$95$1, If[LessEqual[t, -2.6e-58], N[(x - N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 200.0], N[(x * N[(N[(z - y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - t \cdot \left(z - y\right)\\
\mathbf{if}\;t \leq -0.78:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.6 \cdot 10^{-58}:\\
\;\;\;\;x - y \cdot \left(x - t\right)\\
\mathbf{elif}\;t \leq 200:\\
\;\;\;\;x \cdot \left(\left(z - y\right) + 1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -0.78000000000000003 or 200 < t Initial program 100.0%
Taylor expanded in t around inf 91.7%
if -0.78000000000000003 < t < -2.60000000000000007e-58Initial program 100.0%
Taylor expanded in y around inf 98.9%
*-commutative98.9%
Simplified98.9%
if -2.60000000000000007e-58 < t < 200Initial program 100.0%
Taylor expanded in x around inf 77.7%
mul-1-neg77.7%
unsub-neg77.7%
Simplified77.7%
Final simplification85.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (- t x))))
(if (<= y -1.15e+57)
t_1
(if (<= y -2.6e-110)
(- x (* t (- z y)))
(if (<= y 1.85e+86) (+ x (* 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 <= -1.15e+57) {
tmp = t_1;
} else if (y <= -2.6e-110) {
tmp = x - (t * (z - y));
} else if (y <= 1.85e+86) {
tmp = x + (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 <= (-1.15d+57)) then
tmp = t_1
else if (y <= (-2.6d-110)) then
tmp = x - (t * (z - y))
else if (y <= 1.85d+86) then
tmp = x + (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 <= -1.15e+57) {
tmp = t_1;
} else if (y <= -2.6e-110) {
tmp = x - (t * (z - y));
} else if (y <= 1.85e+86) {
tmp = x + (z * (x - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (t - x) tmp = 0 if y <= -1.15e+57: tmp = t_1 elif y <= -2.6e-110: tmp = x - (t * (z - y)) elif y <= 1.85e+86: tmp = x + (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 <= -1.15e+57) tmp = t_1; elseif (y <= -2.6e-110) tmp = Float64(x - Float64(t * Float64(z - y))); elseif (y <= 1.85e+86) tmp = Float64(x + 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 <= -1.15e+57) tmp = t_1; elseif (y <= -2.6e-110) tmp = x - (t * (z - y)); elseif (y <= 1.85e+86) tmp = x + (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, -1.15e+57], t$95$1, If[LessEqual[y, -2.6e-110], N[(x - N[(t * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.85e+86], N[(x + N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(t - x\right)\\
\mathbf{if}\;y \leq -1.15 \cdot 10^{+57}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.6 \cdot 10^{-110}:\\
\;\;\;\;x - t \cdot \left(z - y\right)\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{+86}:\\
\;\;\;\;x + z \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.1499999999999999e57 or 1.84999999999999996e86 < y Initial program 100.0%
Taylor expanded in x around 0 95.7%
fma-def96.6%
+-commutative96.6%
mul-1-neg96.6%
neg-sub096.6%
associate-+l-96.6%
associate--r+96.6%
+-commutative96.6%
neg-sub096.6%
distribute-rgt-neg-in96.6%
mul-1-neg96.6%
mul-1-neg96.6%
distribute-rgt-neg-in96.6%
neg-sub096.6%
+-commutative96.6%
associate--r+96.6%
associate-+l-96.6%
neg-sub096.6%
mul-1-neg96.6%
+-commutative96.6%
mul-1-neg96.6%
Simplified96.6%
Taylor expanded in y around inf 90.1%
neg-mul-190.1%
sub-neg90.1%
Simplified90.1%
if -1.1499999999999999e57 < y < -2.5999999999999999e-110Initial program 100.0%
Taylor expanded in t around inf 87.1%
if -2.5999999999999999e-110 < y < 1.84999999999999996e86Initial program 100.0%
Taylor expanded in y around 0 88.5%
mul-1-neg88.5%
unsub-neg88.5%
Simplified88.5%
Final simplification89.1%
(FPCore (x y z t) :precision binary64 (if (or (<= (- y z) -1e-60) (not (<= (- y z) 1e-13))) (* (- y z) t) x))
double code(double x, double y, double z, double t) {
double tmp;
if (((y - z) <= -1e-60) || !((y - z) <= 1e-13)) {
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) <= (-1d-60)) .or. (.not. ((y - z) <= 1d-13))) 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) <= -1e-60) || !((y - z) <= 1e-13)) {
tmp = (y - z) * t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((y - z) <= -1e-60) or not ((y - z) <= 1e-13): tmp = (y - z) * t else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(y - z) <= -1e-60) || !(Float64(y - z) <= 1e-13)) 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) <= -1e-60) || ~(((y - z) <= 1e-13))) tmp = (y - z) * t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(y - z), $MachinePrecision], -1e-60], N[Not[LessEqual[N[(y - z), $MachinePrecision], 1e-13]], $MachinePrecision]], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y - z \leq -1 \cdot 10^{-60} \lor \neg \left(y - z \leq 10^{-13}\right):\\
\;\;\;\;\left(y - z\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if (-.f64 y z) < -9.9999999999999997e-61 or 1e-13 < (-.f64 y z) Initial program 100.0%
Taylor expanded in x around 0 95.7%
fma-def96.6%
+-commutative96.6%
mul-1-neg96.6%
neg-sub096.6%
associate-+l-96.6%
associate--r+96.6%
+-commutative96.6%
neg-sub096.6%
distribute-rgt-neg-in96.6%
mul-1-neg96.6%
mul-1-neg96.6%
distribute-rgt-neg-in96.6%
neg-sub096.6%
+-commutative96.6%
associate--r+96.6%
associate-+l-96.6%
neg-sub096.6%
mul-1-neg96.6%
+-commutative96.6%
mul-1-neg96.6%
Simplified96.6%
Taylor expanded in t around inf 61.6%
if -9.9999999999999997e-61 < (-.f64 y z) < 1e-13Initial program 100.0%
Taylor expanded in y around inf 89.5%
*-commutative89.5%
Simplified89.5%
Taylor expanded in y around 0 70.1%
Final simplification63.2%
(FPCore (x y z t) :precision binary64 (if (or (<= t -0.15) (not (<= t 25500.0))) (* (- y z) t) (* x (+ (- z y) 1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -0.15) || !(t <= 25500.0)) {
tmp = (y - z) * t;
} 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 <= (-0.15d0)) .or. (.not. (t <= 25500.0d0))) then
tmp = (y - z) * t
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 <= -0.15) || !(t <= 25500.0)) {
tmp = (y - z) * t;
} else {
tmp = x * ((z - y) + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -0.15) or not (t <= 25500.0): tmp = (y - z) * t else: tmp = x * ((z - y) + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -0.15) || !(t <= 25500.0)) tmp = Float64(Float64(y - z) * t); 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 <= -0.15) || ~((t <= 25500.0))) tmp = (y - z) * t; else tmp = x * ((z - y) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -0.15], N[Not[LessEqual[t, 25500.0]], $MachinePrecision]], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision], N[(x * N[(N[(z - y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.15 \lor \neg \left(t \leq 25500\right):\\
\;\;\;\;\left(y - z\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\left(z - y\right) + 1\right)\\
\end{array}
\end{array}
if t < -0.149999999999999994 or 25500 < t Initial program 100.0%
Taylor expanded in x around 0 93.0%
fma-def94.5%
+-commutative94.5%
mul-1-neg94.5%
neg-sub094.5%
associate-+l-94.5%
associate--r+94.5%
+-commutative94.5%
neg-sub094.5%
distribute-rgt-neg-in94.5%
mul-1-neg94.5%
mul-1-neg94.5%
distribute-rgt-neg-in94.5%
neg-sub094.5%
+-commutative94.5%
associate--r+94.5%
associate-+l-94.5%
neg-sub094.5%
mul-1-neg94.5%
+-commutative94.5%
mul-1-neg94.5%
Simplified94.5%
Taylor expanded in t around inf 86.1%
if -0.149999999999999994 < t < 25500Initial program 100.0%
Taylor expanded in x around inf 76.2%
mul-1-neg76.2%
unsub-neg76.2%
Simplified76.2%
Final simplification81.1%
(FPCore (x y z t) :precision binary64 (if (or (<= t -0.095) (not (<= t 115.0))) (- x (* t (- z y))) (* x (+ (- z y) 1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -0.095) || !(t <= 115.0)) {
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 <= (-0.095d0)) .or. (.not. (t <= 115.0d0))) 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 <= -0.095) || !(t <= 115.0)) {
tmp = x - (t * (z - y));
} else {
tmp = x * ((z - y) + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -0.095) or not (t <= 115.0): 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 <= -0.095) || !(t <= 115.0)) 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 <= -0.095) || ~((t <= 115.0))) 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, -0.095], N[Not[LessEqual[t, 115.0]], $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 -0.095 \lor \neg \left(t \leq 115\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 < -0.095000000000000001 or 115 < t Initial program 100.0%
Taylor expanded in t around inf 91.7%
if -0.095000000000000001 < t < 115Initial program 100.0%
Taylor expanded in x around inf 76.0%
mul-1-neg76.0%
unsub-neg76.0%
Simplified76.0%
Final simplification83.9%
(FPCore (x y z t) :precision binary64 (if (or (<= t -1.65e-54) (not (<= t 5600000.0))) (* (- y z) t) (* x (+ z 1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.65e-54) || !(t <= 5600000.0)) {
tmp = (y - z) * t;
} else {
tmp = x * (z + 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 <= (-1.65d-54)) .or. (.not. (t <= 5600000.0d0))) then
tmp = (y - z) * t
else
tmp = x * (z + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.65e-54) || !(t <= 5600000.0)) {
tmp = (y - z) * t;
} else {
tmp = x * (z + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -1.65e-54) or not (t <= 5600000.0): tmp = (y - z) * t else: tmp = x * (z + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -1.65e-54) || !(t <= 5600000.0)) tmp = Float64(Float64(y - z) * t); else tmp = Float64(x * Float64(z + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -1.65e-54) || ~((t <= 5600000.0))) tmp = (y - z) * t; else tmp = x * (z + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -1.65e-54], N[Not[LessEqual[t, 5600000.0]], $MachinePrecision]], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision], N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.65 \cdot 10^{-54} \lor \neg \left(t \leq 5600000\right):\\
\;\;\;\;\left(y - z\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(z + 1\right)\\
\end{array}
\end{array}
if t < -1.64999999999999996e-54 or 5.6e6 < t Initial program 100.0%
Taylor expanded in x around 0 93.6%
fma-def95.0%
+-commutative95.0%
mul-1-neg95.0%
neg-sub095.0%
associate-+l-95.0%
associate--r+95.0%
+-commutative95.0%
neg-sub095.0%
distribute-rgt-neg-in95.0%
mul-1-neg95.0%
mul-1-neg95.0%
distribute-rgt-neg-in95.0%
neg-sub095.0%
+-commutative95.0%
associate--r+95.0%
associate-+l-95.0%
neg-sub095.0%
mul-1-neg95.0%
+-commutative95.0%
mul-1-neg95.0%
Simplified95.0%
Taylor expanded in t around inf 82.4%
if -1.64999999999999996e-54 < t < 5.6e6Initial program 100.0%
Taylor expanded in y around 0 64.0%
mul-1-neg64.0%
unsub-neg64.0%
Simplified64.0%
Taylor expanded in x around inf 52.4%
cancel-sign-sub-inv52.4%
metadata-eval52.4%
*-lft-identity52.4%
Simplified52.4%
Final simplification68.8%
(FPCore (x y z t) :precision binary64 (if (or (<= z -3.45e-9) (not (<= z 1.38e+29))) (* z x) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.45e-9) || !(z <= 1.38e+29)) {
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 <= (-3.45d-9)) .or. (.not. (z <= 1.38d+29))) 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 <= -3.45e-9) || !(z <= 1.38e+29)) {
tmp = z * x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -3.45e-9) or not (z <= 1.38e+29): tmp = z * x else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -3.45e-9) || !(z <= 1.38e+29)) tmp = Float64(z * x); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -3.45e-9) || ~((z <= 1.38e+29))) tmp = z * x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -3.45e-9], N[Not[LessEqual[z, 1.38e+29]], $MachinePrecision]], N[(z * x), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.45 \cdot 10^{-9} \lor \neg \left(z \leq 1.38 \cdot 10^{+29}\right):\\
\;\;\;\;z \cdot x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.44999999999999987e-9 or 1.38e29 < z Initial program 100.0%
Taylor expanded in y around 0 69.8%
mul-1-neg69.8%
unsub-neg69.8%
Simplified69.8%
Taylor expanded in x around inf 32.3%
cancel-sign-sub-inv32.3%
metadata-eval32.3%
*-lft-identity32.3%
Simplified32.3%
Taylor expanded in z around inf 31.5%
if -3.44999999999999987e-9 < z < 1.38e29Initial program 100.0%
Taylor expanded in y around inf 92.4%
*-commutative92.4%
Simplified92.4%
Taylor expanded in y around 0 30.3%
Final simplification30.9%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.1e-110) (not (<= y 2.35e-23))) (* y t) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.1e-110) || !(y <= 2.35e-23)) {
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 <= (-2.1d-110)) .or. (.not. (y <= 2.35d-23))) 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 <= -2.1e-110) || !(y <= 2.35e-23)) {
tmp = y * t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.1e-110) or not (y <= 2.35e-23): tmp = y * t else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.1e-110) || !(y <= 2.35e-23)) tmp = Float64(y * t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.1e-110) || ~((y <= 2.35e-23))) tmp = y * t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.1e-110], N[Not[LessEqual[y, 2.35e-23]], $MachinePrecision]], N[(y * t), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.1 \cdot 10^{-110} \lor \neg \left(y \leq 2.35 \cdot 10^{-23}\right):\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.10000000000000002e-110 or 2.35e-23 < y Initial program 100.0%
Taylor expanded in x around 0 97.1%
fma-def97.6%
+-commutative97.6%
mul-1-neg97.6%
neg-sub097.6%
associate-+l-97.6%
associate--r+97.6%
+-commutative97.6%
neg-sub097.6%
distribute-rgt-neg-in97.6%
mul-1-neg97.6%
mul-1-neg97.6%
distribute-rgt-neg-in97.6%
neg-sub097.6%
+-commutative97.6%
associate--r+97.6%
associate-+l-97.6%
neg-sub097.6%
mul-1-neg97.6%
+-commutative97.6%
mul-1-neg97.6%
Simplified97.6%
Taylor expanded in y around inf 74.1%
neg-mul-174.1%
sub-neg74.1%
Simplified74.1%
Taylor expanded in t around inf 47.9%
*-commutative47.9%
Simplified47.9%
if -2.10000000000000002e-110 < y < 2.35e-23Initial program 100.0%
Taylor expanded in y around inf 42.3%
*-commutative42.3%
Simplified42.3%
Taylor expanded in y around 0 37.8%
Final simplification44.5%
(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%
Taylor expanded in y around inf 67.1%
*-commutative67.1%
Simplified67.1%
Taylor expanded in y around 0 17.1%
Final simplification17.1%
(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 2024027
(FPCore (x y z t)
:name "Data.Metrics.Snapshot:quantile from metrics-0.3.0.2"
:precision binary64
:herbie-target
(+ x (+ (* t (- y z)) (* (- x) (- y z))))
(+ x (* (- y z) (- t x))))