
(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) (+ 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.3%
+-commutative99.3%
associate-*l*99.8%
fma-define99.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%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))) (t_1 (* 6.0 (* x z))))
(if (<= z -1.3e+94)
t_0
(if (<= z -430000.0)
t_1
(if (<= z -3.1e-23)
(* x -3.0)
(if (<= z -7.2e-122)
(* y 4.0)
(if (<= z -4.6e-206)
(* x -3.0)
(if (<= z 0.65)
(* y 4.0)
(if (or (<= z 4.6e+64)
(and (not (<= z 7.5e+145)) (<= z 5.6e+214)))
t_0
t_1)))))))))
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 <= -1.3e+94) {
tmp = t_0;
} else if (z <= -430000.0) {
tmp = t_1;
} else if (z <= -3.1e-23) {
tmp = x * -3.0;
} else if (z <= -7.2e-122) {
tmp = y * 4.0;
} else if (z <= -4.6e-206) {
tmp = x * -3.0;
} else if (z <= 0.65) {
tmp = y * 4.0;
} else if ((z <= 4.6e+64) || (!(z <= 7.5e+145) && (z <= 5.6e+214))) {
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 = 6.0d0 * (x * z)
if (z <= (-1.3d+94)) then
tmp = t_0
else if (z <= (-430000.0d0)) then
tmp = t_1
else if (z <= (-3.1d-23)) then
tmp = x * (-3.0d0)
else if (z <= (-7.2d-122)) then
tmp = y * 4.0d0
else if (z <= (-4.6d-206)) then
tmp = x * (-3.0d0)
else if (z <= 0.65d0) then
tmp = y * 4.0d0
else if ((z <= 4.6d+64) .or. (.not. (z <= 7.5d+145)) .and. (z <= 5.6d+214)) 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 = 6.0 * (x * z);
double tmp;
if (z <= -1.3e+94) {
tmp = t_0;
} else if (z <= -430000.0) {
tmp = t_1;
} else if (z <= -3.1e-23) {
tmp = x * -3.0;
} else if (z <= -7.2e-122) {
tmp = y * 4.0;
} else if (z <= -4.6e-206) {
tmp = x * -3.0;
} else if (z <= 0.65) {
tmp = y * 4.0;
} else if ((z <= 4.6e+64) || (!(z <= 7.5e+145) && (z <= 5.6e+214))) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) t_1 = 6.0 * (x * z) tmp = 0 if z <= -1.3e+94: tmp = t_0 elif z <= -430000.0: tmp = t_1 elif z <= -3.1e-23: tmp = x * -3.0 elif z <= -7.2e-122: tmp = y * 4.0 elif z <= -4.6e-206: tmp = x * -3.0 elif z <= 0.65: tmp = y * 4.0 elif (z <= 4.6e+64) or (not (z <= 7.5e+145) and (z <= 5.6e+214)): 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(6.0 * Float64(x * z)) tmp = 0.0 if (z <= -1.3e+94) tmp = t_0; elseif (z <= -430000.0) tmp = t_1; elseif (z <= -3.1e-23) tmp = Float64(x * -3.0); elseif (z <= -7.2e-122) tmp = Float64(y * 4.0); elseif (z <= -4.6e-206) tmp = Float64(x * -3.0); elseif (z <= 0.65) tmp = Float64(y * 4.0); elseif ((z <= 4.6e+64) || (!(z <= 7.5e+145) && (z <= 5.6e+214))) 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 = 6.0 * (x * z); tmp = 0.0; if (z <= -1.3e+94) tmp = t_0; elseif (z <= -430000.0) tmp = t_1; elseif (z <= -3.1e-23) tmp = x * -3.0; elseif (z <= -7.2e-122) tmp = y * 4.0; elseif (z <= -4.6e-206) tmp = x * -3.0; elseif (z <= 0.65) tmp = y * 4.0; elseif ((z <= 4.6e+64) || (~((z <= 7.5e+145)) && (z <= 5.6e+214))) 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[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.3e+94], t$95$0, If[LessEqual[z, -430000.0], t$95$1, If[LessEqual[z, -3.1e-23], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -7.2e-122], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -4.6e-206], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.65], N[(y * 4.0), $MachinePrecision], If[Or[LessEqual[z, 4.6e+64], And[N[Not[LessEqual[z, 7.5e+145]], $MachinePrecision], LessEqual[z, 5.6e+214]]], t$95$0, t$95$1]]]]]]]]]
\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 -1.3 \cdot 10^{+94}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -430000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{-23}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -7.2 \cdot 10^{-122}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -4.6 \cdot 10^{-206}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.65:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{+64} \lor \neg \left(z \leq 7.5 \cdot 10^{+145}\right) \land z \leq 5.6 \cdot 10^{+214}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.3e94 or 0.650000000000000022 < z < 4.6e64 or 7.50000000000000006e145 < z < 5.5999999999999996e214Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 99.8%
Taylor expanded in z around inf 98.5%
associate-*r*98.6%
*-commutative98.6%
associate-*r*98.4%
Simplified98.4%
Taylor expanded in y around inf 68.1%
*-commutative68.1%
Simplified68.1%
if -1.3e94 < z < -4.3e5 or 4.6e64 < z < 7.50000000000000006e145 or 5.5999999999999996e214 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 99.6%
Taylor expanded in z around inf 99.0%
associate-*r*99.1%
*-commutative99.1%
associate-*r*99.1%
Simplified99.1%
Taylor expanded in y around 0 63.9%
if -4.3e5 < z < -3.0999999999999999e-23 or -7.19999999999999989e-122 < z < -4.6e-206Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 60.1%
sub-neg60.1%
distribute-rgt-in60.2%
metadata-eval60.2%
distribute-lft-neg-in60.2%
associate-+r+60.2%
metadata-eval60.2%
distribute-rgt-neg-in60.2%
metadata-eval60.2%
Simplified60.2%
Taylor expanded in z around 0 59.9%
*-commutative59.9%
Simplified59.9%
if -3.0999999999999999e-23 < z < -7.19999999999999989e-122 or -4.6e-206 < z < 0.650000000000000022Initial program 98.6%
metadata-eval98.6%
Simplified98.6%
Taylor expanded in x around 0 99.5%
Taylor expanded in y around inf 55.2%
Taylor expanded in z around 0 54.7%
*-commutative54.7%
Simplified54.7%
Final simplification61.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))) (t_1 (* 6.0 (* x z))))
(if (<= z -1.95e+93)
t_0
(if (<= z -430000.0)
t_1
(if (<= z -3.5e-27)
(* x -3.0)
(if (<= z -8e-121)
(* y 4.0)
(if (<= z -3.6e-208)
(* x -3.0)
(if (<= z 0.65)
(* y 4.0)
(if (<= z 2.4e+64)
t_0
(if (<= z 1.82e+148)
(* x (* z 6.0))
(if (<= z 1.6e+212) t_0 t_1)))))))))))
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 <= -1.95e+93) {
tmp = t_0;
} else if (z <= -430000.0) {
tmp = t_1;
} else if (z <= -3.5e-27) {
tmp = x * -3.0;
} else if (z <= -8e-121) {
tmp = y * 4.0;
} else if (z <= -3.6e-208) {
tmp = x * -3.0;
} else if (z <= 0.65) {
tmp = y * 4.0;
} else if (z <= 2.4e+64) {
tmp = t_0;
} else if (z <= 1.82e+148) {
tmp = x * (z * 6.0);
} else if (z <= 1.6e+212) {
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 = 6.0d0 * (x * z)
if (z <= (-1.95d+93)) then
tmp = t_0
else if (z <= (-430000.0d0)) then
tmp = t_1
else if (z <= (-3.5d-27)) then
tmp = x * (-3.0d0)
else if (z <= (-8d-121)) then
tmp = y * 4.0d0
else if (z <= (-3.6d-208)) then
tmp = x * (-3.0d0)
else if (z <= 0.65d0) then
tmp = y * 4.0d0
else if (z <= 2.4d+64) then
tmp = t_0
else if (z <= 1.82d+148) then
tmp = x * (z * 6.0d0)
else if (z <= 1.6d+212) 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 = 6.0 * (x * z);
double tmp;
if (z <= -1.95e+93) {
tmp = t_0;
} else if (z <= -430000.0) {
tmp = t_1;
} else if (z <= -3.5e-27) {
tmp = x * -3.0;
} else if (z <= -8e-121) {
tmp = y * 4.0;
} else if (z <= -3.6e-208) {
tmp = x * -3.0;
} else if (z <= 0.65) {
tmp = y * 4.0;
} else if (z <= 2.4e+64) {
tmp = t_0;
} else if (z <= 1.82e+148) {
tmp = x * (z * 6.0);
} else if (z <= 1.6e+212) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) t_1 = 6.0 * (x * z) tmp = 0 if z <= -1.95e+93: tmp = t_0 elif z <= -430000.0: tmp = t_1 elif z <= -3.5e-27: tmp = x * -3.0 elif z <= -8e-121: tmp = y * 4.0 elif z <= -3.6e-208: tmp = x * -3.0 elif z <= 0.65: tmp = y * 4.0 elif z <= 2.4e+64: tmp = t_0 elif z <= 1.82e+148: tmp = x * (z * 6.0) elif z <= 1.6e+212: 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(6.0 * Float64(x * z)) tmp = 0.0 if (z <= -1.95e+93) tmp = t_0; elseif (z <= -430000.0) tmp = t_1; elseif (z <= -3.5e-27) tmp = Float64(x * -3.0); elseif (z <= -8e-121) tmp = Float64(y * 4.0); elseif (z <= -3.6e-208) tmp = Float64(x * -3.0); elseif (z <= 0.65) tmp = Float64(y * 4.0); elseif (z <= 2.4e+64) tmp = t_0; elseif (z <= 1.82e+148) tmp = Float64(x * Float64(z * 6.0)); elseif (z <= 1.6e+212) 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 = 6.0 * (x * z); tmp = 0.0; if (z <= -1.95e+93) tmp = t_0; elseif (z <= -430000.0) tmp = t_1; elseif (z <= -3.5e-27) tmp = x * -3.0; elseif (z <= -8e-121) tmp = y * 4.0; elseif (z <= -3.6e-208) tmp = x * -3.0; elseif (z <= 0.65) tmp = y * 4.0; elseif (z <= 2.4e+64) tmp = t_0; elseif (z <= 1.82e+148) tmp = x * (z * 6.0); elseif (z <= 1.6e+212) 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[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.95e+93], t$95$0, If[LessEqual[z, -430000.0], t$95$1, If[LessEqual[z, -3.5e-27], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -8e-121], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -3.6e-208], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.65], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.4e+64], t$95$0, If[LessEqual[z, 1.82e+148], N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e+212], t$95$0, t$95$1]]]]]]]]]]]
\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 -1.95 \cdot 10^{+93}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -430000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-27}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-121}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{-208}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.65:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{+64}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 1.82 \cdot 10^{+148}:\\
\;\;\;\;x \cdot \left(z \cdot 6\right)\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+212}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.9500000000000001e93 or 0.650000000000000022 < z < 2.39999999999999999e64 or 1.8200000000000001e148 < z < 1.5999999999999999e212Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 99.8%
Taylor expanded in z around inf 98.5%
associate-*r*98.6%
*-commutative98.6%
associate-*r*98.4%
Simplified98.4%
Taylor expanded in y around inf 68.1%
*-commutative68.1%
Simplified68.1%
if -1.9500000000000001e93 < z < -4.3e5 or 1.5999999999999999e212 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 99.8%
Taylor expanded in z around inf 98.9%
associate-*r*98.8%
*-commutative98.8%
associate-*r*98.9%
Simplified98.9%
Taylor expanded in y around 0 63.2%
if -4.3e5 < z < -3.5000000000000001e-27 or -7.9999999999999998e-121 < z < -3.5999999999999998e-208Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 60.1%
sub-neg60.1%
distribute-rgt-in60.2%
metadata-eval60.2%
distribute-lft-neg-in60.2%
associate-+r+60.2%
metadata-eval60.2%
distribute-rgt-neg-in60.2%
metadata-eval60.2%
Simplified60.2%
Taylor expanded in z around 0 59.9%
*-commutative59.9%
Simplified59.9%
if -3.5000000000000001e-27 < z < -7.9999999999999998e-121 or -3.5999999999999998e-208 < z < 0.650000000000000022Initial program 98.6%
metadata-eval98.6%
Simplified98.6%
Taylor expanded in x around 0 99.5%
Taylor expanded in y around inf 55.2%
Taylor expanded in z around 0 54.7%
*-commutative54.7%
Simplified54.7%
if 2.39999999999999999e64 < z < 1.8200000000000001e148Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 65.1%
sub-neg65.1%
distribute-rgt-in65.1%
metadata-eval65.1%
distribute-lft-neg-in65.1%
associate-+r+65.1%
metadata-eval65.1%
distribute-rgt-neg-in65.1%
metadata-eval65.1%
Simplified65.1%
Taylor expanded in z around inf 65.1%
Final simplification61.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))) (t_1 (* 6.0 (* x z))))
(if (<= z -2.1e+93)
t_0
(if (<= z -430000.0)
t_1
(if (<= z -5.6e-27)
(* x -3.0)
(if (<= z -2.6e-120)
(* y 4.0)
(if (<= z -4.8e-206)
(* x -3.0)
(if (<= z 0.65)
(* y 4.0)
(if (<= z 9.5e+64)
(* y (* z -6.0))
(if (<= z 6.5e+147)
(* x (* z 6.0))
(if (<= z 1.2e+215) t_0 t_1)))))))))))
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 <= -2.1e+93) {
tmp = t_0;
} else if (z <= -430000.0) {
tmp = t_1;
} else if (z <= -5.6e-27) {
tmp = x * -3.0;
} else if (z <= -2.6e-120) {
tmp = y * 4.0;
} else if (z <= -4.8e-206) {
tmp = x * -3.0;
} else if (z <= 0.65) {
tmp = y * 4.0;
} else if (z <= 9.5e+64) {
tmp = y * (z * -6.0);
} else if (z <= 6.5e+147) {
tmp = x * (z * 6.0);
} else if (z <= 1.2e+215) {
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 = 6.0d0 * (x * z)
if (z <= (-2.1d+93)) then
tmp = t_0
else if (z <= (-430000.0d0)) then
tmp = t_1
else if (z <= (-5.6d-27)) then
tmp = x * (-3.0d0)
else if (z <= (-2.6d-120)) then
tmp = y * 4.0d0
else if (z <= (-4.8d-206)) then
tmp = x * (-3.0d0)
else if (z <= 0.65d0) then
tmp = y * 4.0d0
else if (z <= 9.5d+64) then
tmp = y * (z * (-6.0d0))
else if (z <= 6.5d+147) then
tmp = x * (z * 6.0d0)
else if (z <= 1.2d+215) 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 = 6.0 * (x * z);
double tmp;
if (z <= -2.1e+93) {
tmp = t_0;
} else if (z <= -430000.0) {
tmp = t_1;
} else if (z <= -5.6e-27) {
tmp = x * -3.0;
} else if (z <= -2.6e-120) {
tmp = y * 4.0;
} else if (z <= -4.8e-206) {
tmp = x * -3.0;
} else if (z <= 0.65) {
tmp = y * 4.0;
} else if (z <= 9.5e+64) {
tmp = y * (z * -6.0);
} else if (z <= 6.5e+147) {
tmp = x * (z * 6.0);
} else if (z <= 1.2e+215) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) t_1 = 6.0 * (x * z) tmp = 0 if z <= -2.1e+93: tmp = t_0 elif z <= -430000.0: tmp = t_1 elif z <= -5.6e-27: tmp = x * -3.0 elif z <= -2.6e-120: tmp = y * 4.0 elif z <= -4.8e-206: tmp = x * -3.0 elif z <= 0.65: tmp = y * 4.0 elif z <= 9.5e+64: tmp = y * (z * -6.0) elif z <= 6.5e+147: tmp = x * (z * 6.0) elif z <= 1.2e+215: 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(6.0 * Float64(x * z)) tmp = 0.0 if (z <= -2.1e+93) tmp = t_0; elseif (z <= -430000.0) tmp = t_1; elseif (z <= -5.6e-27) tmp = Float64(x * -3.0); elseif (z <= -2.6e-120) tmp = Float64(y * 4.0); elseif (z <= -4.8e-206) tmp = Float64(x * -3.0); elseif (z <= 0.65) tmp = Float64(y * 4.0); elseif (z <= 9.5e+64) tmp = Float64(y * Float64(z * -6.0)); elseif (z <= 6.5e+147) tmp = Float64(x * Float64(z * 6.0)); elseif (z <= 1.2e+215) 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 = 6.0 * (x * z); tmp = 0.0; if (z <= -2.1e+93) tmp = t_0; elseif (z <= -430000.0) tmp = t_1; elseif (z <= -5.6e-27) tmp = x * -3.0; elseif (z <= -2.6e-120) tmp = y * 4.0; elseif (z <= -4.8e-206) tmp = x * -3.0; elseif (z <= 0.65) tmp = y * 4.0; elseif (z <= 9.5e+64) tmp = y * (z * -6.0); elseif (z <= 6.5e+147) tmp = x * (z * 6.0); elseif (z <= 1.2e+215) 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[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.1e+93], t$95$0, If[LessEqual[z, -430000.0], t$95$1, If[LessEqual[z, -5.6e-27], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -2.6e-120], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -4.8e-206], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.65], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 9.5e+64], N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e+147], N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.2e+215], t$95$0, t$95$1]]]]]]]]]]]
\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 -2.1 \cdot 10^{+93}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -430000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -5.6 \cdot 10^{-27}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-120}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -4.8 \cdot 10^{-206}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.65:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{+64}:\\
\;\;\;\;y \cdot \left(z \cdot -6\right)\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+147}:\\
\;\;\;\;x \cdot \left(z \cdot 6\right)\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+215}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.0999999999999998e93 or 6.5e147 < z < 1.2e215Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 99.9%
Taylor expanded in z around inf 99.9%
associate-*r*99.9%
*-commutative99.9%
associate-*r*99.7%
Simplified99.7%
Taylor expanded in y around inf 68.1%
*-commutative68.1%
Simplified68.1%
if -2.0999999999999998e93 < z < -4.3e5 or 1.2e215 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 99.8%
Taylor expanded in z around inf 98.9%
associate-*r*98.8%
*-commutative98.8%
associate-*r*98.9%
Simplified98.9%
Taylor expanded in y around 0 63.2%
if -4.3e5 < z < -5.5999999999999999e-27 or -2.6000000000000001e-120 < z < -4.7999999999999999e-206Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 60.1%
sub-neg60.1%
distribute-rgt-in60.2%
metadata-eval60.2%
distribute-lft-neg-in60.2%
associate-+r+60.2%
metadata-eval60.2%
distribute-rgt-neg-in60.2%
metadata-eval60.2%
Simplified60.2%
Taylor expanded in z around 0 59.9%
*-commutative59.9%
Simplified59.9%
if -5.5999999999999999e-27 < z < -2.6000000000000001e-120 or -4.7999999999999999e-206 < z < 0.650000000000000022Initial program 98.6%
metadata-eval98.6%
Simplified98.6%
Taylor expanded in x around 0 99.5%
Taylor expanded in y around inf 55.2%
Taylor expanded in z around 0 54.7%
*-commutative54.7%
Simplified54.7%
if 0.650000000000000022 < z < 9.50000000000000028e64Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 99.2%
Taylor expanded in z around inf 92.6%
associate-*r*92.8%
*-commutative92.8%
associate-*r*92.6%
Simplified92.6%
Taylor expanded in y around inf 68.3%
associate-*r*68.3%
*-commutative68.3%
associate-*r*68.4%
Simplified68.4%
if 9.50000000000000028e64 < z < 6.5e147Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 65.1%
sub-neg65.1%
distribute-rgt-in65.1%
metadata-eval65.1%
distribute-lft-neg-in65.1%
associate-+r+65.1%
metadata-eval65.1%
distribute-rgt-neg-in65.1%
metadata-eval65.1%
Simplified65.1%
Taylor expanded in z around inf 65.1%
Final simplification61.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))) (t_1 (* z (* x 6.0))))
(if (<= z -2.2e+54)
t_0
(if (<= z -430000.0)
t_1
(if (<= z -6.5e-29)
(* x -3.0)
(if (<= z -3.8e-116)
(* y 4.0)
(if (<= z -5.4e-207)
(* x -3.0)
(if (<= z 0.65)
(* y 4.0)
(if (<= z 8.2e+64)
(* y (* z -6.0))
(if (<= z 6.2e+146)
(* x (* z 6.0))
(if (<= z 7.5e+210) t_0 t_1)))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double t_1 = z * (x * 6.0);
double tmp;
if (z <= -2.2e+54) {
tmp = t_0;
} else if (z <= -430000.0) {
tmp = t_1;
} else if (z <= -6.5e-29) {
tmp = x * -3.0;
} else if (z <= -3.8e-116) {
tmp = y * 4.0;
} else if (z <= -5.4e-207) {
tmp = x * -3.0;
} else if (z <= 0.65) {
tmp = y * 4.0;
} else if (z <= 8.2e+64) {
tmp = y * (z * -6.0);
} else if (z <= 6.2e+146) {
tmp = x * (z * 6.0);
} else if (z <= 7.5e+210) {
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 = z * (x * 6.0d0)
if (z <= (-2.2d+54)) then
tmp = t_0
else if (z <= (-430000.0d0)) then
tmp = t_1
else if (z <= (-6.5d-29)) then
tmp = x * (-3.0d0)
else if (z <= (-3.8d-116)) then
tmp = y * 4.0d0
else if (z <= (-5.4d-207)) then
tmp = x * (-3.0d0)
else if (z <= 0.65d0) then
tmp = y * 4.0d0
else if (z <= 8.2d+64) then
tmp = y * (z * (-6.0d0))
else if (z <= 6.2d+146) then
tmp = x * (z * 6.0d0)
else if (z <= 7.5d+210) 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 = z * (x * 6.0);
double tmp;
if (z <= -2.2e+54) {
tmp = t_0;
} else if (z <= -430000.0) {
tmp = t_1;
} else if (z <= -6.5e-29) {
tmp = x * -3.0;
} else if (z <= -3.8e-116) {
tmp = y * 4.0;
} else if (z <= -5.4e-207) {
tmp = x * -3.0;
} else if (z <= 0.65) {
tmp = y * 4.0;
} else if (z <= 8.2e+64) {
tmp = y * (z * -6.0);
} else if (z <= 6.2e+146) {
tmp = x * (z * 6.0);
} else if (z <= 7.5e+210) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) t_1 = z * (x * 6.0) tmp = 0 if z <= -2.2e+54: tmp = t_0 elif z <= -430000.0: tmp = t_1 elif z <= -6.5e-29: tmp = x * -3.0 elif z <= -3.8e-116: tmp = y * 4.0 elif z <= -5.4e-207: tmp = x * -3.0 elif z <= 0.65: tmp = y * 4.0 elif z <= 8.2e+64: tmp = y * (z * -6.0) elif z <= 6.2e+146: tmp = x * (z * 6.0) elif z <= 7.5e+210: 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(z * Float64(x * 6.0)) tmp = 0.0 if (z <= -2.2e+54) tmp = t_0; elseif (z <= -430000.0) tmp = t_1; elseif (z <= -6.5e-29) tmp = Float64(x * -3.0); elseif (z <= -3.8e-116) tmp = Float64(y * 4.0); elseif (z <= -5.4e-207) tmp = Float64(x * -3.0); elseif (z <= 0.65) tmp = Float64(y * 4.0); elseif (z <= 8.2e+64) tmp = Float64(y * Float64(z * -6.0)); elseif (z <= 6.2e+146) tmp = Float64(x * Float64(z * 6.0)); elseif (z <= 7.5e+210) 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 = z * (x * 6.0); tmp = 0.0; if (z <= -2.2e+54) tmp = t_0; elseif (z <= -430000.0) tmp = t_1; elseif (z <= -6.5e-29) tmp = x * -3.0; elseif (z <= -3.8e-116) tmp = y * 4.0; elseif (z <= -5.4e-207) tmp = x * -3.0; elseif (z <= 0.65) tmp = y * 4.0; elseif (z <= 8.2e+64) tmp = y * (z * -6.0); elseif (z <= 6.2e+146) tmp = x * (z * 6.0); elseif (z <= 7.5e+210) 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[(z * N[(x * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.2e+54], t$95$0, If[LessEqual[z, -430000.0], t$95$1, If[LessEqual[z, -6.5e-29], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -3.8e-116], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -5.4e-207], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.65], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 8.2e+64], N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e+146], N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e+210], t$95$0, t$95$1]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
t_1 := z \cdot \left(x \cdot 6\right)\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{+54}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -430000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -6.5 \cdot 10^{-29}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-116}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -5.4 \cdot 10^{-207}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.65:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{+64}:\\
\;\;\;\;y \cdot \left(z \cdot -6\right)\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+146}:\\
\;\;\;\;x \cdot \left(z \cdot 6\right)\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+210}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.1999999999999999e54 or 6.2000000000000004e146 < z < 7.5e210Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 99.9%
Taylor expanded in z around inf 99.9%
associate-*r*99.9%
*-commutative99.9%
associate-*r*99.7%
Simplified99.7%
Taylor expanded in y around inf 65.4%
*-commutative65.4%
Simplified65.4%
if -2.1999999999999999e54 < z < -4.3e5 or 7.5e210 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 98.6%
associate-*r*98.6%
*-commutative98.6%
associate-*r*98.7%
Simplified98.7%
Taylor expanded in y around 0 66.5%
*-commutative66.5%
Simplified66.5%
if -4.3e5 < z < -6.5e-29 or -3.8000000000000001e-116 < z < -5.4e-207Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 60.1%
sub-neg60.1%
distribute-rgt-in60.2%
metadata-eval60.2%
distribute-lft-neg-in60.2%
associate-+r+60.2%
metadata-eval60.2%
distribute-rgt-neg-in60.2%
metadata-eval60.2%
Simplified60.2%
Taylor expanded in z around 0 59.9%
*-commutative59.9%
Simplified59.9%
if -6.5e-29 < z < -3.8000000000000001e-116 or -5.4e-207 < z < 0.650000000000000022Initial program 98.6%
metadata-eval98.6%
Simplified98.6%
Taylor expanded in x around 0 99.5%
Taylor expanded in y around inf 55.2%
Taylor expanded in z around 0 54.7%
*-commutative54.7%
Simplified54.7%
if 0.650000000000000022 < z < 8.19999999999999956e64Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 99.2%
Taylor expanded in z around inf 92.6%
associate-*r*92.8%
*-commutative92.8%
associate-*r*92.6%
Simplified92.6%
Taylor expanded in y around inf 68.3%
associate-*r*68.3%
*-commutative68.3%
associate-*r*68.4%
Simplified68.4%
if 8.19999999999999956e64 < z < 6.2000000000000004e146Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 65.1%
sub-neg65.1%
distribute-rgt-in65.1%
metadata-eval65.1%
distribute-lft-neg-in65.1%
associate-+r+65.1%
metadata-eval65.1%
distribute-rgt-neg-in65.1%
metadata-eval65.1%
Simplified65.1%
Taylor expanded in z around inf 65.1%
Final simplification61.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 6.0 (* y (- 0.6666666666666666 z))))
(t_1 (* -6.0 (* (- y x) z))))
(if (<= z -3600000.0)
t_1
(if (<= z -6.2e-119)
t_0
(if (<= z -3.7e-208) (* x -3.0) (if (<= z 4e+14) t_0 t_1))))))
double code(double x, double y, double z) {
double t_0 = 6.0 * (y * (0.6666666666666666 - z));
double t_1 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -3600000.0) {
tmp = t_1;
} else if (z <= -6.2e-119) {
tmp = t_0;
} else if (z <= -3.7e-208) {
tmp = x * -3.0;
} else if (z <= 4e+14) {
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 * (0.6666666666666666d0 - z))
t_1 = (-6.0d0) * ((y - x) * z)
if (z <= (-3600000.0d0)) then
tmp = t_1
else if (z <= (-6.2d-119)) then
tmp = t_0
else if (z <= (-3.7d-208)) then
tmp = x * (-3.0d0)
else if (z <= 4d+14) 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 * (0.6666666666666666 - z));
double t_1 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -3600000.0) {
tmp = t_1;
} else if (z <= -6.2e-119) {
tmp = t_0;
} else if (z <= -3.7e-208) {
tmp = x * -3.0;
} else if (z <= 4e+14) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = 6.0 * (y * (0.6666666666666666 - z)) t_1 = -6.0 * ((y - x) * z) tmp = 0 if z <= -3600000.0: tmp = t_1 elif z <= -6.2e-119: tmp = t_0 elif z <= -3.7e-208: tmp = x * -3.0 elif z <= 4e+14: tmp = t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(6.0 * Float64(y * Float64(0.6666666666666666 - z))) t_1 = Float64(-6.0 * Float64(Float64(y - x) * z)) tmp = 0.0 if (z <= -3600000.0) tmp = t_1; elseif (z <= -6.2e-119) tmp = t_0; elseif (z <= -3.7e-208) tmp = Float64(x * -3.0); elseif (z <= 4e+14) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = 6.0 * (y * (0.6666666666666666 - z)); t_1 = -6.0 * ((y - x) * z); tmp = 0.0; if (z <= -3600000.0) tmp = t_1; elseif (z <= -6.2e-119) tmp = t_0; elseif (z <= -3.7e-208) tmp = x * -3.0; elseif (z <= 4e+14) 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 * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3600000.0], t$95$1, If[LessEqual[z, -6.2e-119], t$95$0, If[LessEqual[z, -3.7e-208], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 4e+14], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\
t_1 := -6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{if}\;z \leq -3600000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{-119}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -3.7 \cdot 10^{-208}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+14}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.6e6 or 4e14 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 99.4%
if -3.6e6 < z < -6.19999999999999956e-119 or -3.7000000000000002e-208 < z < 4e14Initial program 98.7%
metadata-eval98.7%
Simplified98.7%
Taylor expanded in x around 0 99.5%
Taylor expanded in y around inf 56.3%
if -6.19999999999999956e-119 < z < -3.7000000000000002e-208Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 62.7%
sub-neg62.7%
distribute-rgt-in62.7%
metadata-eval62.7%
distribute-lft-neg-in62.7%
associate-+r+62.7%
metadata-eval62.7%
distribute-rgt-neg-in62.7%
metadata-eval62.7%
Simplified62.7%
Taylor expanded in z around 0 62.7%
*-commutative62.7%
Simplified62.7%
Final simplification79.9%
(FPCore (x y z) :precision binary64 (if (or (<= z -0.0028) (not (<= z 0.64))) (* -6.0 (* (- y x) z)) (* y 4.0)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -0.0028) || !(z <= 0.64)) {
tmp = -6.0 * ((y - x) * z);
} else {
tmp = y * 4.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 ((z <= (-0.0028d0)) .or. (.not. (z <= 0.64d0))) then
tmp = (-6.0d0) * ((y - x) * z)
else
tmp = y * 4.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -0.0028) || !(z <= 0.64)) {
tmp = -6.0 * ((y - x) * z);
} else {
tmp = y * 4.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -0.0028) or not (z <= 0.64): tmp = -6.0 * ((y - x) * z) else: tmp = y * 4.0 return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -0.0028) || !(z <= 0.64)) tmp = Float64(-6.0 * Float64(Float64(y - x) * z)); else tmp = Float64(y * 4.0); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -0.0028) || ~((z <= 0.64))) tmp = -6.0 * ((y - x) * z); else tmp = y * 4.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -0.0028], N[Not[LessEqual[z, 0.64]], $MachinePrecision]], N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], N[(y * 4.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.0028 \lor \neg \left(z \leq 0.64\right):\\
\;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 4\\
\end{array}
\end{array}
if z < -0.00279999999999999997 or 0.640000000000000013 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 98.4%
if -0.00279999999999999997 < z < 0.640000000000000013Initial program 98.8%
metadata-eval98.8%
Simplified98.8%
Taylor expanded in x around 0 99.5%
Taylor expanded in y around inf 51.1%
Taylor expanded in z around 0 50.4%
*-commutative50.4%
Simplified50.4%
Final simplification76.9%
(FPCore (x y z) :precision binary64 (if (or (<= y -1.9e-28) (not (<= y 1.6e-22))) (* 6.0 (* y (- 0.6666666666666666 z))) (* x (+ -3.0 (* z 6.0)))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -1.9e-28) || !(y <= 1.6e-22)) {
tmp = 6.0 * (y * (0.6666666666666666 - z));
} else {
tmp = x * (-3.0 + (z * 6.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 ((y <= (-1.9d-28)) .or. (.not. (y <= 1.6d-22))) then
tmp = 6.0d0 * (y * (0.6666666666666666d0 - z))
else
tmp = x * ((-3.0d0) + (z * 6.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -1.9e-28) || !(y <= 1.6e-22)) {
tmp = 6.0 * (y * (0.6666666666666666 - z));
} else {
tmp = x * (-3.0 + (z * 6.0));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -1.9e-28) or not (y <= 1.6e-22): tmp = 6.0 * (y * (0.6666666666666666 - z)) else: tmp = x * (-3.0 + (z * 6.0)) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -1.9e-28) || !(y <= 1.6e-22)) tmp = Float64(6.0 * Float64(y * Float64(0.6666666666666666 - z))); else tmp = Float64(x * Float64(-3.0 + Float64(z * 6.0))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -1.9e-28) || ~((y <= 1.6e-22))) tmp = 6.0 * (y * (0.6666666666666666 - z)); else tmp = x * (-3.0 + (z * 6.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -1.9e-28], N[Not[LessEqual[y, 1.6e-22]], $MachinePrecision]], N[(6.0 * N[(y * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{-28} \lor \neg \left(y \leq 1.6 \cdot 10^{-22}\right):\\
\;\;\;\;6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\end{array}
\end{array}
if y < -1.90000000000000005e-28 or 1.59999999999999994e-22 < y Initial program 99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in x around 0 94.1%
Taylor expanded in y around inf 79.4%
if -1.90000000000000005e-28 < y < 1.59999999999999994e-22Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 85.4%
sub-neg85.4%
distribute-rgt-in85.4%
metadata-eval85.4%
distribute-lft-neg-in85.4%
associate-+r+85.4%
metadata-eval85.4%
distribute-rgt-neg-in85.4%
metadata-eval85.4%
Simplified85.4%
Final simplification81.9%
(FPCore (x y z) :precision binary64 (if (or (<= y -4.8e-24) (not (<= y 4e-30))) (* y (+ 4.0 (* z -6.0))) (* x (+ -3.0 (* z 6.0)))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -4.8e-24) || !(y <= 4e-30)) {
tmp = y * (4.0 + (z * -6.0));
} else {
tmp = x * (-3.0 + (z * 6.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 ((y <= (-4.8d-24)) .or. (.not. (y <= 4d-30))) then
tmp = y * (4.0d0 + (z * (-6.0d0)))
else
tmp = x * ((-3.0d0) + (z * 6.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -4.8e-24) || !(y <= 4e-30)) {
tmp = y * (4.0 + (z * -6.0));
} else {
tmp = x * (-3.0 + (z * 6.0));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -4.8e-24) or not (y <= 4e-30): tmp = y * (4.0 + (z * -6.0)) else: tmp = x * (-3.0 + (z * 6.0)) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -4.8e-24) || !(y <= 4e-30)) tmp = Float64(y * Float64(4.0 + Float64(z * -6.0))); else tmp = Float64(x * Float64(-3.0 + Float64(z * 6.0))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -4.8e-24) || ~((y <= 4e-30))) tmp = y * (4.0 + (z * -6.0)); else tmp = x * (-3.0 + (z * 6.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -4.8e-24], N[Not[LessEqual[y, 4e-30]], $MachinePrecision]], N[(y * N[(4.0 + N[(z * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{-24} \lor \neg \left(y \leq 4 \cdot 10^{-30}\right):\\
\;\;\;\;y \cdot \left(4 + z \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\end{array}
\end{array}
if y < -4.7999999999999996e-24 or 4e-30 < y Initial program 99.1%
+-commutative99.1%
associate-*l*99.8%
fma-define99.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 79.6%
if -4.7999999999999996e-24 < y < 4e-30Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 85.4%
sub-neg85.4%
distribute-rgt-in85.4%
metadata-eval85.4%
distribute-lft-neg-in85.4%
associate-+r+85.4%
metadata-eval85.4%
distribute-rgt-neg-in85.4%
metadata-eval85.4%
Simplified85.4%
Final simplification82.0%
(FPCore (x y z) :precision binary64 (if (<= z -0.6) (* -6.0 (* (- y x) z)) (if (<= z 0.52) (+ x (* (- y x) 4.0)) (* z (* (- y x) -6.0)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.6) {
tmp = -6.0 * ((y - x) * z);
} else if (z <= 0.52) {
tmp = x + ((y - x) * 4.0);
} else {
tmp = z * ((y - x) * -6.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 (z <= (-0.6d0)) then
tmp = (-6.0d0) * ((y - x) * z)
else if (z <= 0.52d0) then
tmp = x + ((y - x) * 4.0d0)
else
tmp = z * ((y - x) * (-6.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.6) {
tmp = -6.0 * ((y - x) * z);
} else if (z <= 0.52) {
tmp = x + ((y - x) * 4.0);
} else {
tmp = z * ((y - x) * -6.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.6: tmp = -6.0 * ((y - x) * z) elif z <= 0.52: tmp = x + ((y - x) * 4.0) else: tmp = z * ((y - x) * -6.0) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.6) tmp = Float64(-6.0 * Float64(Float64(y - x) * z)); elseif (z <= 0.52) tmp = Float64(x + Float64(Float64(y - x) * 4.0)); else tmp = Float64(z * Float64(Float64(y - x) * -6.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.6) tmp = -6.0 * ((y - x) * z); elseif (z <= 0.52) tmp = x + ((y - x) * 4.0); else tmp = z * ((y - x) * -6.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.6], N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.52], N[(x + N[(N[(y - x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(y - x), $MachinePrecision] * -6.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.6:\\
\;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{elif}\;z \leq 0.52:\\
\;\;\;\;x + \left(y - x\right) \cdot 4\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(\left(y - x\right) \cdot -6\right)\\
\end{array}
\end{array}
if z < -0.599999999999999978Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 99.8%
Taylor expanded in z around inf 98.3%
if -0.599999999999999978 < z < 0.52000000000000002Initial program 98.8%
metadata-eval98.8%
Simplified98.8%
Taylor expanded in z around 0 98.5%
if 0.52000000000000002 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 99.6%
Taylor expanded in z around inf 98.6%
associate-*r*98.7%
*-commutative98.7%
associate-*r*98.6%
Simplified98.6%
Final simplification98.5%
(FPCore (x y z) :precision binary64 (if (<= z -0.58) (* -6.0 (* (- y x) z)) (if (<= z 0.65) (+ (* x -3.0) (* y 4.0)) (* z (* (- y x) -6.0)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.58) {
tmp = -6.0 * ((y - x) * z);
} else if (z <= 0.65) {
tmp = (x * -3.0) + (y * 4.0);
} else {
tmp = z * ((y - x) * -6.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 (z <= (-0.58d0)) then
tmp = (-6.0d0) * ((y - x) * z)
else if (z <= 0.65d0) then
tmp = (x * (-3.0d0)) + (y * 4.0d0)
else
tmp = z * ((y - x) * (-6.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.58) {
tmp = -6.0 * ((y - x) * z);
} else if (z <= 0.65) {
tmp = (x * -3.0) + (y * 4.0);
} else {
tmp = z * ((y - x) * -6.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.58: tmp = -6.0 * ((y - x) * z) elif z <= 0.65: tmp = (x * -3.0) + (y * 4.0) else: tmp = z * ((y - x) * -6.0) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.58) tmp = Float64(-6.0 * Float64(Float64(y - x) * z)); elseif (z <= 0.65) tmp = Float64(Float64(x * -3.0) + Float64(y * 4.0)); else tmp = Float64(z * Float64(Float64(y - x) * -6.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.58) tmp = -6.0 * ((y - x) * z); elseif (z <= 0.65) tmp = (x * -3.0) + (y * 4.0); else tmp = z * ((y - x) * -6.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.58], N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.65], N[(N[(x * -3.0), $MachinePrecision] + N[(y * 4.0), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(y - x), $MachinePrecision] * -6.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.58:\\
\;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{elif}\;z \leq 0.65:\\
\;\;\;\;x \cdot -3 + y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(\left(y - x\right) \cdot -6\right)\\
\end{array}
\end{array}
if z < -0.57999999999999996Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 99.8%
Taylor expanded in z around inf 98.3%
if -0.57999999999999996 < z < 0.650000000000000022Initial program 98.8%
metadata-eval98.8%
Simplified98.8%
Taylor expanded in x around 0 99.5%
Taylor expanded in z around 0 98.5%
if 0.650000000000000022 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 99.6%
Taylor expanded in z around inf 98.6%
associate-*r*98.7%
*-commutative98.7%
associate-*r*98.6%
Simplified98.6%
Final simplification98.5%
(FPCore (x y z) :precision binary64 (if (or (<= z -0.68) (not (<= z 0.65))) (* -6.0 (* y z)) (* y 4.0)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -0.68) || !(z <= 0.65)) {
tmp = -6.0 * (y * z);
} else {
tmp = y * 4.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 ((z <= (-0.68d0)) .or. (.not. (z <= 0.65d0))) then
tmp = (-6.0d0) * (y * z)
else
tmp = y * 4.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -0.68) || !(z <= 0.65)) {
tmp = -6.0 * (y * z);
} else {
tmp = y * 4.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -0.68) or not (z <= 0.65): tmp = -6.0 * (y * z) else: tmp = y * 4.0 return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -0.68) || !(z <= 0.65)) tmp = Float64(-6.0 * Float64(y * z)); else tmp = Float64(y * 4.0); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -0.68) || ~((z <= 0.65))) tmp = -6.0 * (y * z); else tmp = y * 4.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -0.68], N[Not[LessEqual[z, 0.65]], $MachinePrecision]], N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision], N[(y * 4.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.68 \lor \neg \left(z \leq 0.65\right):\\
\;\;\;\;-6 \cdot \left(y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 4\\
\end{array}
\end{array}
if z < -0.680000000000000049 or 0.650000000000000022 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 98.4%
associate-*r*98.5%
*-commutative98.5%
associate-*r*98.4%
Simplified98.4%
Taylor expanded in y around inf 52.4%
*-commutative52.4%
Simplified52.4%
if -0.680000000000000049 < z < 0.650000000000000022Initial program 98.8%
metadata-eval98.8%
Simplified98.8%
Taylor expanded in x around 0 99.5%
Taylor expanded in y around inf 51.1%
Taylor expanded in z around 0 50.4%
*-commutative50.4%
Simplified50.4%
Final simplification51.5%
(FPCore (x y z) :precision binary64 (+ x (+ (* -6.0 (* (- y x) z)) (* (- y x) 4.0))))
double code(double x, double y, double z) {
return x + ((-6.0 * ((y - x) * z)) + ((y - x) * 4.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 + (((-6.0d0) * ((y - x) * z)) + ((y - x) * 4.0d0))
end function
public static double code(double x, double y, double z) {
return x + ((-6.0 * ((y - x) * z)) + ((y - x) * 4.0));
}
def code(x, y, z): return x + ((-6.0 * ((y - x) * z)) + ((y - x) * 4.0))
function code(x, y, z) return Float64(x + Float64(Float64(-6.0 * Float64(Float64(y - x) * z)) + Float64(Float64(y - x) * 4.0))) end
function tmp = code(x, y, z) tmp = x + ((-6.0 * ((y - x) * z)) + ((y - x) * 4.0)); end
code[x_, y_, z_] := N[(x + N[(N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] + N[(N[(y - x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(-6 \cdot \left(\left(y - x\right) \cdot z\right) + \left(y - x\right) \cdot 4\right)
\end{array}
Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in z around 0 99.7%
Final simplification99.7%
(FPCore (x y z) :precision binary64 (if (or (<= x -6.5e-15) (not (<= x 2.8e-78))) (* x -3.0) (* y 4.0)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -6.5e-15) || !(x <= 2.8e-78)) {
tmp = x * -3.0;
} else {
tmp = y * 4.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 <= (-6.5d-15)) .or. (.not. (x <= 2.8d-78))) then
tmp = x * (-3.0d0)
else
tmp = y * 4.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -6.5e-15) || !(x <= 2.8e-78)) {
tmp = x * -3.0;
} else {
tmp = y * 4.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -6.5e-15) or not (x <= 2.8e-78): tmp = x * -3.0 else: tmp = y * 4.0 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -6.5e-15) || !(x <= 2.8e-78)) tmp = Float64(x * -3.0); else tmp = Float64(y * 4.0); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -6.5e-15) || ~((x <= 2.8e-78))) tmp = x * -3.0; else tmp = y * 4.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -6.5e-15], N[Not[LessEqual[x, 2.8e-78]], $MachinePrecision]], N[(x * -3.0), $MachinePrecision], N[(y * 4.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.5 \cdot 10^{-15} \lor \neg \left(x \leq 2.8 \cdot 10^{-78}\right):\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;y \cdot 4\\
\end{array}
\end{array}
if x < -6.49999999999999991e-15 or 2.80000000000000024e-78 < x Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 72.6%
sub-neg72.6%
distribute-rgt-in72.6%
metadata-eval72.6%
distribute-lft-neg-in72.6%
associate-+r+72.6%
metadata-eval72.6%
distribute-rgt-neg-in72.6%
metadata-eval72.6%
Simplified72.6%
Taylor expanded in z around 0 35.8%
*-commutative35.8%
Simplified35.8%
if -6.49999999999999991e-15 < x < 2.80000000000000024e-78Initial program 98.8%
metadata-eval98.8%
Simplified98.8%
Taylor expanded in x around 0 99.5%
Taylor expanded in y around inf 79.6%
Taylor expanded in z around 0 39.4%
*-commutative39.4%
Simplified39.4%
Final simplification37.4%
(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.3%
metadata-eval99.3%
Simplified99.3%
Final simplification99.3%
(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.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 50.2%
sub-neg50.2%
distribute-rgt-in50.2%
metadata-eval50.2%
distribute-lft-neg-in50.2%
associate-+r+50.2%
metadata-eval50.2%
distribute-rgt-neg-in50.2%
metadata-eval50.2%
Simplified50.2%
Taylor expanded in z around 0 23.3%
*-commutative23.3%
Simplified23.3%
Final simplification23.3%
herbie shell --seed 2024075
(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))))