
(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 (+ x (+ (* -6.0 (* z (- y x))) (* (- y x) 4.0))))
double code(double x, double y, double z) {
return x + ((-6.0 * (z * (y - x))) + ((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) * (z * (y - x))) + ((y - x) * 4.0d0))
end function
public static double code(double x, double y, double z) {
return x + ((-6.0 * (z * (y - x))) + ((y - x) * 4.0));
}
def code(x, y, z): return x + ((-6.0 * (z * (y - x))) + ((y - x) * 4.0))
function code(x, y, z) return Float64(x + Float64(Float64(-6.0 * Float64(z * Float64(y - x))) + Float64(Float64(y - x) * 4.0))) end
function tmp = code(x, y, z) tmp = x + ((-6.0 * (z * (y - x))) + ((y - x) * 4.0)); end
code[x_, y_, z_] := N[(x + N[(N[(-6.0 * N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y - x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(-6 \cdot \left(z \cdot \left(y - x\right)\right) + \left(y - x\right) \cdot 4\right)
\end{array}
Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around 0 99.8%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(if (<= z -9.8e+70)
(* z (* -6.0 y))
(if (<= z -0.5)
(* z (* x 6.0))
(if (<= z -1.75e-219)
(* x -3.0)
(if (<= z -3.4e-292)
(* y 4.0)
(if (<= z 1.25e-229)
(* x -3.0)
(if (<= z 1.55e-143)
(* y 4.0)
(if (<= z 0.65) (* x -3.0) (* y (* -6.0 z))))))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -9.8e+70) {
tmp = z * (-6.0 * y);
} else if (z <= -0.5) {
tmp = z * (x * 6.0);
} else if (z <= -1.75e-219) {
tmp = x * -3.0;
} else if (z <= -3.4e-292) {
tmp = y * 4.0;
} else if (z <= 1.25e-229) {
tmp = x * -3.0;
} else if (z <= 1.55e-143) {
tmp = y * 4.0;
} else if (z <= 0.65) {
tmp = x * -3.0;
} else {
tmp = y * (-6.0 * 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 <= (-9.8d+70)) then
tmp = z * ((-6.0d0) * y)
else if (z <= (-0.5d0)) then
tmp = z * (x * 6.0d0)
else if (z <= (-1.75d-219)) then
tmp = x * (-3.0d0)
else if (z <= (-3.4d-292)) then
tmp = y * 4.0d0
else if (z <= 1.25d-229) then
tmp = x * (-3.0d0)
else if (z <= 1.55d-143) then
tmp = y * 4.0d0
else if (z <= 0.65d0) then
tmp = x * (-3.0d0)
else
tmp = y * ((-6.0d0) * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -9.8e+70) {
tmp = z * (-6.0 * y);
} else if (z <= -0.5) {
tmp = z * (x * 6.0);
} else if (z <= -1.75e-219) {
tmp = x * -3.0;
} else if (z <= -3.4e-292) {
tmp = y * 4.0;
} else if (z <= 1.25e-229) {
tmp = x * -3.0;
} else if (z <= 1.55e-143) {
tmp = y * 4.0;
} else if (z <= 0.65) {
tmp = x * -3.0;
} else {
tmp = y * (-6.0 * z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -9.8e+70: tmp = z * (-6.0 * y) elif z <= -0.5: tmp = z * (x * 6.0) elif z <= -1.75e-219: tmp = x * -3.0 elif z <= -3.4e-292: tmp = y * 4.0 elif z <= 1.25e-229: tmp = x * -3.0 elif z <= 1.55e-143: tmp = y * 4.0 elif z <= 0.65: tmp = x * -3.0 else: tmp = y * (-6.0 * z) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -9.8e+70) tmp = Float64(z * Float64(-6.0 * y)); elseif (z <= -0.5) tmp = Float64(z * Float64(x * 6.0)); elseif (z <= -1.75e-219) tmp = Float64(x * -3.0); elseif (z <= -3.4e-292) tmp = Float64(y * 4.0); elseif (z <= 1.25e-229) tmp = Float64(x * -3.0); elseif (z <= 1.55e-143) tmp = Float64(y * 4.0); elseif (z <= 0.65) tmp = Float64(x * -3.0); else tmp = Float64(y * Float64(-6.0 * z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -9.8e+70) tmp = z * (-6.0 * y); elseif (z <= -0.5) tmp = z * (x * 6.0); elseif (z <= -1.75e-219) tmp = x * -3.0; elseif (z <= -3.4e-292) tmp = y * 4.0; elseif (z <= 1.25e-229) tmp = x * -3.0; elseif (z <= 1.55e-143) tmp = y * 4.0; elseif (z <= 0.65) tmp = x * -3.0; else tmp = y * (-6.0 * z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -9.8e+70], N[(z * N[(-6.0 * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -0.5], N[(z * N[(x * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.75e-219], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -3.4e-292], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.25e-229], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.55e-143], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.65], N[(x * -3.0), $MachinePrecision], N[(y * N[(-6.0 * z), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.8 \cdot 10^{+70}:\\
\;\;\;\;z \cdot \left(-6 \cdot y\right)\\
\mathbf{elif}\;z \leq -0.5:\\
\;\;\;\;z \cdot \left(x \cdot 6\right)\\
\mathbf{elif}\;z \leq -1.75 \cdot 10^{-219}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -3.4 \cdot 10^{-292}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-229}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-143}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.65:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(-6 \cdot z\right)\\
\end{array}
\end{array}
if z < -9.80000000000000056e70Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 99.8%
Taylor expanded in x around 0 61.1%
*-commutative61.1%
associate-*l*61.0%
distribute-rgt-in61.0%
*-commutative61.0%
Simplified61.0%
Taylor expanded in z around inf 61.1%
associate-*r*61.1%
*-commutative61.1%
Simplified61.1%
if -9.80000000000000056e70 < z < -0.5Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 69.4%
sub-neg69.4%
distribute-rgt-in69.5%
metadata-eval69.5%
distribute-lft-neg-in69.5%
associate-+r+69.5%
metadata-eval69.5%
distribute-rgt-neg-in69.5%
metadata-eval69.5%
Simplified69.5%
Taylor expanded in z around inf 69.5%
Taylor expanded in z around inf 59.7%
*-commutative59.7%
*-commutative59.7%
associate-*r*59.8%
*-commutative59.8%
Simplified59.8%
if -0.5 < z < -1.75000000000000006e-219 or -3.40000000000000017e-292 < z < 1.25000000000000004e-229 or 1.55000000000000004e-143 < z < 0.650000000000000022Initial program 99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around inf 64.4%
sub-neg64.4%
distribute-rgt-in64.4%
metadata-eval64.4%
distribute-lft-neg-in64.4%
associate-+r+64.4%
metadata-eval64.4%
distribute-rgt-neg-in64.4%
metadata-eval64.4%
Simplified64.4%
Taylor expanded in z around 0 63.2%
*-commutative63.2%
Simplified63.2%
if -1.75000000000000006e-219 < z < -3.40000000000000017e-292 or 1.25000000000000004e-229 < z < 1.55000000000000004e-143Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 99.9%
Taylor expanded in x around 0 74.5%
*-commutative74.5%
Simplified74.5%
if 0.650000000000000022 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 99.8%
Taylor expanded in x around 0 60.1%
*-commutative60.1%
associate-*l*60.1%
distribute-rgt-in60.1%
*-commutative60.1%
Simplified60.1%
Taylor expanded in z around inf 58.6%
*-commutative58.6%
associate-*l*58.7%
Simplified58.7%
Final simplification63.1%
(FPCore (x y z)
:precision binary64
(if (<= z -7.2e+70)
(* z (* -6.0 y))
(if (<= z -0.5)
(* z (* x 6.0))
(if (<= z -1.6e-219)
(* x -3.0)
(if (<= z -8.6e-294)
(* y 4.0)
(if (<= z 1.55e-229)
(* x -3.0)
(if (<= z 6e-143)
(* y 4.0)
(if (<= z 0.6) (* x -3.0) (* -6.0 (* z y))))))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -7.2e+70) {
tmp = z * (-6.0 * y);
} else if (z <= -0.5) {
tmp = z * (x * 6.0);
} else if (z <= -1.6e-219) {
tmp = x * -3.0;
} else if (z <= -8.6e-294) {
tmp = y * 4.0;
} else if (z <= 1.55e-229) {
tmp = x * -3.0;
} else if (z <= 6e-143) {
tmp = y * 4.0;
} else if (z <= 0.6) {
tmp = x * -3.0;
} else {
tmp = -6.0 * (z * y);
}
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 <= (-7.2d+70)) then
tmp = z * ((-6.0d0) * y)
else if (z <= (-0.5d0)) then
tmp = z * (x * 6.0d0)
else if (z <= (-1.6d-219)) then
tmp = x * (-3.0d0)
else if (z <= (-8.6d-294)) then
tmp = y * 4.0d0
else if (z <= 1.55d-229) then
tmp = x * (-3.0d0)
else if (z <= 6d-143) then
tmp = y * 4.0d0
else if (z <= 0.6d0) then
tmp = x * (-3.0d0)
else
tmp = (-6.0d0) * (z * y)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -7.2e+70) {
tmp = z * (-6.0 * y);
} else if (z <= -0.5) {
tmp = z * (x * 6.0);
} else if (z <= -1.6e-219) {
tmp = x * -3.0;
} else if (z <= -8.6e-294) {
tmp = y * 4.0;
} else if (z <= 1.55e-229) {
tmp = x * -3.0;
} else if (z <= 6e-143) {
tmp = y * 4.0;
} else if (z <= 0.6) {
tmp = x * -3.0;
} else {
tmp = -6.0 * (z * y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -7.2e+70: tmp = z * (-6.0 * y) elif z <= -0.5: tmp = z * (x * 6.0) elif z <= -1.6e-219: tmp = x * -3.0 elif z <= -8.6e-294: tmp = y * 4.0 elif z <= 1.55e-229: tmp = x * -3.0 elif z <= 6e-143: tmp = y * 4.0 elif z <= 0.6: tmp = x * -3.0 else: tmp = -6.0 * (z * y) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -7.2e+70) tmp = Float64(z * Float64(-6.0 * y)); elseif (z <= -0.5) tmp = Float64(z * Float64(x * 6.0)); elseif (z <= -1.6e-219) tmp = Float64(x * -3.0); elseif (z <= -8.6e-294) tmp = Float64(y * 4.0); elseif (z <= 1.55e-229) tmp = Float64(x * -3.0); elseif (z <= 6e-143) tmp = Float64(y * 4.0); elseif (z <= 0.6) tmp = Float64(x * -3.0); else tmp = Float64(-6.0 * Float64(z * y)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -7.2e+70) tmp = z * (-6.0 * y); elseif (z <= -0.5) tmp = z * (x * 6.0); elseif (z <= -1.6e-219) tmp = x * -3.0; elseif (z <= -8.6e-294) tmp = y * 4.0; elseif (z <= 1.55e-229) tmp = x * -3.0; elseif (z <= 6e-143) tmp = y * 4.0; elseif (z <= 0.6) tmp = x * -3.0; else tmp = -6.0 * (z * y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -7.2e+70], N[(z * N[(-6.0 * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -0.5], N[(z * N[(x * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.6e-219], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -8.6e-294], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.55e-229], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 6e-143], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.6], N[(x * -3.0), $MachinePrecision], N[(-6.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.2 \cdot 10^{+70}:\\
\;\;\;\;z \cdot \left(-6 \cdot y\right)\\
\mathbf{elif}\;z \leq -0.5:\\
\;\;\;\;z \cdot \left(x \cdot 6\right)\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{-219}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -8.6 \cdot 10^{-294}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-229}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-143}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.6:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;-6 \cdot \left(z \cdot y\right)\\
\end{array}
\end{array}
if z < -7.1999999999999999e70Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 99.8%
Taylor expanded in x around 0 61.1%
*-commutative61.1%
associate-*l*61.0%
distribute-rgt-in61.0%
*-commutative61.0%
Simplified61.0%
Taylor expanded in z around inf 61.1%
associate-*r*61.1%
*-commutative61.1%
Simplified61.1%
if -7.1999999999999999e70 < z < -0.5Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 69.4%
sub-neg69.4%
distribute-rgt-in69.5%
metadata-eval69.5%
distribute-lft-neg-in69.5%
associate-+r+69.5%
metadata-eval69.5%
distribute-rgt-neg-in69.5%
metadata-eval69.5%
Simplified69.5%
Taylor expanded in z around inf 69.5%
Taylor expanded in z around inf 59.7%
*-commutative59.7%
*-commutative59.7%
associate-*r*59.8%
*-commutative59.8%
Simplified59.8%
if -0.5 < z < -1.59999999999999999e-219 or -8.60000000000000039e-294 < z < 1.55e-229 or 5.9999999999999997e-143 < z < 0.599999999999999978Initial program 99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around inf 64.4%
sub-neg64.4%
distribute-rgt-in64.4%
metadata-eval64.4%
distribute-lft-neg-in64.4%
associate-+r+64.4%
metadata-eval64.4%
distribute-rgt-neg-in64.4%
metadata-eval64.4%
Simplified64.4%
Taylor expanded in z around 0 63.2%
*-commutative63.2%
Simplified63.2%
if -1.59999999999999999e-219 < z < -8.60000000000000039e-294 or 1.55e-229 < z < 5.9999999999999997e-143Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 99.9%
Taylor expanded in x around 0 74.5%
*-commutative74.5%
Simplified74.5%
if 0.599999999999999978 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 99.8%
Taylor expanded in x around 0 60.1%
*-commutative60.1%
associate-*l*60.1%
distribute-rgt-in60.1%
*-commutative60.1%
Simplified60.1%
Taylor expanded in z around inf 58.6%
Final simplification63.1%
(FPCore (x y z)
:precision binary64
(if (<= z -3.2e+76)
(* z (* -6.0 y))
(if (<= z -0.5)
(* x (* z 6.0))
(if (<= z -1.15e-218)
(* x -3.0)
(if (<= z -4.8e-288)
(* y 4.0)
(if (<= z 4.5e-230)
(* x -3.0)
(if (<= z 2.7e-144)
(* y 4.0)
(if (<= z 0.58) (* x -3.0) (* -6.0 (* z y))))))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -3.2e+76) {
tmp = z * (-6.0 * y);
} else if (z <= -0.5) {
tmp = x * (z * 6.0);
} else if (z <= -1.15e-218) {
tmp = x * -3.0;
} else if (z <= -4.8e-288) {
tmp = y * 4.0;
} else if (z <= 4.5e-230) {
tmp = x * -3.0;
} else if (z <= 2.7e-144) {
tmp = y * 4.0;
} else if (z <= 0.58) {
tmp = x * -3.0;
} else {
tmp = -6.0 * (z * y);
}
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 <= (-3.2d+76)) then
tmp = z * ((-6.0d0) * y)
else if (z <= (-0.5d0)) then
tmp = x * (z * 6.0d0)
else if (z <= (-1.15d-218)) then
tmp = x * (-3.0d0)
else if (z <= (-4.8d-288)) then
tmp = y * 4.0d0
else if (z <= 4.5d-230) then
tmp = x * (-3.0d0)
else if (z <= 2.7d-144) then
tmp = y * 4.0d0
else if (z <= 0.58d0) then
tmp = x * (-3.0d0)
else
tmp = (-6.0d0) * (z * y)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -3.2e+76) {
tmp = z * (-6.0 * y);
} else if (z <= -0.5) {
tmp = x * (z * 6.0);
} else if (z <= -1.15e-218) {
tmp = x * -3.0;
} else if (z <= -4.8e-288) {
tmp = y * 4.0;
} else if (z <= 4.5e-230) {
tmp = x * -3.0;
} else if (z <= 2.7e-144) {
tmp = y * 4.0;
} else if (z <= 0.58) {
tmp = x * -3.0;
} else {
tmp = -6.0 * (z * y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -3.2e+76: tmp = z * (-6.0 * y) elif z <= -0.5: tmp = x * (z * 6.0) elif z <= -1.15e-218: tmp = x * -3.0 elif z <= -4.8e-288: tmp = y * 4.0 elif z <= 4.5e-230: tmp = x * -3.0 elif z <= 2.7e-144: tmp = y * 4.0 elif z <= 0.58: tmp = x * -3.0 else: tmp = -6.0 * (z * y) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -3.2e+76) tmp = Float64(z * Float64(-6.0 * y)); elseif (z <= -0.5) tmp = Float64(x * Float64(z * 6.0)); elseif (z <= -1.15e-218) tmp = Float64(x * -3.0); elseif (z <= -4.8e-288) tmp = Float64(y * 4.0); elseif (z <= 4.5e-230) tmp = Float64(x * -3.0); elseif (z <= 2.7e-144) tmp = Float64(y * 4.0); elseif (z <= 0.58) tmp = Float64(x * -3.0); else tmp = Float64(-6.0 * Float64(z * y)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -3.2e+76) tmp = z * (-6.0 * y); elseif (z <= -0.5) tmp = x * (z * 6.0); elseif (z <= -1.15e-218) tmp = x * -3.0; elseif (z <= -4.8e-288) tmp = y * 4.0; elseif (z <= 4.5e-230) tmp = x * -3.0; elseif (z <= 2.7e-144) tmp = y * 4.0; elseif (z <= 0.58) tmp = x * -3.0; else tmp = -6.0 * (z * y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -3.2e+76], N[(z * N[(-6.0 * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -0.5], N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.15e-218], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -4.8e-288], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 4.5e-230], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.7e-144], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.58], N[(x * -3.0), $MachinePrecision], N[(-6.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+76}:\\
\;\;\;\;z \cdot \left(-6 \cdot y\right)\\
\mathbf{elif}\;z \leq -0.5:\\
\;\;\;\;x \cdot \left(z \cdot 6\right)\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{-218}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -4.8 \cdot 10^{-288}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-230}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-144}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.58:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;-6 \cdot \left(z \cdot y\right)\\
\end{array}
\end{array}
if z < -3.19999999999999976e76Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 99.8%
Taylor expanded in x around 0 61.1%
*-commutative61.1%
associate-*l*61.0%
distribute-rgt-in61.0%
*-commutative61.0%
Simplified61.0%
Taylor expanded in z around inf 61.1%
associate-*r*61.1%
*-commutative61.1%
Simplified61.1%
if -3.19999999999999976e76 < z < -0.5Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 69.4%
sub-neg69.4%
distribute-rgt-in69.5%
metadata-eval69.5%
distribute-lft-neg-in69.5%
associate-+r+69.5%
metadata-eval69.5%
distribute-rgt-neg-in69.5%
metadata-eval69.5%
Simplified69.5%
Taylor expanded in z around inf 59.8%
if -0.5 < z < -1.14999999999999997e-218 or -4.7999999999999997e-288 < z < 4.50000000000000004e-230 or 2.69999999999999975e-144 < z < 0.57999999999999996Initial program 99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around inf 64.4%
sub-neg64.4%
distribute-rgt-in64.4%
metadata-eval64.4%
distribute-lft-neg-in64.4%
associate-+r+64.4%
metadata-eval64.4%
distribute-rgt-neg-in64.4%
metadata-eval64.4%
Simplified64.4%
Taylor expanded in z around 0 63.2%
*-commutative63.2%
Simplified63.2%
if -1.14999999999999997e-218 < z < -4.7999999999999997e-288 or 4.50000000000000004e-230 < z < 2.69999999999999975e-144Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 99.9%
Taylor expanded in x around 0 74.5%
*-commutative74.5%
Simplified74.5%
if 0.57999999999999996 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 99.8%
Taylor expanded in x around 0 60.1%
*-commutative60.1%
associate-*l*60.1%
distribute-rgt-in60.1%
*-commutative60.1%
Simplified60.1%
Taylor expanded in z around inf 58.6%
Final simplification63.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* z y))))
(if (<= z -2.65e+76)
t_0
(if (<= z -0.5)
(* x (* z 6.0))
(if (<= z -1.9e-217)
(* x -3.0)
(if (<= z -2.6e-291)
(* y 4.0)
(if (<= z 9.5e-228)
(* x -3.0)
(if (<= z 2.2e-142)
(* y 4.0)
(if (<= z 0.65) (* x -3.0) t_0)))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (z * y);
double tmp;
if (z <= -2.65e+76) {
tmp = t_0;
} else if (z <= -0.5) {
tmp = x * (z * 6.0);
} else if (z <= -1.9e-217) {
tmp = x * -3.0;
} else if (z <= -2.6e-291) {
tmp = y * 4.0;
} else if (z <= 9.5e-228) {
tmp = x * -3.0;
} else if (z <= 2.2e-142) {
tmp = y * 4.0;
} else if (z <= 0.65) {
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) * (z * y)
if (z <= (-2.65d+76)) then
tmp = t_0
else if (z <= (-0.5d0)) then
tmp = x * (z * 6.0d0)
else if (z <= (-1.9d-217)) then
tmp = x * (-3.0d0)
else if (z <= (-2.6d-291)) then
tmp = y * 4.0d0
else if (z <= 9.5d-228) then
tmp = x * (-3.0d0)
else if (z <= 2.2d-142) then
tmp = y * 4.0d0
else if (z <= 0.65d0) 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 * (z * y);
double tmp;
if (z <= -2.65e+76) {
tmp = t_0;
} else if (z <= -0.5) {
tmp = x * (z * 6.0);
} else if (z <= -1.9e-217) {
tmp = x * -3.0;
} else if (z <= -2.6e-291) {
tmp = y * 4.0;
} else if (z <= 9.5e-228) {
tmp = x * -3.0;
} else if (z <= 2.2e-142) {
tmp = y * 4.0;
} else if (z <= 0.65) {
tmp = x * -3.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (z * y) tmp = 0 if z <= -2.65e+76: tmp = t_0 elif z <= -0.5: tmp = x * (z * 6.0) elif z <= -1.9e-217: tmp = x * -3.0 elif z <= -2.6e-291: tmp = y * 4.0 elif z <= 9.5e-228: tmp = x * -3.0 elif z <= 2.2e-142: tmp = y * 4.0 elif z <= 0.65: tmp = x * -3.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(z * y)) tmp = 0.0 if (z <= -2.65e+76) tmp = t_0; elseif (z <= -0.5) tmp = Float64(x * Float64(z * 6.0)); elseif (z <= -1.9e-217) tmp = Float64(x * -3.0); elseif (z <= -2.6e-291) tmp = Float64(y * 4.0); elseif (z <= 9.5e-228) tmp = Float64(x * -3.0); elseif (z <= 2.2e-142) tmp = Float64(y * 4.0); elseif (z <= 0.65) tmp = Float64(x * -3.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (z * y); tmp = 0.0; if (z <= -2.65e+76) tmp = t_0; elseif (z <= -0.5) tmp = x * (z * 6.0); elseif (z <= -1.9e-217) tmp = x * -3.0; elseif (z <= -2.6e-291) tmp = y * 4.0; elseif (z <= 9.5e-228) tmp = x * -3.0; elseif (z <= 2.2e-142) tmp = y * 4.0; elseif (z <= 0.65) 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[(z * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.65e+76], t$95$0, If[LessEqual[z, -0.5], N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.9e-217], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -2.6e-291], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 9.5e-228], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.2e-142], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.65], N[(x * -3.0), $MachinePrecision], t$95$0]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(z \cdot y\right)\\
\mathbf{if}\;z \leq -2.65 \cdot 10^{+76}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -0.5:\\
\;\;\;\;x \cdot \left(z \cdot 6\right)\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{-217}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-291}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{-228}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-142}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.65:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -2.65000000000000008e76 or 0.650000000000000022 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 99.8%
Taylor expanded in x around 0 60.6%
*-commutative60.6%
associate-*l*60.6%
distribute-rgt-in60.6%
*-commutative60.6%
Simplified60.6%
Taylor expanded in z around inf 60.0%
if -2.65000000000000008e76 < z < -0.5Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 69.4%
sub-neg69.4%
distribute-rgt-in69.5%
metadata-eval69.5%
distribute-lft-neg-in69.5%
associate-+r+69.5%
metadata-eval69.5%
distribute-rgt-neg-in69.5%
metadata-eval69.5%
Simplified69.5%
Taylor expanded in z around inf 59.8%
if -0.5 < z < -1.89999999999999993e-217 or -2.5999999999999999e-291 < z < 9.50000000000000024e-228 or 2.20000000000000016e-142 < z < 0.650000000000000022Initial program 99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around inf 64.4%
sub-neg64.4%
distribute-rgt-in64.4%
metadata-eval64.4%
distribute-lft-neg-in64.4%
associate-+r+64.4%
metadata-eval64.4%
distribute-rgt-neg-in64.4%
metadata-eval64.4%
Simplified64.4%
Taylor expanded in z around 0 63.2%
*-commutative63.2%
Simplified63.2%
if -1.89999999999999993e-217 < z < -2.5999999999999999e-291 or 9.50000000000000024e-228 < z < 2.20000000000000016e-142Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 99.9%
Taylor expanded in x around 0 74.5%
*-commutative74.5%
Simplified74.5%
Final simplification63.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* z y))))
(if (<= z -1.9e+76)
t_0
(if (<= z -0.5)
(* 6.0 (* x z))
(if (<= z -5e-217)
(* x -3.0)
(if (<= z -5.6e-290)
(* y 4.0)
(if (<= z 4.4e-230)
(* x -3.0)
(if (<= z 6.2e-144)
(* y 4.0)
(if (<= z 0.58) (* x -3.0) t_0)))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (z * y);
double tmp;
if (z <= -1.9e+76) {
tmp = t_0;
} else if (z <= -0.5) {
tmp = 6.0 * (x * z);
} else if (z <= -5e-217) {
tmp = x * -3.0;
} else if (z <= -5.6e-290) {
tmp = y * 4.0;
} else if (z <= 4.4e-230) {
tmp = x * -3.0;
} else if (z <= 6.2e-144) {
tmp = y * 4.0;
} else if (z <= 0.58) {
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) * (z * y)
if (z <= (-1.9d+76)) then
tmp = t_0
else if (z <= (-0.5d0)) then
tmp = 6.0d0 * (x * z)
else if (z <= (-5d-217)) then
tmp = x * (-3.0d0)
else if (z <= (-5.6d-290)) then
tmp = y * 4.0d0
else if (z <= 4.4d-230) then
tmp = x * (-3.0d0)
else if (z <= 6.2d-144) then
tmp = y * 4.0d0
else if (z <= 0.58d0) 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 * (z * y);
double tmp;
if (z <= -1.9e+76) {
tmp = t_0;
} else if (z <= -0.5) {
tmp = 6.0 * (x * z);
} else if (z <= -5e-217) {
tmp = x * -3.0;
} else if (z <= -5.6e-290) {
tmp = y * 4.0;
} else if (z <= 4.4e-230) {
tmp = x * -3.0;
} else if (z <= 6.2e-144) {
tmp = y * 4.0;
} else if (z <= 0.58) {
tmp = x * -3.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (z * y) tmp = 0 if z <= -1.9e+76: tmp = t_0 elif z <= -0.5: tmp = 6.0 * (x * z) elif z <= -5e-217: tmp = x * -3.0 elif z <= -5.6e-290: tmp = y * 4.0 elif z <= 4.4e-230: tmp = x * -3.0 elif z <= 6.2e-144: tmp = y * 4.0 elif z <= 0.58: tmp = x * -3.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(z * y)) tmp = 0.0 if (z <= -1.9e+76) tmp = t_0; elseif (z <= -0.5) tmp = Float64(6.0 * Float64(x * z)); elseif (z <= -5e-217) tmp = Float64(x * -3.0); elseif (z <= -5.6e-290) tmp = Float64(y * 4.0); elseif (z <= 4.4e-230) tmp = Float64(x * -3.0); elseif (z <= 6.2e-144) tmp = Float64(y * 4.0); elseif (z <= 0.58) tmp = Float64(x * -3.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (z * y); tmp = 0.0; if (z <= -1.9e+76) tmp = t_0; elseif (z <= -0.5) tmp = 6.0 * (x * z); elseif (z <= -5e-217) tmp = x * -3.0; elseif (z <= -5.6e-290) tmp = y * 4.0; elseif (z <= 4.4e-230) tmp = x * -3.0; elseif (z <= 6.2e-144) tmp = y * 4.0; elseif (z <= 0.58) 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[(z * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.9e+76], t$95$0, If[LessEqual[z, -0.5], N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5e-217], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -5.6e-290], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 4.4e-230], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 6.2e-144], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.58], N[(x * -3.0), $MachinePrecision], t$95$0]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(z \cdot y\right)\\
\mathbf{if}\;z \leq -1.9 \cdot 10^{+76}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -0.5:\\
\;\;\;\;6 \cdot \left(x \cdot z\right)\\
\mathbf{elif}\;z \leq -5 \cdot 10^{-217}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -5.6 \cdot 10^{-290}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-230}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-144}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.58:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -1.90000000000000012e76 or 0.57999999999999996 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 99.8%
Taylor expanded in x around 0 60.6%
*-commutative60.6%
associate-*l*60.6%
distribute-rgt-in60.6%
*-commutative60.6%
Simplified60.6%
Taylor expanded in z around inf 60.0%
if -1.90000000000000012e76 < z < -0.5Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 69.4%
sub-neg69.4%
distribute-rgt-in69.5%
metadata-eval69.5%
distribute-lft-neg-in69.5%
associate-+r+69.5%
metadata-eval69.5%
distribute-rgt-neg-in69.5%
metadata-eval69.5%
Simplified69.5%
Taylor expanded in z around inf 69.5%
Taylor expanded in z around inf 59.7%
*-commutative59.7%
Simplified59.7%
if -0.5 < z < -5.0000000000000002e-217 or -5.59999999999999993e-290 < z < 4.39999999999999961e-230 or 6.2000000000000001e-144 < z < 0.57999999999999996Initial program 99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around inf 64.4%
sub-neg64.4%
distribute-rgt-in64.4%
metadata-eval64.4%
distribute-lft-neg-in64.4%
associate-+r+64.4%
metadata-eval64.4%
distribute-rgt-neg-in64.4%
metadata-eval64.4%
Simplified64.4%
Taylor expanded in z around 0 63.2%
*-commutative63.2%
Simplified63.2%
if -5.0000000000000002e-217 < z < -5.59999999999999993e-290 or 4.39999999999999961e-230 < z < 6.2000000000000001e-144Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 99.9%
Taylor expanded in x around 0 74.5%
*-commutative74.5%
Simplified74.5%
Final simplification63.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ -3.0 (* z 6.0)))) (t_1 (* -6.0 (* z (- y x)))))
(if (<= z -215000.0)
t_1
(if (<= z -5.6e-223)
t_0
(if (<= z -5.6e-289)
(* y 4.0)
(if (<= z 8.2e-230)
(* x -3.0)
(if (<= z 8e-143) (* y 4.0) (if (<= z 3.7) t_0 t_1))))))))
double code(double x, double y, double z) {
double t_0 = x * (-3.0 + (z * 6.0));
double t_1 = -6.0 * (z * (y - x));
double tmp;
if (z <= -215000.0) {
tmp = t_1;
} else if (z <= -5.6e-223) {
tmp = t_0;
} else if (z <= -5.6e-289) {
tmp = y * 4.0;
} else if (z <= 8.2e-230) {
tmp = x * -3.0;
} else if (z <= 8e-143) {
tmp = y * 4.0;
} else if (z <= 3.7) {
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 = (-6.0d0) * (z * (y - x))
if (z <= (-215000.0d0)) then
tmp = t_1
else if (z <= (-5.6d-223)) then
tmp = t_0
else if (z <= (-5.6d-289)) then
tmp = y * 4.0d0
else if (z <= 8.2d-230) then
tmp = x * (-3.0d0)
else if (z <= 8d-143) then
tmp = y * 4.0d0
else if (z <= 3.7d0) 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 = -6.0 * (z * (y - x));
double tmp;
if (z <= -215000.0) {
tmp = t_1;
} else if (z <= -5.6e-223) {
tmp = t_0;
} else if (z <= -5.6e-289) {
tmp = y * 4.0;
} else if (z <= 8.2e-230) {
tmp = x * -3.0;
} else if (z <= 8e-143) {
tmp = y * 4.0;
} else if (z <= 3.7) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = x * (-3.0 + (z * 6.0)) t_1 = -6.0 * (z * (y - x)) tmp = 0 if z <= -215000.0: tmp = t_1 elif z <= -5.6e-223: tmp = t_0 elif z <= -5.6e-289: tmp = y * 4.0 elif z <= 8.2e-230: tmp = x * -3.0 elif z <= 8e-143: tmp = y * 4.0 elif z <= 3.7: 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(-6.0 * Float64(z * Float64(y - x))) tmp = 0.0 if (z <= -215000.0) tmp = t_1; elseif (z <= -5.6e-223) tmp = t_0; elseif (z <= -5.6e-289) tmp = Float64(y * 4.0); elseif (z <= 8.2e-230) tmp = Float64(x * -3.0); elseif (z <= 8e-143) tmp = Float64(y * 4.0); elseif (z <= 3.7) 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 = -6.0 * (z * (y - x)); tmp = 0.0; if (z <= -215000.0) tmp = t_1; elseif (z <= -5.6e-223) tmp = t_0; elseif (z <= -5.6e-289) tmp = y * 4.0; elseif (z <= 8.2e-230) tmp = x * -3.0; elseif (z <= 8e-143) tmp = y * 4.0; elseif (z <= 3.7) 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[(-6.0 * N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -215000.0], t$95$1, If[LessEqual[z, -5.6e-223], t$95$0, If[LessEqual[z, -5.6e-289], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 8.2e-230], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 8e-143], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 3.7], t$95$0, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(-3 + z \cdot 6\right)\\
t_1 := -6 \cdot \left(z \cdot \left(y - x\right)\right)\\
\mathbf{if}\;z \leq -215000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -5.6 \cdot 10^{-223}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -5.6 \cdot 10^{-289}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{-230}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 8 \cdot 10^{-143}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 3.7:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -215000 or 3.7000000000000002 < 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.7%
if -215000 < z < -5.6000000000000003e-223 or 7.9999999999999996e-143 < z < 3.7000000000000002Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 62.7%
sub-neg62.7%
distribute-rgt-in62.8%
metadata-eval62.8%
distribute-lft-neg-in62.8%
associate-+r+62.8%
metadata-eval62.8%
distribute-rgt-neg-in62.8%
metadata-eval62.8%
Simplified62.8%
if -5.6000000000000003e-223 < z < -5.5999999999999997e-289 or 8.2000000000000003e-230 < z < 7.9999999999999996e-143Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 99.9%
Taylor expanded in x around 0 74.5%
*-commutative74.5%
Simplified74.5%
if -5.5999999999999997e-289 < z < 8.2000000000000003e-230Initial program 99.0%
metadata-eval99.0%
Simplified99.0%
Taylor expanded in x around inf 73.3%
sub-neg73.3%
distribute-rgt-in73.3%
metadata-eval73.3%
distribute-lft-neg-in73.3%
associate-+r+73.3%
metadata-eval73.3%
distribute-rgt-neg-in73.3%
metadata-eval73.3%
Simplified73.3%
Taylor expanded in z around 0 73.3%
*-commutative73.3%
Simplified73.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* z (- y x)))))
(if (<= z -0.0035)
t_0
(if (<= z -5.2e-218)
(* x -3.0)
(if (<= z -4.9e-288)
(* y 4.0)
(if (<= z 5.2e-230)
(* x -3.0)
(if (<= z 9e-144) (* 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 * (z * (y - x));
double tmp;
if (z <= -0.0035) {
tmp = t_0;
} else if (z <= -5.2e-218) {
tmp = x * -3.0;
} else if (z <= -4.9e-288) {
tmp = y * 4.0;
} else if (z <= 5.2e-230) {
tmp = x * -3.0;
} else if (z <= 9e-144) {
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) * (z * (y - x))
if (z <= (-0.0035d0)) then
tmp = t_0
else if (z <= (-5.2d-218)) then
tmp = x * (-3.0d0)
else if (z <= (-4.9d-288)) then
tmp = y * 4.0d0
else if (z <= 5.2d-230) then
tmp = x * (-3.0d0)
else if (z <= 9d-144) 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 * (z * (y - x));
double tmp;
if (z <= -0.0035) {
tmp = t_0;
} else if (z <= -5.2e-218) {
tmp = x * -3.0;
} else if (z <= -4.9e-288) {
tmp = y * 4.0;
} else if (z <= 5.2e-230) {
tmp = x * -3.0;
} else if (z <= 9e-144) {
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 * (z * (y - x)) tmp = 0 if z <= -0.0035: tmp = t_0 elif z <= -5.2e-218: tmp = x * -3.0 elif z <= -4.9e-288: tmp = y * 4.0 elif z <= 5.2e-230: tmp = x * -3.0 elif z <= 9e-144: 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(z * Float64(y - x))) tmp = 0.0 if (z <= -0.0035) tmp = t_0; elseif (z <= -5.2e-218) tmp = Float64(x * -3.0); elseif (z <= -4.9e-288) tmp = Float64(y * 4.0); elseif (z <= 5.2e-230) tmp = Float64(x * -3.0); elseif (z <= 9e-144) 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 * (z * (y - x)); tmp = 0.0; if (z <= -0.0035) tmp = t_0; elseif (z <= -5.2e-218) tmp = x * -3.0; elseif (z <= -4.9e-288) tmp = y * 4.0; elseif (z <= 5.2e-230) tmp = x * -3.0; elseif (z <= 9e-144) 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[(z * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.0035], t$95$0, If[LessEqual[z, -5.2e-218], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -4.9e-288], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 5.2e-230], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 9e-144], 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(z \cdot \left(y - x\right)\right)\\
\mathbf{if}\;z \leq -0.0035:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -5.2 \cdot 10^{-218}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -4.9 \cdot 10^{-288}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-230}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-144}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -0.00350000000000000007 or 0.5 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 99.8%
Taylor expanded in z around inf 97.1%
if -0.00350000000000000007 < z < -5.19999999999999966e-218 or -4.90000000000000026e-288 < z < 5.2000000000000003e-230 or 8.9999999999999996e-144 < z < 0.5Initial program 99.2%
metadata-eval99.2%
Simplified99.2%
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 0 64.0%
*-commutative64.0%
Simplified64.0%
if -5.19999999999999966e-218 < z < -4.90000000000000026e-288 or 5.2000000000000003e-230 < z < 8.9999999999999996e-144Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 99.9%
Taylor expanded in x around 0 74.5%
*-commutative74.5%
Simplified74.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* z y))))
(if (<= z -840.0)
t_0
(if (<= z -1.66e-220)
(* x -3.0)
(if (<= z -9e-295)
(* y 4.0)
(if (<= z 4.1e-227)
(* x -3.0)
(if (<= z 1.45e-145)
(* 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 * (z * y);
double tmp;
if (z <= -840.0) {
tmp = t_0;
} else if (z <= -1.66e-220) {
tmp = x * -3.0;
} else if (z <= -9e-295) {
tmp = y * 4.0;
} else if (z <= 4.1e-227) {
tmp = x * -3.0;
} else if (z <= 1.45e-145) {
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) * (z * y)
if (z <= (-840.0d0)) then
tmp = t_0
else if (z <= (-1.66d-220)) then
tmp = x * (-3.0d0)
else if (z <= (-9d-295)) then
tmp = y * 4.0d0
else if (z <= 4.1d-227) then
tmp = x * (-3.0d0)
else if (z <= 1.45d-145) 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 * (z * y);
double tmp;
if (z <= -840.0) {
tmp = t_0;
} else if (z <= -1.66e-220) {
tmp = x * -3.0;
} else if (z <= -9e-295) {
tmp = y * 4.0;
} else if (z <= 4.1e-227) {
tmp = x * -3.0;
} else if (z <= 1.45e-145) {
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 * (z * y) tmp = 0 if z <= -840.0: tmp = t_0 elif z <= -1.66e-220: tmp = x * -3.0 elif z <= -9e-295: tmp = y * 4.0 elif z <= 4.1e-227: tmp = x * -3.0 elif z <= 1.45e-145: 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(z * y)) tmp = 0.0 if (z <= -840.0) tmp = t_0; elseif (z <= -1.66e-220) tmp = Float64(x * -3.0); elseif (z <= -9e-295) tmp = Float64(y * 4.0); elseif (z <= 4.1e-227) tmp = Float64(x * -3.0); elseif (z <= 1.45e-145) 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 * (z * y); tmp = 0.0; if (z <= -840.0) tmp = t_0; elseif (z <= -1.66e-220) tmp = x * -3.0; elseif (z <= -9e-295) tmp = y * 4.0; elseif (z <= 4.1e-227) tmp = x * -3.0; elseif (z <= 1.45e-145) 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[(z * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -840.0], t$95$0, If[LessEqual[z, -1.66e-220], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -9e-295], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 4.1e-227], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.45e-145], 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(z \cdot y\right)\\
\mathbf{if}\;z \leq -840:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -1.66 \cdot 10^{-220}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -9 \cdot 10^{-295}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{-227}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-145}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.62:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -840 or 0.619999999999999996 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 99.8%
Taylor expanded in x around 0 58.2%
*-commutative58.2%
associate-*l*58.2%
distribute-rgt-in58.2%
*-commutative58.2%
Simplified58.2%
Taylor expanded in z around inf 57.2%
if -840 < z < -1.66000000000000007e-220 or -9.0000000000000003e-295 < z < 4.10000000000000009e-227 or 1.44999999999999992e-145 < z < 0.619999999999999996Initial program 99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around inf 65.2%
sub-neg65.2%
distribute-rgt-in65.2%
metadata-eval65.2%
distribute-lft-neg-in65.2%
associate-+r+65.2%
metadata-eval65.2%
distribute-rgt-neg-in65.2%
metadata-eval65.2%
Simplified65.2%
Taylor expanded in z around 0 62.1%
*-commutative62.1%
Simplified62.1%
if -1.66000000000000007e-220 < z < -9.0000000000000003e-295 or 4.10000000000000009e-227 < z < 1.44999999999999992e-145Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 99.9%
Taylor expanded in x around 0 74.5%
*-commutative74.5%
Simplified74.5%
Final simplification61.3%
(FPCore (x y z) :precision binary64 (if (or (<= z -0.6) (not (<= z 0.62))) (* -6.0 (* z (- y x))) (+ (* y 4.0) (* x -3.0))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -0.6) || !(z <= 0.62)) {
tmp = -6.0 * (z * (y - x));
} else {
tmp = (y * 4.0) + (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 ((z <= (-0.6d0)) .or. (.not. (z <= 0.62d0))) then
tmp = (-6.0d0) * (z * (y - x))
else
tmp = (y * 4.0d0) + (x * (-3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -0.6) || !(z <= 0.62)) {
tmp = -6.0 * (z * (y - x));
} else {
tmp = (y * 4.0) + (x * -3.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -0.6) or not (z <= 0.62): tmp = -6.0 * (z * (y - x)) else: tmp = (y * 4.0) + (x * -3.0) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -0.6) || !(z <= 0.62)) tmp = Float64(-6.0 * Float64(z * Float64(y - x))); else tmp = Float64(Float64(y * 4.0) + Float64(x * -3.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -0.6) || ~((z <= 0.62))) tmp = -6.0 * (z * (y - x)); else tmp = (y * 4.0) + (x * -3.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -0.6], N[Not[LessEqual[z, 0.62]], $MachinePrecision]], N[(-6.0 * N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * 4.0), $MachinePrecision] + N[(x * -3.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.6 \lor \neg \left(z \leq 0.62\right):\\
\;\;\;\;-6 \cdot \left(z \cdot \left(y - x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 4 + x \cdot -3\\
\end{array}
\end{array}
if z < -0.599999999999999978 or 0.619999999999999996 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 99.8%
Taylor expanded in z around inf 97.6%
if -0.599999999999999978 < z < 0.619999999999999996Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in z around 0 98.1%
Taylor expanded in x around 0 98.1%
Final simplification97.9%
(FPCore (x y z) :precision binary64 (if (or (<= z -0.58) (not (<= z 0.65))) (* -6.0 (* z (- y x))) (+ x (* (- y x) 4.0))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -0.58) || !(z <= 0.65)) {
tmp = -6.0 * (z * (y - x));
} else {
tmp = x + ((y - x) * 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.58d0)) .or. (.not. (z <= 0.65d0))) then
tmp = (-6.0d0) * (z * (y - x))
else
tmp = x + ((y - x) * 4.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -0.58) || !(z <= 0.65)) {
tmp = -6.0 * (z * (y - x));
} else {
tmp = x + ((y - x) * 4.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -0.58) or not (z <= 0.65): tmp = -6.0 * (z * (y - x)) else: tmp = x + ((y - x) * 4.0) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -0.58) || !(z <= 0.65)) tmp = Float64(-6.0 * Float64(z * Float64(y - x))); else tmp = Float64(x + Float64(Float64(y - x) * 4.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -0.58) || ~((z <= 0.65))) tmp = -6.0 * (z * (y - x)); else tmp = x + ((y - x) * 4.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -0.58], N[Not[LessEqual[z, 0.65]], $MachinePrecision]], N[(-6.0 * N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.58 \lor \neg \left(z \leq 0.65\right):\\
\;\;\;\;-6 \cdot \left(z \cdot \left(y - x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - x\right) \cdot 4\\
\end{array}
\end{array}
if z < -0.57999999999999996 or 0.650000000000000022 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 99.8%
Taylor expanded in z around inf 97.6%
if -0.57999999999999996 < z < 0.650000000000000022Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in z around 0 98.1%
Final simplification97.9%
(FPCore (x y z) :precision binary64 (if (or (<= x -3.7e-20) (not (<= x 1.45e-69))) (* x (+ -3.0 (* z 6.0))) (* y (+ 4.0 (* -6.0 z)))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -3.7e-20) || !(x <= 1.45e-69)) {
tmp = x * (-3.0 + (z * 6.0));
} else {
tmp = y * (4.0 + (-6.0 * 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 ((x <= (-3.7d-20)) .or. (.not. (x <= 1.45d-69))) then
tmp = x * ((-3.0d0) + (z * 6.0d0))
else
tmp = y * (4.0d0 + ((-6.0d0) * z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -3.7e-20) || !(x <= 1.45e-69)) {
tmp = x * (-3.0 + (z * 6.0));
} else {
tmp = y * (4.0 + (-6.0 * z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -3.7e-20) or not (x <= 1.45e-69): tmp = x * (-3.0 + (z * 6.0)) else: tmp = y * (4.0 + (-6.0 * z)) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -3.7e-20) || !(x <= 1.45e-69)) tmp = Float64(x * Float64(-3.0 + Float64(z * 6.0))); else tmp = Float64(y * Float64(4.0 + Float64(-6.0 * z))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -3.7e-20) || ~((x <= 1.45e-69))) tmp = x * (-3.0 + (z * 6.0)); else tmp = y * (4.0 + (-6.0 * z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -3.7e-20], N[Not[LessEqual[x, 1.45e-69]], $MachinePrecision]], N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(4.0 + N[(-6.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.7 \cdot 10^{-20} \lor \neg \left(x \leq 1.45 \cdot 10^{-69}\right):\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(4 + -6 \cdot z\right)\\
\end{array}
\end{array}
if x < -3.7000000000000001e-20 or 1.4499999999999999e-69 < x Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 76.4%
sub-neg76.4%
distribute-rgt-in76.4%
metadata-eval76.4%
distribute-lft-neg-in76.4%
associate-+r+76.4%
metadata-eval76.4%
distribute-rgt-neg-in76.4%
metadata-eval76.4%
Simplified76.4%
if -3.7000000000000001e-20 < x < 1.4499999999999999e-69Initial program 99.6%
+-commutative99.6%
associate-*l*99.7%
fma-define99.7%
sub-neg99.7%
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 85.7%
Final simplification80.4%
(FPCore (x y z) :precision binary64 (if (or (<= x -7e-17) (not (<= x 3.5e-69))) (* x -3.0) (* y 4.0)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -7e-17) || !(x <= 3.5e-69)) {
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 <= (-7d-17)) .or. (.not. (x <= 3.5d-69))) 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 <= -7e-17) || !(x <= 3.5e-69)) {
tmp = x * -3.0;
} else {
tmp = y * 4.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -7e-17) or not (x <= 3.5e-69): tmp = x * -3.0 else: tmp = y * 4.0 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -7e-17) || !(x <= 3.5e-69)) 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 <= -7e-17) || ~((x <= 3.5e-69))) tmp = x * -3.0; else tmp = y * 4.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -7e-17], N[Not[LessEqual[x, 3.5e-69]], $MachinePrecision]], N[(x * -3.0), $MachinePrecision], N[(y * 4.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7 \cdot 10^{-17} \lor \neg \left(x \leq 3.5 \cdot 10^{-69}\right):\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;y \cdot 4\\
\end{array}
\end{array}
if x < -7.0000000000000003e-17 or 3.5000000000000001e-69 < x Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 76.2%
sub-neg76.2%
distribute-rgt-in76.3%
metadata-eval76.3%
distribute-lft-neg-in76.3%
associate-+r+76.3%
metadata-eval76.3%
distribute-rgt-neg-in76.3%
metadata-eval76.3%
Simplified76.3%
Taylor expanded in z around 0 37.3%
*-commutative37.3%
Simplified37.3%
if -7.0000000000000003e-17 < x < 3.5000000000000001e-69Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around 0 46.5%
Taylor expanded in x around 0 39.4%
*-commutative39.4%
Simplified39.4%
Final simplification38.2%
(FPCore (x y z) :precision binary64 (+ x (* (+ (* x -6.0) (* y 6.0)) (- 0.6666666666666666 z))))
double code(double x, double y, double z) {
return x + (((x * -6.0) + (y * 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 + (((x * (-6.0d0)) + (y * 6.0d0)) * (0.6666666666666666d0 - z))
end function
public static double code(double x, double y, double z) {
return x + (((x * -6.0) + (y * 6.0)) * (0.6666666666666666 - z));
}
def code(x, y, z): return x + (((x * -6.0) + (y * 6.0)) * (0.6666666666666666 - z))
function code(x, y, z) return Float64(x + Float64(Float64(Float64(x * -6.0) + Float64(y * 6.0)) * Float64(0.6666666666666666 - z))) end
function tmp = code(x, y, z) tmp = x + (((x * -6.0) + (y * 6.0)) * (0.6666666666666666 - z)); end
code[x_, y_, z_] := N[(x + N[(N[(N[(x * -6.0), $MachinePrecision] + N[(y * 6.0), $MachinePrecision]), $MachinePrecision] * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(x \cdot -6 + y \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)
\end{array}
Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 99.6%
Final simplification99.6%
(FPCore (x y z) :precision binary64 (+ x (* (- 0.6666666666666666 z) (* (- y x) 6.0))))
double code(double x, double y, double z) {
return x + ((0.6666666666666666 - z) * ((y - x) * 6.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 + ((0.6666666666666666d0 - z) * ((y - x) * 6.0d0))
end function
public static double code(double x, double y, double z) {
return x + ((0.6666666666666666 - z) * ((y - x) * 6.0));
}
def code(x, y, z): return x + ((0.6666666666666666 - z) * ((y - x) * 6.0))
function code(x, y, z) return Float64(x + Float64(Float64(0.6666666666666666 - z) * Float64(Float64(y - x) * 6.0))) end
function tmp = code(x, y, z) tmp = x + ((0.6666666666666666 - z) * ((y - x) * 6.0)); end
code[x_, y_, z_] := N[(x + N[(N[(0.6666666666666666 - z), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(0.6666666666666666 - z\right) \cdot \left(\left(y - x\right) \cdot 6\right)
\end{array}
Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.6%
(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 50.8%
sub-neg50.8%
distribute-rgt-in50.8%
metadata-eval50.8%
distribute-lft-neg-in50.8%
associate-+r+50.8%
metadata-eval50.8%
distribute-rgt-neg-in50.8%
metadata-eval50.8%
Simplified50.8%
Taylor expanded in z around 0 25.6%
*-commutative25.6%
Simplified25.6%
herbie shell --seed 2024087
(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))))