
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))
double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + (((y - x) * 6.0d0) * ((2.0d0 / 3.0d0) - z))
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
def code(x, y, z): return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z))
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(Float64(2.0 / 3.0) - z))) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * ((2.0 / 3.0) - z)); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))
double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + (((y - x) * 6.0d0) * ((2.0d0 / 3.0d0) - z))
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
def code(x, y, z): return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z))
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(Float64(2.0 / 3.0) - z))) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * ((2.0 / 3.0) - z)); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right)
\end{array}
(FPCore (x y z) :precision binary64 (fma (- y x) (fma z -6.0 4.0) x))
double code(double x, double y, double z) {
return fma((y - x), fma(z, -6.0, 4.0), x);
}
function code(x, y, z) return fma(Float64(y - x), fma(z, -6.0, 4.0), x) end
code[x_, y_, z_] := N[(N[(y - x), $MachinePrecision] * N[(z * -6.0 + 4.0), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y - x, \mathsf{fma}\left(z, -6, 4\right), x\right)
\end{array}
Initial program 99.6%
+-commutative99.6%
associate-*l*99.7%
fma-def99.7%
sub-neg99.7%
+-commutative99.7%
distribute-lft-in99.7%
distribute-rgt-neg-out99.7%
distribute-lft-neg-in99.7%
*-commutative99.7%
fma-def99.8%
metadata-eval99.8%
metadata-eval99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z) :precision binary64 (fma (- y x) (+ 4.0 (* z -6.0)) x))
double code(double x, double y, double z) {
return fma((y - x), (4.0 + (z * -6.0)), x);
}
function code(x, y, z) return fma(Float64(y - x), Float64(4.0 + Float64(z * -6.0)), x) end
code[x_, y_, z_] := N[(N[(y - x), $MachinePrecision] * N[(4.0 + N[(z * -6.0), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y - x, 4 + z \cdot -6, x\right)
\end{array}
Initial program 99.6%
+-commutative99.6%
associate-*l*99.7%
fma-def99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))) (t_1 (* 6.0 (* x z))))
(if (<= z -4e+225)
t_0
(if (<= z -4.2e+178)
t_1
(if (<= z -1.95e+141)
t_0
(if (<= z -7.8e-10)
t_1
(if (<= z -6.5e-257)
(* y 4.0)
(if (<= z 3.1e-220)
(* x -3.0)
(if (<= z 3.8e-188)
(* y 4.0)
(if (<= z 1.1e-5)
(* x -3.0)
(if (or (<= z 1.95e+174)
(and (not (<= z 1.22e+201)) (<= z 6.6e+237)))
t_1
t_0)))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double t_1 = 6.0 * (x * z);
double tmp;
if (z <= -4e+225) {
tmp = t_0;
} else if (z <= -4.2e+178) {
tmp = t_1;
} else if (z <= -1.95e+141) {
tmp = t_0;
} else if (z <= -7.8e-10) {
tmp = t_1;
} else if (z <= -6.5e-257) {
tmp = y * 4.0;
} else if (z <= 3.1e-220) {
tmp = x * -3.0;
} else if (z <= 3.8e-188) {
tmp = y * 4.0;
} else if (z <= 1.1e-5) {
tmp = x * -3.0;
} else if ((z <= 1.95e+174) || (!(z <= 1.22e+201) && (z <= 6.6e+237))) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (-6.0d0) * (y * z)
t_1 = 6.0d0 * (x * z)
if (z <= (-4d+225)) then
tmp = t_0
else if (z <= (-4.2d+178)) then
tmp = t_1
else if (z <= (-1.95d+141)) then
tmp = t_0
else if (z <= (-7.8d-10)) then
tmp = t_1
else if (z <= (-6.5d-257)) then
tmp = y * 4.0d0
else if (z <= 3.1d-220) then
tmp = x * (-3.0d0)
else if (z <= 3.8d-188) then
tmp = y * 4.0d0
else if (z <= 1.1d-5) then
tmp = x * (-3.0d0)
else if ((z <= 1.95d+174) .or. (.not. (z <= 1.22d+201)) .and. (z <= 6.6d+237)) then
tmp = t_1
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double t_1 = 6.0 * (x * z);
double tmp;
if (z <= -4e+225) {
tmp = t_0;
} else if (z <= -4.2e+178) {
tmp = t_1;
} else if (z <= -1.95e+141) {
tmp = t_0;
} else if (z <= -7.8e-10) {
tmp = t_1;
} else if (z <= -6.5e-257) {
tmp = y * 4.0;
} else if (z <= 3.1e-220) {
tmp = x * -3.0;
} else if (z <= 3.8e-188) {
tmp = y * 4.0;
} else if (z <= 1.1e-5) {
tmp = x * -3.0;
} else if ((z <= 1.95e+174) || (!(z <= 1.22e+201) && (z <= 6.6e+237))) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) t_1 = 6.0 * (x * z) tmp = 0 if z <= -4e+225: tmp = t_0 elif z <= -4.2e+178: tmp = t_1 elif z <= -1.95e+141: tmp = t_0 elif z <= -7.8e-10: tmp = t_1 elif z <= -6.5e-257: tmp = y * 4.0 elif z <= 3.1e-220: tmp = x * -3.0 elif z <= 3.8e-188: tmp = y * 4.0 elif z <= 1.1e-5: tmp = x * -3.0 elif (z <= 1.95e+174) or (not (z <= 1.22e+201) and (z <= 6.6e+237)): tmp = t_1 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(y * z)) t_1 = Float64(6.0 * Float64(x * z)) tmp = 0.0 if (z <= -4e+225) tmp = t_0; elseif (z <= -4.2e+178) tmp = t_1; elseif (z <= -1.95e+141) tmp = t_0; elseif (z <= -7.8e-10) tmp = t_1; elseif (z <= -6.5e-257) tmp = Float64(y * 4.0); elseif (z <= 3.1e-220) tmp = Float64(x * -3.0); elseif (z <= 3.8e-188) tmp = Float64(y * 4.0); elseif (z <= 1.1e-5) tmp = Float64(x * -3.0); elseif ((z <= 1.95e+174) || (!(z <= 1.22e+201) && (z <= 6.6e+237))) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (y * z); t_1 = 6.0 * (x * z); tmp = 0.0; if (z <= -4e+225) tmp = t_0; elseif (z <= -4.2e+178) tmp = t_1; elseif (z <= -1.95e+141) tmp = t_0; elseif (z <= -7.8e-10) tmp = t_1; elseif (z <= -6.5e-257) tmp = y * 4.0; elseif (z <= 3.1e-220) tmp = x * -3.0; elseif (z <= 3.8e-188) tmp = y * 4.0; elseif (z <= 1.1e-5) tmp = x * -3.0; elseif ((z <= 1.95e+174) || (~((z <= 1.22e+201)) && (z <= 6.6e+237))) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4e+225], t$95$0, If[LessEqual[z, -4.2e+178], t$95$1, If[LessEqual[z, -1.95e+141], t$95$0, If[LessEqual[z, -7.8e-10], t$95$1, If[LessEqual[z, -6.5e-257], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 3.1e-220], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 3.8e-188], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.1e-5], N[(x * -3.0), $MachinePrecision], If[Or[LessEqual[z, 1.95e+174], And[N[Not[LessEqual[z, 1.22e+201]], $MachinePrecision], LessEqual[z, 6.6e+237]]], t$95$1, t$95$0]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
t_1 := 6 \cdot \left(x \cdot z\right)\\
\mathbf{if}\;z \leq -4 \cdot 10^{+225}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -4.2 \cdot 10^{+178}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.95 \cdot 10^{+141}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -7.8 \cdot 10^{-10}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -6.5 \cdot 10^{-257}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-220}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-188}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-5}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{+174} \lor \neg \left(z \leq 1.22 \cdot 10^{+201}\right) \land z \leq 6.6 \cdot 10^{+237}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -3.99999999999999971e225 or -4.1999999999999997e178 < z < -1.94999999999999996e141 or 1.9499999999999999e174 < z < 1.22000000000000004e201 or 6.6000000000000001e237 < z Initial program 99.8%
+-commutative99.8%
associate-*l*99.8%
fma-def99.8%
sub-neg99.8%
distribute-rgt-in99.8%
metadata-eval99.8%
metadata-eval99.8%
distribute-lft-neg-out99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 78.0%
Taylor expanded in z around inf 78.0%
if -3.99999999999999971e225 < z < -4.1999999999999997e178 or -1.94999999999999996e141 < z < -7.7999999999999999e-10 or 1.1e-5 < z < 1.9499999999999999e174 or 1.22000000000000004e201 < z < 6.6000000000000001e237Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 71.1%
sub-neg71.1%
distribute-rgt-in71.1%
metadata-eval71.1%
neg-mul-171.1%
associate-*r*71.1%
*-commutative71.1%
associate-+r+71.1%
metadata-eval71.1%
associate-*r*71.1%
metadata-eval71.1%
*-commutative71.1%
Simplified71.1%
Taylor expanded in z around inf 68.2%
*-commutative68.2%
Simplified68.2%
if -7.7999999999999999e-10 < z < -6.5000000000000002e-257 or 3.10000000000000011e-220 < z < 3.8e-188Initial program 99.4%
+-commutative99.4%
associate-*l*99.9%
fma-def99.9%
sub-neg99.9%
distribute-rgt-in99.9%
metadata-eval99.9%
metadata-eval99.9%
distribute-lft-neg-out99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 65.0%
Taylor expanded in z around 0 65.0%
*-commutative65.0%
Simplified65.0%
if -6.5000000000000002e-257 < z < 3.10000000000000011e-220 or 3.8e-188 < z < 1.1e-5Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 64.1%
sub-neg64.1%
distribute-rgt-in64.1%
metadata-eval64.1%
neg-mul-164.1%
associate-*r*64.1%
*-commutative64.1%
associate-+r+64.1%
metadata-eval64.1%
associate-*r*64.1%
metadata-eval64.1%
*-commutative64.1%
Simplified64.1%
Taylor expanded in z around 0 64.1%
*-commutative64.1%
Simplified64.1%
Final simplification69.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))) (t_1 (* x (* z 6.0))))
(if (<= z -1.26e+228)
t_0
(if (<= z -7e+177)
t_1
(if (<= z -7.5e+141)
t_0
(if (<= z -7.8e-10)
t_1
(if (<= z -3e-273)
(* y 4.0)
(if (<= z 3.7e-220)
(* x -3.0)
(if (<= z 3.8e-189)
(* y 4.0)
(if (<= z 1.1e-5)
(* x -3.0)
(if (<= z 2.45e+173)
(* 6.0 (* x z))
(if (or (<= z 1.45e+199) (not (<= z 1.35e+237)))
t_0
t_1))))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double t_1 = x * (z * 6.0);
double tmp;
if (z <= -1.26e+228) {
tmp = t_0;
} else if (z <= -7e+177) {
tmp = t_1;
} else if (z <= -7.5e+141) {
tmp = t_0;
} else if (z <= -7.8e-10) {
tmp = t_1;
} else if (z <= -3e-273) {
tmp = y * 4.0;
} else if (z <= 3.7e-220) {
tmp = x * -3.0;
} else if (z <= 3.8e-189) {
tmp = y * 4.0;
} else if (z <= 1.1e-5) {
tmp = x * -3.0;
} else if (z <= 2.45e+173) {
tmp = 6.0 * (x * z);
} else if ((z <= 1.45e+199) || !(z <= 1.35e+237)) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (-6.0d0) * (y * z)
t_1 = x * (z * 6.0d0)
if (z <= (-1.26d+228)) then
tmp = t_0
else if (z <= (-7d+177)) then
tmp = t_1
else if (z <= (-7.5d+141)) then
tmp = t_0
else if (z <= (-7.8d-10)) then
tmp = t_1
else if (z <= (-3d-273)) then
tmp = y * 4.0d0
else if (z <= 3.7d-220) then
tmp = x * (-3.0d0)
else if (z <= 3.8d-189) then
tmp = y * 4.0d0
else if (z <= 1.1d-5) then
tmp = x * (-3.0d0)
else if (z <= 2.45d+173) then
tmp = 6.0d0 * (x * z)
else if ((z <= 1.45d+199) .or. (.not. (z <= 1.35d+237))) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double t_1 = x * (z * 6.0);
double tmp;
if (z <= -1.26e+228) {
tmp = t_0;
} else if (z <= -7e+177) {
tmp = t_1;
} else if (z <= -7.5e+141) {
tmp = t_0;
} else if (z <= -7.8e-10) {
tmp = t_1;
} else if (z <= -3e-273) {
tmp = y * 4.0;
} else if (z <= 3.7e-220) {
tmp = x * -3.0;
} else if (z <= 3.8e-189) {
tmp = y * 4.0;
} else if (z <= 1.1e-5) {
tmp = x * -3.0;
} else if (z <= 2.45e+173) {
tmp = 6.0 * (x * z);
} else if ((z <= 1.45e+199) || !(z <= 1.35e+237)) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) t_1 = x * (z * 6.0) tmp = 0 if z <= -1.26e+228: tmp = t_0 elif z <= -7e+177: tmp = t_1 elif z <= -7.5e+141: tmp = t_0 elif z <= -7.8e-10: tmp = t_1 elif z <= -3e-273: tmp = y * 4.0 elif z <= 3.7e-220: tmp = x * -3.0 elif z <= 3.8e-189: tmp = y * 4.0 elif z <= 1.1e-5: tmp = x * -3.0 elif z <= 2.45e+173: tmp = 6.0 * (x * z) elif (z <= 1.45e+199) or not (z <= 1.35e+237): tmp = t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(y * z)) t_1 = Float64(x * Float64(z * 6.0)) tmp = 0.0 if (z <= -1.26e+228) tmp = t_0; elseif (z <= -7e+177) tmp = t_1; elseif (z <= -7.5e+141) tmp = t_0; elseif (z <= -7.8e-10) tmp = t_1; elseif (z <= -3e-273) tmp = Float64(y * 4.0); elseif (z <= 3.7e-220) tmp = Float64(x * -3.0); elseif (z <= 3.8e-189) tmp = Float64(y * 4.0); elseif (z <= 1.1e-5) tmp = Float64(x * -3.0); elseif (z <= 2.45e+173) tmp = Float64(6.0 * Float64(x * z)); elseif ((z <= 1.45e+199) || !(z <= 1.35e+237)) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (y * z); t_1 = x * (z * 6.0); tmp = 0.0; if (z <= -1.26e+228) tmp = t_0; elseif (z <= -7e+177) tmp = t_1; elseif (z <= -7.5e+141) tmp = t_0; elseif (z <= -7.8e-10) tmp = t_1; elseif (z <= -3e-273) tmp = y * 4.0; elseif (z <= 3.7e-220) tmp = x * -3.0; elseif (z <= 3.8e-189) tmp = y * 4.0; elseif (z <= 1.1e-5) tmp = x * -3.0; elseif (z <= 2.45e+173) tmp = 6.0 * (x * z); elseif ((z <= 1.45e+199) || ~((z <= 1.35e+237))) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.26e+228], t$95$0, If[LessEqual[z, -7e+177], t$95$1, If[LessEqual[z, -7.5e+141], t$95$0, If[LessEqual[z, -7.8e-10], t$95$1, If[LessEqual[z, -3e-273], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 3.7e-220], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 3.8e-189], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.1e-5], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.45e+173], N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 1.45e+199], N[Not[LessEqual[z, 1.35e+237]], $MachinePrecision]], t$95$0, t$95$1]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
t_1 := x \cdot \left(z \cdot 6\right)\\
\mathbf{if}\;z \leq -1.26 \cdot 10^{+228}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -7 \cdot 10^{+177}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{+141}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -7.8 \cdot 10^{-10}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3 \cdot 10^{-273}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{-220}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-189}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-5}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{+173}:\\
\;\;\;\;6 \cdot \left(x \cdot z\right)\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{+199} \lor \neg \left(z \leq 1.35 \cdot 10^{+237}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.26e228 or -6.99999999999999983e177 < z < -7.49999999999999937e141 or 2.45e173 < z < 1.4499999999999999e199 or 1.35e237 < z Initial program 99.8%
+-commutative99.8%
associate-*l*99.8%
fma-def99.8%
sub-neg99.8%
distribute-rgt-in99.8%
metadata-eval99.8%
metadata-eval99.8%
distribute-lft-neg-out99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 78.0%
Taylor expanded in z around inf 78.0%
if -1.26e228 < z < -6.99999999999999983e177 or -7.49999999999999937e141 < z < -7.7999999999999999e-10 or 1.4499999999999999e199 < z < 1.35e237Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 76.9%
sub-neg76.9%
distribute-rgt-in76.9%
metadata-eval76.9%
neg-mul-176.9%
associate-*r*76.9%
*-commutative76.9%
associate-+r+76.9%
metadata-eval76.9%
associate-*r*76.9%
metadata-eval76.9%
*-commutative76.9%
Simplified76.9%
Taylor expanded in z around inf 71.9%
if -7.7999999999999999e-10 < z < -2.99999999999999987e-273 or 3.70000000000000015e-220 < z < 3.80000000000000022e-189Initial program 99.4%
+-commutative99.4%
associate-*l*99.9%
fma-def99.9%
sub-neg99.9%
distribute-rgt-in99.9%
metadata-eval99.9%
metadata-eval99.9%
distribute-lft-neg-out99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 65.0%
Taylor expanded in z around 0 65.0%
*-commutative65.0%
Simplified65.0%
if -2.99999999999999987e-273 < z < 3.70000000000000015e-220 or 3.80000000000000022e-189 < z < 1.1e-5Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 64.1%
sub-neg64.1%
distribute-rgt-in64.1%
metadata-eval64.1%
neg-mul-164.1%
associate-*r*64.1%
*-commutative64.1%
associate-+r+64.1%
metadata-eval64.1%
associate-*r*64.1%
metadata-eval64.1%
*-commutative64.1%
Simplified64.1%
Taylor expanded in z around 0 64.1%
*-commutative64.1%
Simplified64.1%
if 1.1e-5 < z < 2.45e173Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 63.1%
sub-neg63.1%
distribute-rgt-in63.1%
metadata-eval63.1%
neg-mul-163.1%
associate-*r*63.1%
*-commutative63.1%
associate-+r+63.1%
metadata-eval63.1%
associate-*r*63.1%
metadata-eval63.1%
*-commutative63.1%
Simplified63.1%
Taylor expanded in z around inf 63.1%
*-commutative63.1%
Simplified63.1%
Final simplification69.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))) (t_1 (* x (* z 6.0))))
(if (<= z -1.2e+229)
t_0
(if (<= z -1.95e+178)
t_1
(if (<= z -1.25e+142)
(* y (* z -6.0))
(if (<= z -7.8e-10)
t_1
(if (<= z -8.9e-265)
(* y 4.0)
(if (<= z 5.3e-220)
(* x -3.0)
(if (<= z 1.45e-188)
(* y 4.0)
(if (<= z 1.1e-5)
(* x -3.0)
(if (<= z 4e+174)
(* 6.0 (* x z))
(if (or (<= z 4.5e+199) (not (<= z 1.25e+236)))
t_0
t_1))))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double t_1 = x * (z * 6.0);
double tmp;
if (z <= -1.2e+229) {
tmp = t_0;
} else if (z <= -1.95e+178) {
tmp = t_1;
} else if (z <= -1.25e+142) {
tmp = y * (z * -6.0);
} else if (z <= -7.8e-10) {
tmp = t_1;
} else if (z <= -8.9e-265) {
tmp = y * 4.0;
} else if (z <= 5.3e-220) {
tmp = x * -3.0;
} else if (z <= 1.45e-188) {
tmp = y * 4.0;
} else if (z <= 1.1e-5) {
tmp = x * -3.0;
} else if (z <= 4e+174) {
tmp = 6.0 * (x * z);
} else if ((z <= 4.5e+199) || !(z <= 1.25e+236)) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (-6.0d0) * (y * z)
t_1 = x * (z * 6.0d0)
if (z <= (-1.2d+229)) then
tmp = t_0
else if (z <= (-1.95d+178)) then
tmp = t_1
else if (z <= (-1.25d+142)) then
tmp = y * (z * (-6.0d0))
else if (z <= (-7.8d-10)) then
tmp = t_1
else if (z <= (-8.9d-265)) then
tmp = y * 4.0d0
else if (z <= 5.3d-220) then
tmp = x * (-3.0d0)
else if (z <= 1.45d-188) then
tmp = y * 4.0d0
else if (z <= 1.1d-5) then
tmp = x * (-3.0d0)
else if (z <= 4d+174) then
tmp = 6.0d0 * (x * z)
else if ((z <= 4.5d+199) .or. (.not. (z <= 1.25d+236))) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double t_1 = x * (z * 6.0);
double tmp;
if (z <= -1.2e+229) {
tmp = t_0;
} else if (z <= -1.95e+178) {
tmp = t_1;
} else if (z <= -1.25e+142) {
tmp = y * (z * -6.0);
} else if (z <= -7.8e-10) {
tmp = t_1;
} else if (z <= -8.9e-265) {
tmp = y * 4.0;
} else if (z <= 5.3e-220) {
tmp = x * -3.0;
} else if (z <= 1.45e-188) {
tmp = y * 4.0;
} else if (z <= 1.1e-5) {
tmp = x * -3.0;
} else if (z <= 4e+174) {
tmp = 6.0 * (x * z);
} else if ((z <= 4.5e+199) || !(z <= 1.25e+236)) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) t_1 = x * (z * 6.0) tmp = 0 if z <= -1.2e+229: tmp = t_0 elif z <= -1.95e+178: tmp = t_1 elif z <= -1.25e+142: tmp = y * (z * -6.0) elif z <= -7.8e-10: tmp = t_1 elif z <= -8.9e-265: tmp = y * 4.0 elif z <= 5.3e-220: tmp = x * -3.0 elif z <= 1.45e-188: tmp = y * 4.0 elif z <= 1.1e-5: tmp = x * -3.0 elif z <= 4e+174: tmp = 6.0 * (x * z) elif (z <= 4.5e+199) or not (z <= 1.25e+236): tmp = t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(y * z)) t_1 = Float64(x * Float64(z * 6.0)) tmp = 0.0 if (z <= -1.2e+229) tmp = t_0; elseif (z <= -1.95e+178) tmp = t_1; elseif (z <= -1.25e+142) tmp = Float64(y * Float64(z * -6.0)); elseif (z <= -7.8e-10) tmp = t_1; elseif (z <= -8.9e-265) tmp = Float64(y * 4.0); elseif (z <= 5.3e-220) tmp = Float64(x * -3.0); elseif (z <= 1.45e-188) tmp = Float64(y * 4.0); elseif (z <= 1.1e-5) tmp = Float64(x * -3.0); elseif (z <= 4e+174) tmp = Float64(6.0 * Float64(x * z)); elseif ((z <= 4.5e+199) || !(z <= 1.25e+236)) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (y * z); t_1 = x * (z * 6.0); tmp = 0.0; if (z <= -1.2e+229) tmp = t_0; elseif (z <= -1.95e+178) tmp = t_1; elseif (z <= -1.25e+142) tmp = y * (z * -6.0); elseif (z <= -7.8e-10) tmp = t_1; elseif (z <= -8.9e-265) tmp = y * 4.0; elseif (z <= 5.3e-220) tmp = x * -3.0; elseif (z <= 1.45e-188) tmp = y * 4.0; elseif (z <= 1.1e-5) tmp = x * -3.0; elseif (z <= 4e+174) tmp = 6.0 * (x * z); elseif ((z <= 4.5e+199) || ~((z <= 1.25e+236))) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.2e+229], t$95$0, If[LessEqual[z, -1.95e+178], t$95$1, If[LessEqual[z, -1.25e+142], N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.8e-10], t$95$1, If[LessEqual[z, -8.9e-265], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 5.3e-220], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.45e-188], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.1e-5], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 4e+174], N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 4.5e+199], N[Not[LessEqual[z, 1.25e+236]], $MachinePrecision]], t$95$0, t$95$1]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
t_1 := x \cdot \left(z \cdot 6\right)\\
\mathbf{if}\;z \leq -1.2 \cdot 10^{+229}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.95 \cdot 10^{+178}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.25 \cdot 10^{+142}:\\
\;\;\;\;y \cdot \left(z \cdot -6\right)\\
\mathbf{elif}\;z \leq -7.8 \cdot 10^{-10}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -8.9 \cdot 10^{-265}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 5.3 \cdot 10^{-220}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-188}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-5}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+174}:\\
\;\;\;\;6 \cdot \left(x \cdot z\right)\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+199} \lor \neg \left(z \leq 1.25 \cdot 10^{+236}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.2e229 or 4.00000000000000028e174 < z < 4.4999999999999997e199 or 1.24999999999999993e236 < z Initial program 99.8%
+-commutative99.8%
associate-*l*99.8%
fma-def99.8%
sub-neg99.8%
distribute-rgt-in99.8%
metadata-eval99.8%
metadata-eval99.8%
distribute-lft-neg-out99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 78.2%
Taylor expanded in z around inf 78.3%
if -1.2e229 < z < -1.9499999999999999e178 or -1.25e142 < z < -7.7999999999999999e-10 or 4.4999999999999997e199 < z < 1.24999999999999993e236Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 76.9%
sub-neg76.9%
distribute-rgt-in76.9%
metadata-eval76.9%
neg-mul-176.9%
associate-*r*76.9%
*-commutative76.9%
associate-+r+76.9%
metadata-eval76.9%
associate-*r*76.9%
metadata-eval76.9%
*-commutative76.9%
Simplified76.9%
Taylor expanded in z around inf 71.9%
if -1.9499999999999999e178 < z < -1.25e142Initial program 99.8%
+-commutative99.8%
associate-*l*99.9%
fma-def99.9%
sub-neg99.9%
distribute-rgt-in99.9%
metadata-eval99.9%
metadata-eval99.9%
distribute-lft-neg-out99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 76.9%
Taylor expanded in z around inf 76.9%
*-commutative76.9%
Simplified76.9%
if -7.7999999999999999e-10 < z < -8.8999999999999999e-265 or 5.3e-220 < z < 1.4500000000000001e-188Initial program 99.4%
+-commutative99.4%
associate-*l*99.9%
fma-def99.9%
sub-neg99.9%
distribute-rgt-in99.9%
metadata-eval99.9%
metadata-eval99.9%
distribute-lft-neg-out99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 65.0%
Taylor expanded in z around 0 65.0%
*-commutative65.0%
Simplified65.0%
if -8.8999999999999999e-265 < z < 5.3e-220 or 1.4500000000000001e-188 < z < 1.1e-5Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 64.1%
sub-neg64.1%
distribute-rgt-in64.1%
metadata-eval64.1%
neg-mul-164.1%
associate-*r*64.1%
*-commutative64.1%
associate-+r+64.1%
metadata-eval64.1%
associate-*r*64.1%
metadata-eval64.1%
*-commutative64.1%
Simplified64.1%
Taylor expanded in z around 0 64.1%
*-commutative64.1%
Simplified64.1%
if 1.1e-5 < z < 4.00000000000000028e174Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 63.1%
sub-neg63.1%
distribute-rgt-in63.1%
metadata-eval63.1%
neg-mul-163.1%
associate-*r*63.1%
*-commutative63.1%
associate-+r+63.1%
metadata-eval63.1%
associate-*r*63.1%
metadata-eval63.1%
*-commutative63.1%
Simplified63.1%
Taylor expanded in z around inf 63.1%
*-commutative63.1%
Simplified63.1%
Final simplification69.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))) (t_1 (* x (* z 6.0))))
(if (<= z -9.8e+225)
t_0
(if (<= z -5.8e+175)
t_1
(if (<= z -1.3e+141)
(* y (* z -6.0))
(if (<= z -7.8e-10)
(* z (* x 6.0))
(if (<= z -7.3e-270)
(* y 4.0)
(if (<= z 2.7e-219)
(* x -3.0)
(if (<= z 3.5e-189)
(* y 4.0)
(if (<= z 1.1e-5)
(* x -3.0)
(if (<= z 3.6e+173)
(* 6.0 (* x z))
(if (or (<= z 1.95e+201) (not (<= z 9.8e+235)))
t_0
t_1))))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double t_1 = x * (z * 6.0);
double tmp;
if (z <= -9.8e+225) {
tmp = t_0;
} else if (z <= -5.8e+175) {
tmp = t_1;
} else if (z <= -1.3e+141) {
tmp = y * (z * -6.0);
} else if (z <= -7.8e-10) {
tmp = z * (x * 6.0);
} else if (z <= -7.3e-270) {
tmp = y * 4.0;
} else if (z <= 2.7e-219) {
tmp = x * -3.0;
} else if (z <= 3.5e-189) {
tmp = y * 4.0;
} else if (z <= 1.1e-5) {
tmp = x * -3.0;
} else if (z <= 3.6e+173) {
tmp = 6.0 * (x * z);
} else if ((z <= 1.95e+201) || !(z <= 9.8e+235)) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (-6.0d0) * (y * z)
t_1 = x * (z * 6.0d0)
if (z <= (-9.8d+225)) then
tmp = t_0
else if (z <= (-5.8d+175)) then
tmp = t_1
else if (z <= (-1.3d+141)) then
tmp = y * (z * (-6.0d0))
else if (z <= (-7.8d-10)) then
tmp = z * (x * 6.0d0)
else if (z <= (-7.3d-270)) then
tmp = y * 4.0d0
else if (z <= 2.7d-219) then
tmp = x * (-3.0d0)
else if (z <= 3.5d-189) then
tmp = y * 4.0d0
else if (z <= 1.1d-5) then
tmp = x * (-3.0d0)
else if (z <= 3.6d+173) then
tmp = 6.0d0 * (x * z)
else if ((z <= 1.95d+201) .or. (.not. (z <= 9.8d+235))) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double t_1 = x * (z * 6.0);
double tmp;
if (z <= -9.8e+225) {
tmp = t_0;
} else if (z <= -5.8e+175) {
tmp = t_1;
} else if (z <= -1.3e+141) {
tmp = y * (z * -6.0);
} else if (z <= -7.8e-10) {
tmp = z * (x * 6.0);
} else if (z <= -7.3e-270) {
tmp = y * 4.0;
} else if (z <= 2.7e-219) {
tmp = x * -3.0;
} else if (z <= 3.5e-189) {
tmp = y * 4.0;
} else if (z <= 1.1e-5) {
tmp = x * -3.0;
} else if (z <= 3.6e+173) {
tmp = 6.0 * (x * z);
} else if ((z <= 1.95e+201) || !(z <= 9.8e+235)) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) t_1 = x * (z * 6.0) tmp = 0 if z <= -9.8e+225: tmp = t_0 elif z <= -5.8e+175: tmp = t_1 elif z <= -1.3e+141: tmp = y * (z * -6.0) elif z <= -7.8e-10: tmp = z * (x * 6.0) elif z <= -7.3e-270: tmp = y * 4.0 elif z <= 2.7e-219: tmp = x * -3.0 elif z <= 3.5e-189: tmp = y * 4.0 elif z <= 1.1e-5: tmp = x * -3.0 elif z <= 3.6e+173: tmp = 6.0 * (x * z) elif (z <= 1.95e+201) or not (z <= 9.8e+235): tmp = t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(y * z)) t_1 = Float64(x * Float64(z * 6.0)) tmp = 0.0 if (z <= -9.8e+225) tmp = t_0; elseif (z <= -5.8e+175) tmp = t_1; elseif (z <= -1.3e+141) tmp = Float64(y * Float64(z * -6.0)); elseif (z <= -7.8e-10) tmp = Float64(z * Float64(x * 6.0)); elseif (z <= -7.3e-270) tmp = Float64(y * 4.0); elseif (z <= 2.7e-219) tmp = Float64(x * -3.0); elseif (z <= 3.5e-189) tmp = Float64(y * 4.0); elseif (z <= 1.1e-5) tmp = Float64(x * -3.0); elseif (z <= 3.6e+173) tmp = Float64(6.0 * Float64(x * z)); elseif ((z <= 1.95e+201) || !(z <= 9.8e+235)) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (y * z); t_1 = x * (z * 6.0); tmp = 0.0; if (z <= -9.8e+225) tmp = t_0; elseif (z <= -5.8e+175) tmp = t_1; elseif (z <= -1.3e+141) tmp = y * (z * -6.0); elseif (z <= -7.8e-10) tmp = z * (x * 6.0); elseif (z <= -7.3e-270) tmp = y * 4.0; elseif (z <= 2.7e-219) tmp = x * -3.0; elseif (z <= 3.5e-189) tmp = y * 4.0; elseif (z <= 1.1e-5) tmp = x * -3.0; elseif (z <= 3.6e+173) tmp = 6.0 * (x * z); elseif ((z <= 1.95e+201) || ~((z <= 9.8e+235))) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.8e+225], t$95$0, If[LessEqual[z, -5.8e+175], t$95$1, If[LessEqual[z, -1.3e+141], N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.8e-10], N[(z * N[(x * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.3e-270], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.7e-219], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 3.5e-189], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.1e-5], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 3.6e+173], N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 1.95e+201], N[Not[LessEqual[z, 9.8e+235]], $MachinePrecision]], t$95$0, t$95$1]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
t_1 := x \cdot \left(z \cdot 6\right)\\
\mathbf{if}\;z \leq -9.8 \cdot 10^{+225}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -5.8 \cdot 10^{+175}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{+141}:\\
\;\;\;\;y \cdot \left(z \cdot -6\right)\\
\mathbf{elif}\;z \leq -7.8 \cdot 10^{-10}:\\
\;\;\;\;z \cdot \left(x \cdot 6\right)\\
\mathbf{elif}\;z \leq -7.3 \cdot 10^{-270}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-219}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-189}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-5}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{+173}:\\
\;\;\;\;6 \cdot \left(x \cdot z\right)\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{+201} \lor \neg \left(z \leq 9.8 \cdot 10^{+235}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -9.80000000000000065e225 or 3.6000000000000002e173 < z < 1.95e201 or 9.7999999999999995e235 < z Initial program 99.8%
+-commutative99.8%
associate-*l*99.8%
fma-def99.8%
sub-neg99.8%
distribute-rgt-in99.8%
metadata-eval99.8%
metadata-eval99.8%
distribute-lft-neg-out99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 78.2%
Taylor expanded in z around inf 78.3%
if -9.80000000000000065e225 < z < -5.8e175 or 1.95e201 < z < 9.7999999999999995e235Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 85.9%
sub-neg85.9%
distribute-rgt-in85.9%
metadata-eval85.9%
neg-mul-185.9%
associate-*r*85.9%
*-commutative85.9%
associate-+r+85.9%
metadata-eval85.9%
associate-*r*85.9%
metadata-eval85.9%
*-commutative85.9%
Simplified85.9%
Taylor expanded in z around inf 85.9%
if -5.8e175 < z < -1.3e141Initial program 99.8%
+-commutative99.8%
associate-*l*99.9%
fma-def99.9%
sub-neg99.9%
distribute-rgt-in99.9%
metadata-eval99.9%
metadata-eval99.9%
distribute-lft-neg-out99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 76.9%
Taylor expanded in z around inf 76.9%
*-commutative76.9%
Simplified76.9%
if -1.3e141 < z < -7.7999999999999999e-10Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 99.7%
Taylor expanded in z around inf 91.6%
Taylor expanded in y around 0 62.9%
if -7.7999999999999999e-10 < z < -7.29999999999999993e-270 or 2.7e-219 < z < 3.5000000000000001e-189Initial program 99.4%
+-commutative99.4%
associate-*l*99.9%
fma-def99.9%
sub-neg99.9%
distribute-rgt-in99.9%
metadata-eval99.9%
metadata-eval99.9%
distribute-lft-neg-out99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 65.0%
Taylor expanded in z around 0 65.0%
*-commutative65.0%
Simplified65.0%
if -7.29999999999999993e-270 < z < 2.7e-219 or 3.5000000000000001e-189 < z < 1.1e-5Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 64.1%
sub-neg64.1%
distribute-rgt-in64.1%
metadata-eval64.1%
neg-mul-164.1%
associate-*r*64.1%
*-commutative64.1%
associate-+r+64.1%
metadata-eval64.1%
associate-*r*64.1%
metadata-eval64.1%
*-commutative64.1%
Simplified64.1%
Taylor expanded in z around 0 64.1%
*-commutative64.1%
Simplified64.1%
if 1.1e-5 < z < 3.6000000000000002e173Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 63.1%
sub-neg63.1%
distribute-rgt-in63.1%
metadata-eval63.1%
neg-mul-163.1%
associate-*r*63.1%
*-commutative63.1%
associate-+r+63.1%
metadata-eval63.1%
associate-*r*63.1%
metadata-eval63.1%
*-commutative63.1%
Simplified63.1%
Taylor expanded in z around inf 63.1%
*-commutative63.1%
Simplified63.1%
Final simplification69.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* (- y x) z))))
(if (<= z -7.8e-10)
t_0
(if (<= z -1.95e-269)
(* y 4.0)
(if (<= z 1.6e-219)
(* x -3.0)
(if (<= z 2.4e-188) (* y 4.0) (if (<= z 0.5) (* x -3.0) t_0)))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -7.8e-10) {
tmp = t_0;
} else if (z <= -1.95e-269) {
tmp = y * 4.0;
} else if (z <= 1.6e-219) {
tmp = x * -3.0;
} else if (z <= 2.4e-188) {
tmp = y * 4.0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (-6.0d0) * ((y - x) * z)
if (z <= (-7.8d-10)) then
tmp = t_0
else if (z <= (-1.95d-269)) then
tmp = y * 4.0d0
else if (z <= 1.6d-219) then
tmp = x * (-3.0d0)
else if (z <= 2.4d-188) then
tmp = y * 4.0d0
else if (z <= 0.5d0) then
tmp = x * (-3.0d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -7.8e-10) {
tmp = t_0;
} else if (z <= -1.95e-269) {
tmp = y * 4.0;
} else if (z <= 1.6e-219) {
tmp = x * -3.0;
} else if (z <= 2.4e-188) {
tmp = y * 4.0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * ((y - x) * z) tmp = 0 if z <= -7.8e-10: tmp = t_0 elif z <= -1.95e-269: tmp = y * 4.0 elif z <= 1.6e-219: tmp = x * -3.0 elif z <= 2.4e-188: tmp = y * 4.0 elif z <= 0.5: tmp = x * -3.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(Float64(y - x) * z)) tmp = 0.0 if (z <= -7.8e-10) tmp = t_0; elseif (z <= -1.95e-269) tmp = Float64(y * 4.0); elseif (z <= 1.6e-219) tmp = Float64(x * -3.0); elseif (z <= 2.4e-188) tmp = Float64(y * 4.0); elseif (z <= 0.5) tmp = Float64(x * -3.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * ((y - x) * z); tmp = 0.0; if (z <= -7.8e-10) tmp = t_0; elseif (z <= -1.95e-269) tmp = y * 4.0; elseif (z <= 1.6e-219) tmp = x * -3.0; elseif (z <= 2.4e-188) tmp = y * 4.0; elseif (z <= 0.5) tmp = x * -3.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.8e-10], t$95$0, If[LessEqual[z, -1.95e-269], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.6e-219], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.4e-188], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.5], N[(x * -3.0), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{if}\;z \leq -7.8 \cdot 10^{-10}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.95 \cdot 10^{-269}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-219}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-188}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -7.7999999999999999e-10 or 0.5 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 97.6%
Taylor expanded in z around inf 97.8%
if -7.7999999999999999e-10 < z < -1.95e-269 or 1.59999999999999999e-219 < z < 2.4e-188Initial program 99.4%
+-commutative99.4%
associate-*l*99.9%
fma-def99.9%
sub-neg99.9%
distribute-rgt-in99.9%
metadata-eval99.9%
metadata-eval99.9%
distribute-lft-neg-out99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 65.0%
Taylor expanded in z around 0 65.0%
*-commutative65.0%
Simplified65.0%
if -1.95e-269 < z < 1.59999999999999999e-219 or 2.4e-188 < z < 0.5Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 60.3%
sub-neg60.3%
distribute-rgt-in60.3%
metadata-eval60.3%
neg-mul-160.3%
associate-*r*60.3%
*-commutative60.3%
associate-+r+60.3%
metadata-eval60.3%
associate-*r*60.3%
metadata-eval60.3%
*-commutative60.3%
Simplified60.3%
Taylor expanded in z around 0 60.3%
*-commutative60.3%
Simplified60.3%
Final simplification83.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* (- y x) z))))
(if (<= z -7.8e-10)
t_0
(if (<= z -6.8e-271)
(* y 4.0)
(if (<= z 5.3e-220)
(* x -3.0)
(if (<= z 1.05e-188)
(* y 4.0)
(if (<= z 1.25e+14) (* x (+ -3.0 (* z 6.0))) t_0)))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -7.8e-10) {
tmp = t_0;
} else if (z <= -6.8e-271) {
tmp = y * 4.0;
} else if (z <= 5.3e-220) {
tmp = x * -3.0;
} else if (z <= 1.05e-188) {
tmp = y * 4.0;
} else if (z <= 1.25e+14) {
tmp = x * (-3.0 + (z * 6.0));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (-6.0d0) * ((y - x) * z)
if (z <= (-7.8d-10)) then
tmp = t_0
else if (z <= (-6.8d-271)) then
tmp = y * 4.0d0
else if (z <= 5.3d-220) then
tmp = x * (-3.0d0)
else if (z <= 1.05d-188) then
tmp = y * 4.0d0
else if (z <= 1.25d+14) then
tmp = x * ((-3.0d0) + (z * 6.0d0))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -7.8e-10) {
tmp = t_0;
} else if (z <= -6.8e-271) {
tmp = y * 4.0;
} else if (z <= 5.3e-220) {
tmp = x * -3.0;
} else if (z <= 1.05e-188) {
tmp = y * 4.0;
} else if (z <= 1.25e+14) {
tmp = x * (-3.0 + (z * 6.0));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * ((y - x) * z) tmp = 0 if z <= -7.8e-10: tmp = t_0 elif z <= -6.8e-271: tmp = y * 4.0 elif z <= 5.3e-220: tmp = x * -3.0 elif z <= 1.05e-188: tmp = y * 4.0 elif z <= 1.25e+14: tmp = x * (-3.0 + (z * 6.0)) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(Float64(y - x) * z)) tmp = 0.0 if (z <= -7.8e-10) tmp = t_0; elseif (z <= -6.8e-271) tmp = Float64(y * 4.0); elseif (z <= 5.3e-220) tmp = Float64(x * -3.0); elseif (z <= 1.05e-188) tmp = Float64(y * 4.0); elseif (z <= 1.25e+14) tmp = Float64(x * Float64(-3.0 + Float64(z * 6.0))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * ((y - x) * z); tmp = 0.0; if (z <= -7.8e-10) tmp = t_0; elseif (z <= -6.8e-271) tmp = y * 4.0; elseif (z <= 5.3e-220) tmp = x * -3.0; elseif (z <= 1.05e-188) tmp = y * 4.0; elseif (z <= 1.25e+14) tmp = x * (-3.0 + (z * 6.0)); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.8e-10], t$95$0, If[LessEqual[z, -6.8e-271], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 5.3e-220], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.05e-188], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.25e+14], N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{if}\;z \leq -7.8 \cdot 10^{-10}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -6.8 \cdot 10^{-271}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 5.3 \cdot 10^{-220}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-188}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+14}:\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -7.7999999999999999e-10 or 1.25e14 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 97.8%
Taylor expanded in z around inf 97.9%
if -7.7999999999999999e-10 < z < -6.8000000000000001e-271 or 5.3e-220 < z < 1.05e-188Initial program 99.4%
+-commutative99.4%
associate-*l*99.9%
fma-def99.9%
sub-neg99.9%
distribute-rgt-in99.9%
metadata-eval99.9%
metadata-eval99.9%
distribute-lft-neg-out99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 65.0%
Taylor expanded in z around 0 65.0%
*-commutative65.0%
Simplified65.0%
if -6.8000000000000001e-271 < z < 5.3e-220Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 71.8%
sub-neg71.8%
distribute-rgt-in71.8%
metadata-eval71.8%
neg-mul-171.8%
associate-*r*71.8%
*-commutative71.8%
associate-+r+71.8%
metadata-eval71.8%
associate-*r*71.8%
metadata-eval71.8%
*-commutative71.8%
Simplified71.8%
Taylor expanded in z around 0 71.8%
*-commutative71.8%
Simplified71.8%
if 1.05e-188 < z < 1.25e14Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 56.8%
sub-neg56.8%
distribute-rgt-in56.8%
metadata-eval56.8%
neg-mul-156.8%
associate-*r*56.8%
*-commutative56.8%
associate-+r+56.8%
metadata-eval56.8%
associate-*r*56.8%
metadata-eval56.8%
*-commutative56.8%
Simplified56.8%
Final simplification83.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))))
(if (<= z -3.15e+15)
t_0
(if (<= z -1.35e-271)
(* y 4.0)
(if (<= z 5.5e-220)
(* x -3.0)
(if (<= z 1.52e-189) (* y 4.0) (if (<= z 0.62) (* x -3.0) t_0)))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double tmp;
if (z <= -3.15e+15) {
tmp = t_0;
} else if (z <= -1.35e-271) {
tmp = y * 4.0;
} else if (z <= 5.5e-220) {
tmp = x * -3.0;
} else if (z <= 1.52e-189) {
tmp = y * 4.0;
} else if (z <= 0.62) {
tmp = x * -3.0;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (-6.0d0) * (y * z)
if (z <= (-3.15d+15)) then
tmp = t_0
else if (z <= (-1.35d-271)) then
tmp = y * 4.0d0
else if (z <= 5.5d-220) then
tmp = x * (-3.0d0)
else if (z <= 1.52d-189) then
tmp = y * 4.0d0
else if (z <= 0.62d0) then
tmp = x * (-3.0d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double tmp;
if (z <= -3.15e+15) {
tmp = t_0;
} else if (z <= -1.35e-271) {
tmp = y * 4.0;
} else if (z <= 5.5e-220) {
tmp = x * -3.0;
} else if (z <= 1.52e-189) {
tmp = y * 4.0;
} else if (z <= 0.62) {
tmp = x * -3.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) tmp = 0 if z <= -3.15e+15: tmp = t_0 elif z <= -1.35e-271: tmp = y * 4.0 elif z <= 5.5e-220: tmp = x * -3.0 elif z <= 1.52e-189: tmp = y * 4.0 elif z <= 0.62: tmp = x * -3.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(y * z)) tmp = 0.0 if (z <= -3.15e+15) tmp = t_0; elseif (z <= -1.35e-271) tmp = Float64(y * 4.0); elseif (z <= 5.5e-220) tmp = Float64(x * -3.0); elseif (z <= 1.52e-189) tmp = Float64(y * 4.0); elseif (z <= 0.62) tmp = Float64(x * -3.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (y * z); tmp = 0.0; if (z <= -3.15e+15) tmp = t_0; elseif (z <= -1.35e-271) tmp = y * 4.0; elseif (z <= 5.5e-220) tmp = x * -3.0; elseif (z <= 1.52e-189) tmp = y * 4.0; elseif (z <= 0.62) tmp = x * -3.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.15e+15], t$95$0, If[LessEqual[z, -1.35e-271], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 5.5e-220], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.52e-189], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.62], N[(x * -3.0), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -3.15 \cdot 10^{+15}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.35 \cdot 10^{-271}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-220}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.52 \cdot 10^{-189}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.62:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -3.15e15 or 0.619999999999999996 < z Initial program 99.7%
+-commutative99.7%
associate-*l*99.6%
fma-def99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 52.8%
Taylor expanded in z around inf 52.8%
if -3.15e15 < z < -1.3499999999999999e-271 or 5.4999999999999999e-220 < z < 1.5199999999999999e-189Initial program 99.4%
+-commutative99.4%
associate-*l*99.8%
fma-def99.8%
sub-neg99.8%
distribute-rgt-in99.8%
metadata-eval99.8%
metadata-eval99.8%
distribute-lft-neg-out99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 59.7%
Taylor expanded in z around 0 59.7%
*-commutative59.7%
Simplified59.7%
if -1.3499999999999999e-271 < z < 5.4999999999999999e-220 or 1.5199999999999999e-189 < z < 0.619999999999999996Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 60.3%
sub-neg60.3%
distribute-rgt-in60.3%
metadata-eval60.3%
neg-mul-160.3%
associate-*r*60.3%
*-commutative60.3%
associate-+r+60.3%
metadata-eval60.3%
associate-*r*60.3%
metadata-eval60.3%
*-commutative60.3%
Simplified60.3%
Taylor expanded in z around 0 60.3%
*-commutative60.3%
Simplified60.3%
Final simplification55.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ -3.0 (* z 6.0)))) (t_1 (* y (+ 4.0 (* z -6.0)))))
(if (<= y -1.28e-64)
t_1
(if (<= y 7.6e-104)
t_0
(if (<= y 1.8e-30)
(* -6.0 (* (- y x) z))
(if (<= y 3.1e+87) t_0 t_1))))))
double code(double x, double y, double z) {
double t_0 = x * (-3.0 + (z * 6.0));
double t_1 = y * (4.0 + (z * -6.0));
double tmp;
if (y <= -1.28e-64) {
tmp = t_1;
} else if (y <= 7.6e-104) {
tmp = t_0;
} else if (y <= 1.8e-30) {
tmp = -6.0 * ((y - x) * z);
} else if (y <= 3.1e+87) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x * ((-3.0d0) + (z * 6.0d0))
t_1 = y * (4.0d0 + (z * (-6.0d0)))
if (y <= (-1.28d-64)) then
tmp = t_1
else if (y <= 7.6d-104) then
tmp = t_0
else if (y <= 1.8d-30) then
tmp = (-6.0d0) * ((y - x) * z)
else if (y <= 3.1d+87) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (-3.0 + (z * 6.0));
double t_1 = y * (4.0 + (z * -6.0));
double tmp;
if (y <= -1.28e-64) {
tmp = t_1;
} else if (y <= 7.6e-104) {
tmp = t_0;
} else if (y <= 1.8e-30) {
tmp = -6.0 * ((y - x) * z);
} else if (y <= 3.1e+87) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = x * (-3.0 + (z * 6.0)) t_1 = y * (4.0 + (z * -6.0)) tmp = 0 if y <= -1.28e-64: tmp = t_1 elif y <= 7.6e-104: tmp = t_0 elif y <= 1.8e-30: tmp = -6.0 * ((y - x) * z) elif y <= 3.1e+87: tmp = t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(x * Float64(-3.0 + Float64(z * 6.0))) t_1 = Float64(y * Float64(4.0 + Float64(z * -6.0))) tmp = 0.0 if (y <= -1.28e-64) tmp = t_1; elseif (y <= 7.6e-104) tmp = t_0; elseif (y <= 1.8e-30) tmp = Float64(-6.0 * Float64(Float64(y - x) * z)); elseif (y <= 3.1e+87) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (-3.0 + (z * 6.0)); t_1 = y * (4.0 + (z * -6.0)); tmp = 0.0; if (y <= -1.28e-64) tmp = t_1; elseif (y <= 7.6e-104) tmp = t_0; elseif (y <= 1.8e-30) tmp = -6.0 * ((y - x) * z); elseif (y <= 3.1e+87) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y * N[(4.0 + N[(z * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.28e-64], t$95$1, If[LessEqual[y, 7.6e-104], t$95$0, If[LessEqual[y, 1.8e-30], N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.1e+87], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(-3 + z \cdot 6\right)\\
t_1 := y \cdot \left(4 + z \cdot -6\right)\\
\mathbf{if}\;y \leq -1.28 \cdot 10^{-64}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 7.6 \cdot 10^{-104}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{-30}:\\
\;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{+87}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.28e-64 or 3.1e87 < y Initial program 99.6%
+-commutative99.6%
associate-*l*99.9%
fma-def99.9%
sub-neg99.9%
distribute-rgt-in99.9%
metadata-eval99.9%
metadata-eval99.9%
distribute-lft-neg-out99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 87.3%
if -1.28e-64 < y < 7.6000000000000001e-104 or 1.8000000000000002e-30 < y < 3.1e87Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 82.8%
sub-neg82.8%
distribute-rgt-in82.8%
metadata-eval82.8%
neg-mul-182.8%
associate-*r*82.8%
*-commutative82.8%
associate-+r+82.8%
metadata-eval82.8%
associate-*r*82.8%
metadata-eval82.8%
*-commutative82.8%
Simplified82.8%
if 7.6000000000000001e-104 < y < 1.8000000000000002e-30Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around inf 73.7%
Taylor expanded in z around inf 74.0%
Final simplification83.9%
(FPCore (x y z) :precision binary64 (if (<= z -0.6) (* z (* (- y x) -6.0)) (if (<= z 0.64) (+ x (* (- y x) 4.0)) (* -6.0 (* (- y x) z)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.6) {
tmp = z * ((y - x) * -6.0);
} else if (z <= 0.64) {
tmp = x + ((y - x) * 4.0);
} else {
tmp = -6.0 * ((y - x) * z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-0.6d0)) then
tmp = z * ((y - x) * (-6.0d0))
else if (z <= 0.64d0) then
tmp = x + ((y - x) * 4.0d0)
else
tmp = (-6.0d0) * ((y - x) * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.6) {
tmp = z * ((y - x) * -6.0);
} else if (z <= 0.64) {
tmp = x + ((y - x) * 4.0);
} else {
tmp = -6.0 * ((y - x) * z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.6: tmp = z * ((y - x) * -6.0) elif z <= 0.64: tmp = x + ((y - x) * 4.0) else: tmp = -6.0 * ((y - x) * z) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.6) tmp = Float64(z * Float64(Float64(y - x) * -6.0)); elseif (z <= 0.64) tmp = Float64(x + Float64(Float64(y - x) * 4.0)); else tmp = Float64(-6.0 * Float64(Float64(y - x) * z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.6) tmp = z * ((y - x) * -6.0); elseif (z <= 0.64) tmp = x + ((y - x) * 4.0); else tmp = -6.0 * ((y - x) * z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.6], N[(z * N[(N[(y - x), $MachinePrecision] * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.64], N[(x + N[(N[(y - x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision], N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.6:\\
\;\;\;\;z \cdot \left(\left(y - x\right) \cdot -6\right)\\
\mathbf{elif}\;z \leq 0.64:\\
\;\;\;\;x + \left(y - x\right) \cdot 4\\
\mathbf{else}:\\
\;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\end{array}
\end{array}
if z < -0.599999999999999978Initial program 99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around inf 98.6%
Taylor expanded in z around inf 98.6%
*-commutative98.6%
associate-*l*98.6%
Simplified98.6%
if -0.599999999999999978 < z < 0.640000000000000013Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in z around 0 96.3%
if 0.640000000000000013 < z Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around inf 99.4%
Taylor expanded in z around inf 99.4%
Final simplification97.9%
(FPCore (x y z) :precision binary64 (if (<= z -0.6) (* z (* (- y x) -6.0)) (if (<= z 0.55) (+ (* y 4.0) (* x -3.0)) (* -6.0 (* (- y x) z)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.6) {
tmp = z * ((y - x) * -6.0);
} else if (z <= 0.55) {
tmp = (y * 4.0) + (x * -3.0);
} else {
tmp = -6.0 * ((y - x) * z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-0.6d0)) then
tmp = z * ((y - x) * (-6.0d0))
else if (z <= 0.55d0) then
tmp = (y * 4.0d0) + (x * (-3.0d0))
else
tmp = (-6.0d0) * ((y - x) * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.6) {
tmp = z * ((y - x) * -6.0);
} else if (z <= 0.55) {
tmp = (y * 4.0) + (x * -3.0);
} else {
tmp = -6.0 * ((y - x) * z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.6: tmp = z * ((y - x) * -6.0) elif z <= 0.55: tmp = (y * 4.0) + (x * -3.0) else: tmp = -6.0 * ((y - x) * z) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.6) tmp = Float64(z * Float64(Float64(y - x) * -6.0)); elseif (z <= 0.55) tmp = Float64(Float64(y * 4.0) + Float64(x * -3.0)); else tmp = Float64(-6.0 * Float64(Float64(y - x) * z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.6) tmp = z * ((y - x) * -6.0); elseif (z <= 0.55) tmp = (y * 4.0) + (x * -3.0); else tmp = -6.0 * ((y - x) * z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.6], N[(z * N[(N[(y - x), $MachinePrecision] * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.55], N[(N[(y * 4.0), $MachinePrecision] + N[(x * -3.0), $MachinePrecision]), $MachinePrecision], N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.6:\\
\;\;\;\;z \cdot \left(\left(y - x\right) \cdot -6\right)\\
\mathbf{elif}\;z \leq 0.55:\\
\;\;\;\;y \cdot 4 + x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\end{array}
\end{array}
if z < -0.599999999999999978Initial program 99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around inf 98.6%
Taylor expanded in z around inf 98.6%
*-commutative98.6%
associate-*l*98.6%
Simplified98.6%
if -0.599999999999999978 < z < 0.55000000000000004Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around 0 99.6%
Taylor expanded in z around 0 96.3%
if 0.55000000000000004 < z Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around inf 99.4%
Taylor expanded in z around inf 99.4%
Final simplification97.9%
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) (- 0.6666666666666666 z))))
double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * (0.6666666666666666 - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + (((y - x) * 6.0d0) * (0.6666666666666666d0 - z))
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * (0.6666666666666666 - z));
}
def code(x, y, z): return x + (((y - x) * 6.0) * (0.6666666666666666 - z))
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(0.6666666666666666 - z))) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * (0.6666666666666666 - z)); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)
\end{array}
Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z) :precision binary64 (if (<= x -5e-36) (* x -3.0) (if (<= x 1.35e-31) (* y 4.0) (* x -3.0))))
double code(double x, double y, double z) {
double tmp;
if (x <= -5e-36) {
tmp = x * -3.0;
} else if (x <= 1.35e-31) {
tmp = y * 4.0;
} else {
tmp = x * -3.0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-5d-36)) then
tmp = x * (-3.0d0)
else if (x <= 1.35d-31) then
tmp = y * 4.0d0
else
tmp = x * (-3.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -5e-36) {
tmp = x * -3.0;
} else if (x <= 1.35e-31) {
tmp = y * 4.0;
} else {
tmp = x * -3.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -5e-36: tmp = x * -3.0 elif x <= 1.35e-31: tmp = y * 4.0 else: tmp = x * -3.0 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -5e-36) tmp = Float64(x * -3.0); elseif (x <= 1.35e-31) tmp = Float64(y * 4.0); else tmp = Float64(x * -3.0); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -5e-36) tmp = x * -3.0; elseif (x <= 1.35e-31) tmp = y * 4.0; else tmp = x * -3.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -5e-36], N[(x * -3.0), $MachinePrecision], If[LessEqual[x, 1.35e-31], N[(y * 4.0), $MachinePrecision], N[(x * -3.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{-36}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;x \leq 1.35 \cdot 10^{-31}:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;x \cdot -3\\
\end{array}
\end{array}
if x < -5.00000000000000004e-36 or 1.35000000000000007e-31 < x Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 81.1%
sub-neg81.1%
distribute-rgt-in81.1%
metadata-eval81.1%
neg-mul-181.1%
associate-*r*81.1%
*-commutative81.1%
associate-+r+81.1%
metadata-eval81.1%
associate-*r*81.1%
metadata-eval81.1%
*-commutative81.1%
Simplified81.1%
Taylor expanded in z around 0 32.4%
*-commutative32.4%
Simplified32.4%
if -5.00000000000000004e-36 < x < 1.35000000000000007e-31Initial program 99.5%
+-commutative99.5%
associate-*l*99.7%
fma-def99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 81.2%
Taylor expanded in z around 0 40.3%
*-commutative40.3%
Simplified40.3%
Final simplification36.0%
(FPCore (x y z) :precision binary64 (* x -3.0))
double code(double x, double y, double z) {
return x * -3.0;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x * (-3.0d0)
end function
public static double code(double x, double y, double z) {
return x * -3.0;
}
def code(x, y, z): return x * -3.0
function code(x, y, z) return Float64(x * -3.0) end
function tmp = code(x, y, z) tmp = x * -3.0; end
code[x_, y_, z_] := N[(x * -3.0), $MachinePrecision]
\begin{array}{l}
\\
x \cdot -3
\end{array}
Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 53.4%
sub-neg53.4%
distribute-rgt-in53.4%
metadata-eval53.4%
neg-mul-153.4%
associate-*r*53.4%
*-commutative53.4%
associate-+r+53.4%
metadata-eval53.4%
associate-*r*53.4%
metadata-eval53.4%
*-commutative53.4%
Simplified53.4%
Taylor expanded in z around 0 21.1%
*-commutative21.1%
Simplified21.1%
Final simplification21.1%
(FPCore (x y z) :precision binary64 x)
double code(double x, double y, double z) {
return x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x
end function
public static double code(double x, double y, double z) {
return x;
}
def code(x, y, z): return x
function code(x, y, z) return x end
function tmp = code(x, y, z) tmp = x; end
code[x_, y_, z_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around inf 59.7%
Taylor expanded in z around 0 2.6%
Final simplification2.6%
herbie shell --seed 2023274
(FPCore (x y z)
:name "Data.Colour.RGBSpace.HSL:hsl from colour-2.3.3, D"
:precision binary64
(+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))