
(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) (* 6.0 (- 0.6666666666666666 z)) x))
double code(double x, double y, double z) {
return fma((y - x), (6.0 * (0.6666666666666666 - z)), x);
}
function code(x, y, z) return fma(Float64(y - x), Float64(6.0 * Float64(0.6666666666666666 - z)), x) end
code[x_, y_, z_] := N[(N[(y - x), $MachinePrecision] * N[(6.0 * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y - x, 6 \cdot \left(0.6666666666666666 - z\right), x\right)
\end{array}
Initial program 99.6%
+-commutative99.6%
associate-*l*99.8%
fma-def99.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 -5.8e+213)
t_0
(if (<= z -0.5)
t_1
(if (<= z -8e-68)
(* x -3.0)
(if (<= z -2.25e-268)
(* y 4.0)
(if (<= z 7.2e-86)
(* x -3.0)
(if (<= z 1.02e-53)
(* y 4.0)
(if (<= z 0.5)
(* x -3.0)
(if (or (<= z 2.6e+106) (not (<= z 6.2e+204)))
t_1
t_0))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double t_1 = 6.0 * (x * z);
double tmp;
if (z <= -5.8e+213) {
tmp = t_0;
} else if (z <= -0.5) {
tmp = t_1;
} else if (z <= -8e-68) {
tmp = x * -3.0;
} else if (z <= -2.25e-268) {
tmp = y * 4.0;
} else if (z <= 7.2e-86) {
tmp = x * -3.0;
} else if (z <= 1.02e-53) {
tmp = y * 4.0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else if ((z <= 2.6e+106) || !(z <= 6.2e+204)) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (-6.0d0) * (y * z)
t_1 = 6.0d0 * (x * z)
if (z <= (-5.8d+213)) then
tmp = t_0
else if (z <= (-0.5d0)) then
tmp = t_1
else if (z <= (-8d-68)) then
tmp = x * (-3.0d0)
else if (z <= (-2.25d-268)) then
tmp = y * 4.0d0
else if (z <= 7.2d-86) then
tmp = x * (-3.0d0)
else if (z <= 1.02d-53) then
tmp = y * 4.0d0
else if (z <= 0.5d0) then
tmp = x * (-3.0d0)
else if ((z <= 2.6d+106) .or. (.not. (z <= 6.2d+204))) then
tmp = t_1
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double t_1 = 6.0 * (x * z);
double tmp;
if (z <= -5.8e+213) {
tmp = t_0;
} else if (z <= -0.5) {
tmp = t_1;
} else if (z <= -8e-68) {
tmp = x * -3.0;
} else if (z <= -2.25e-268) {
tmp = y * 4.0;
} else if (z <= 7.2e-86) {
tmp = x * -3.0;
} else if (z <= 1.02e-53) {
tmp = y * 4.0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else if ((z <= 2.6e+106) || !(z <= 6.2e+204)) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) t_1 = 6.0 * (x * z) tmp = 0 if z <= -5.8e+213: tmp = t_0 elif z <= -0.5: tmp = t_1 elif z <= -8e-68: tmp = x * -3.0 elif z <= -2.25e-268: tmp = y * 4.0 elif z <= 7.2e-86: tmp = x * -3.0 elif z <= 1.02e-53: tmp = y * 4.0 elif z <= 0.5: tmp = x * -3.0 elif (z <= 2.6e+106) or not (z <= 6.2e+204): tmp = t_1 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(y * z)) t_1 = Float64(6.0 * Float64(x * z)) tmp = 0.0 if (z <= -5.8e+213) tmp = t_0; elseif (z <= -0.5) tmp = t_1; elseif (z <= -8e-68) tmp = Float64(x * -3.0); elseif (z <= -2.25e-268) tmp = Float64(y * 4.0); elseif (z <= 7.2e-86) tmp = Float64(x * -3.0); elseif (z <= 1.02e-53) tmp = Float64(y * 4.0); elseif (z <= 0.5) tmp = Float64(x * -3.0); elseif ((z <= 2.6e+106) || !(z <= 6.2e+204)) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (y * z); t_1 = 6.0 * (x * z); tmp = 0.0; if (z <= -5.8e+213) tmp = t_0; elseif (z <= -0.5) tmp = t_1; elseif (z <= -8e-68) tmp = x * -3.0; elseif (z <= -2.25e-268) tmp = y * 4.0; elseif (z <= 7.2e-86) tmp = x * -3.0; elseif (z <= 1.02e-53) tmp = y * 4.0; elseif (z <= 0.5) tmp = x * -3.0; elseif ((z <= 2.6e+106) || ~((z <= 6.2e+204))) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.8e+213], t$95$0, If[LessEqual[z, -0.5], t$95$1, If[LessEqual[z, -8e-68], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -2.25e-268], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 7.2e-86], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.02e-53], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.5], N[(x * -3.0), $MachinePrecision], If[Or[LessEqual[z, 2.6e+106], N[Not[LessEqual[z, 6.2e+204]], $MachinePrecision]], t$95$1, t$95$0]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
t_1 := 6 \cdot \left(x \cdot z\right)\\
\mathbf{if}\;z \leq -5.8 \cdot 10^{+213}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -0.5:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-68}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -2.25 \cdot 10^{-268}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{-86}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{-53}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+106} \lor \neg \left(z \leq 6.2 \cdot 10^{+204}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -5.8000000000000006e213 or 2.6000000000000002e106 < z < 6.2000000000000003e204Initial program 99.8%
+-commutative99.8%
associate-*l*99.8%
fma-def99.8%
sub-neg99.8%
distribute-rgt-in99.8%
metadata-eval99.8%
metadata-eval99.8%
distribute-lft-neg-out99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 74.3%
Taylor expanded in z around inf 74.3%
*-commutative74.3%
Simplified74.3%
if -5.8000000000000006e213 < z < -0.5 or 0.5 < z < 2.6000000000000002e106 or 6.2000000000000003e204 < z Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 67.8%
sub-neg67.8%
distribute-rgt-in67.7%
metadata-eval67.7%
neg-mul-167.7%
associate-*r*67.7%
*-commutative67.7%
associate-+r+67.7%
metadata-eval67.7%
associate-*r*67.7%
metadata-eval67.7%
*-commutative67.7%
Simplified67.7%
distribute-lft-in67.7%
fma-def67.7%
Applied egg-rr67.7%
fma-udef67.7%
flip-+24.3%
pow224.3%
*-commutative24.3%
*-commutative24.3%
Applied egg-rr24.3%
swap-sqr24.3%
metadata-eval24.3%
*-commutative24.3%
distribute-lft-out--24.3%
*-commutative24.3%
Simplified24.3%
Taylor expanded in z around inf 65.7%
*-commutative65.7%
Simplified65.7%
if -0.5 < z < -8.00000000000000053e-68 or -2.2500000000000001e-268 < z < 7.19999999999999932e-86 or 1.02000000000000002e-53 < z < 0.5Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 65.7%
sub-neg65.7%
distribute-rgt-in65.7%
metadata-eval65.7%
neg-mul-165.7%
associate-*r*65.7%
*-commutative65.7%
associate-+r+65.7%
metadata-eval65.7%
associate-*r*65.7%
metadata-eval65.7%
*-commutative65.7%
Simplified65.7%
Taylor expanded in z around 0 63.0%
*-commutative63.0%
Simplified63.0%
if -8.00000000000000053e-68 < z < -2.2500000000000001e-268 or 7.19999999999999932e-86 < z < 1.02000000000000002e-53Initial program 99.6%
+-commutative99.6%
associate-*l*99.9%
fma-def99.9%
sub-neg99.9%
distribute-rgt-in99.9%
metadata-eval99.9%
metadata-eval99.9%
distribute-lft-neg-out99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 67.2%
Taylor expanded in z around 0 67.2%
*-commutative67.2%
Simplified67.2%
Final simplification66.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))) (t_1 (* 6.0 (* x z))))
(if (<= z -6e+213)
t_0
(if (<= z -0.5)
t_1
(if (<= z -1.3e-66)
(* x -3.0)
(if (<= z -1.45e-268)
(* y 4.0)
(if (<= z 1.04e-85)
(* x -3.0)
(if (<= z 2.5e-55)
(* y 4.0)
(if (<= z 0.5)
(* x -3.0)
(if (<= z 9.2e+99)
t_1
(if (<= z 4.5e+199) t_0 (* x (* 6.0 z)))))))))))))
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 <= -6e+213) {
tmp = t_0;
} else if (z <= -0.5) {
tmp = t_1;
} else if (z <= -1.3e-66) {
tmp = x * -3.0;
} else if (z <= -1.45e-268) {
tmp = y * 4.0;
} else if (z <= 1.04e-85) {
tmp = x * -3.0;
} else if (z <= 2.5e-55) {
tmp = y * 4.0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else if (z <= 9.2e+99) {
tmp = t_1;
} else if (z <= 4.5e+199) {
tmp = t_0;
} else {
tmp = x * (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) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (-6.0d0) * (y * z)
t_1 = 6.0d0 * (x * z)
if (z <= (-6d+213)) then
tmp = t_0
else if (z <= (-0.5d0)) then
tmp = t_1
else if (z <= (-1.3d-66)) then
tmp = x * (-3.0d0)
else if (z <= (-1.45d-268)) then
tmp = y * 4.0d0
else if (z <= 1.04d-85) then
tmp = x * (-3.0d0)
else if (z <= 2.5d-55) then
tmp = y * 4.0d0
else if (z <= 0.5d0) then
tmp = x * (-3.0d0)
else if (z <= 9.2d+99) then
tmp = t_1
else if (z <= 4.5d+199) then
tmp = t_0
else
tmp = x * (6.0d0 * z)
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 <= -6e+213) {
tmp = t_0;
} else if (z <= -0.5) {
tmp = t_1;
} else if (z <= -1.3e-66) {
tmp = x * -3.0;
} else if (z <= -1.45e-268) {
tmp = y * 4.0;
} else if (z <= 1.04e-85) {
tmp = x * -3.0;
} else if (z <= 2.5e-55) {
tmp = y * 4.0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else if (z <= 9.2e+99) {
tmp = t_1;
} else if (z <= 4.5e+199) {
tmp = t_0;
} else {
tmp = x * (6.0 * z);
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) t_1 = 6.0 * (x * z) tmp = 0 if z <= -6e+213: tmp = t_0 elif z <= -0.5: tmp = t_1 elif z <= -1.3e-66: tmp = x * -3.0 elif z <= -1.45e-268: tmp = y * 4.0 elif z <= 1.04e-85: tmp = x * -3.0 elif z <= 2.5e-55: tmp = y * 4.0 elif z <= 0.5: tmp = x * -3.0 elif z <= 9.2e+99: tmp = t_1 elif z <= 4.5e+199: tmp = t_0 else: tmp = x * (6.0 * z) 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 <= -6e+213) tmp = t_0; elseif (z <= -0.5) tmp = t_1; elseif (z <= -1.3e-66) tmp = Float64(x * -3.0); elseif (z <= -1.45e-268) tmp = Float64(y * 4.0); elseif (z <= 1.04e-85) tmp = Float64(x * -3.0); elseif (z <= 2.5e-55) tmp = Float64(y * 4.0); elseif (z <= 0.5) tmp = Float64(x * -3.0); elseif (z <= 9.2e+99) tmp = t_1; elseif (z <= 4.5e+199) tmp = t_0; else tmp = Float64(x * Float64(6.0 * z)); 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 <= -6e+213) tmp = t_0; elseif (z <= -0.5) tmp = t_1; elseif (z <= -1.3e-66) tmp = x * -3.0; elseif (z <= -1.45e-268) tmp = y * 4.0; elseif (z <= 1.04e-85) tmp = x * -3.0; elseif (z <= 2.5e-55) tmp = y * 4.0; elseif (z <= 0.5) tmp = x * -3.0; elseif (z <= 9.2e+99) tmp = t_1; elseif (z <= 4.5e+199) tmp = t_0; else tmp = x * (6.0 * z); 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, -6e+213], t$95$0, If[LessEqual[z, -0.5], t$95$1, If[LessEqual[z, -1.3e-66], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -1.45e-268], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.04e-85], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.5e-55], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.5], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 9.2e+99], t$95$1, If[LessEqual[z, 4.5e+199], t$95$0, N[(x * N[(6.0 * z), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\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 -6 \cdot 10^{+213}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -0.5:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{-66}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -1.45 \cdot 10^{-268}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.04 \cdot 10^{-85}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-55}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{+99}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+199}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(6 \cdot z\right)\\
\end{array}
\end{array}
if z < -6.0000000000000002e213 or 9.20000000000000077e99 < z < 4.4999999999999997e199Initial program 99.8%
+-commutative99.8%
associate-*l*99.8%
fma-def99.8%
sub-neg99.8%
distribute-rgt-in99.8%
metadata-eval99.8%
metadata-eval99.8%
distribute-lft-neg-out99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 74.3%
Taylor expanded in z around inf 74.3%
*-commutative74.3%
Simplified74.3%
if -6.0000000000000002e213 < z < -0.5 or 0.5 < z < 9.20000000000000077e99Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 68.8%
sub-neg68.8%
distribute-rgt-in68.8%
metadata-eval68.8%
neg-mul-168.8%
associate-*r*68.8%
*-commutative68.8%
associate-+r+68.8%
metadata-eval68.8%
associate-*r*68.8%
metadata-eval68.8%
*-commutative68.8%
Simplified68.8%
distribute-lft-in68.8%
fma-def68.8%
Applied egg-rr68.8%
fma-udef68.8%
flip-+27.5%
pow227.5%
*-commutative27.5%
*-commutative27.5%
Applied egg-rr27.5%
swap-sqr27.5%
metadata-eval27.5%
*-commutative27.5%
distribute-lft-out--27.5%
*-commutative27.5%
Simplified27.5%
Taylor expanded in z around inf 66.2%
*-commutative66.2%
Simplified66.2%
if -0.5 < z < -1.2999999999999999e-66 or -1.4500000000000001e-268 < z < 1.04e-85 or 2.5000000000000001e-55 < z < 0.5Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 65.7%
sub-neg65.7%
distribute-rgt-in65.7%
metadata-eval65.7%
neg-mul-165.7%
associate-*r*65.7%
*-commutative65.7%
associate-+r+65.7%
metadata-eval65.7%
associate-*r*65.7%
metadata-eval65.7%
*-commutative65.7%
Simplified65.7%
Taylor expanded in z around 0 63.0%
*-commutative63.0%
Simplified63.0%
if -1.2999999999999999e-66 < z < -1.4500000000000001e-268 or 1.04e-85 < z < 2.5000000000000001e-55Initial program 99.6%
+-commutative99.6%
associate-*l*99.9%
fma-def99.9%
sub-neg99.9%
distribute-rgt-in99.9%
metadata-eval99.9%
metadata-eval99.9%
distribute-lft-neg-out99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 67.2%
Taylor expanded in z around 0 67.2%
*-commutative67.2%
Simplified67.2%
if 4.4999999999999997e199 < z Initial program 99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 64.5%
sub-neg64.5%
distribute-rgt-in64.5%
metadata-eval64.5%
neg-mul-164.5%
associate-*r*64.5%
*-commutative64.5%
associate-+r+64.5%
metadata-eval64.5%
associate-*r*64.5%
metadata-eval64.5%
*-commutative64.5%
Simplified64.5%
Taylor expanded in z around inf 64.5%
Final simplification66.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 6.0 (* x z))))
(if (<= z -4.5e+213)
(* -6.0 (* y z))
(if (<= z -0.5)
t_0
(if (<= z -8.6e-70)
(* x -3.0)
(if (<= z -2.2e-268)
(* y 4.0)
(if (<= z 1.05e-87)
(* x -3.0)
(if (<= z 1.4e-56)
(* y 4.0)
(if (<= z 0.5)
(* x -3.0)
(if (<= z 2.8e+101)
t_0
(if (<= z 1.7e+199)
(* y (* z -6.0))
(* x (* 6.0 z)))))))))))))
double code(double x, double y, double z) {
double t_0 = 6.0 * (x * z);
double tmp;
if (z <= -4.5e+213) {
tmp = -6.0 * (y * z);
} else if (z <= -0.5) {
tmp = t_0;
} else if (z <= -8.6e-70) {
tmp = x * -3.0;
} else if (z <= -2.2e-268) {
tmp = y * 4.0;
} else if (z <= 1.05e-87) {
tmp = x * -3.0;
} else if (z <= 1.4e-56) {
tmp = y * 4.0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else if (z <= 2.8e+101) {
tmp = t_0;
} else if (z <= 1.7e+199) {
tmp = y * (z * -6.0);
} else {
tmp = x * (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) :: t_0
real(8) :: tmp
t_0 = 6.0d0 * (x * z)
if (z <= (-4.5d+213)) then
tmp = (-6.0d0) * (y * z)
else if (z <= (-0.5d0)) then
tmp = t_0
else if (z <= (-8.6d-70)) then
tmp = x * (-3.0d0)
else if (z <= (-2.2d-268)) then
tmp = y * 4.0d0
else if (z <= 1.05d-87) then
tmp = x * (-3.0d0)
else if (z <= 1.4d-56) then
tmp = y * 4.0d0
else if (z <= 0.5d0) then
tmp = x * (-3.0d0)
else if (z <= 2.8d+101) then
tmp = t_0
else if (z <= 1.7d+199) then
tmp = y * (z * (-6.0d0))
else
tmp = x * (6.0d0 * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 6.0 * (x * z);
double tmp;
if (z <= -4.5e+213) {
tmp = -6.0 * (y * z);
} else if (z <= -0.5) {
tmp = t_0;
} else if (z <= -8.6e-70) {
tmp = x * -3.0;
} else if (z <= -2.2e-268) {
tmp = y * 4.0;
} else if (z <= 1.05e-87) {
tmp = x * -3.0;
} else if (z <= 1.4e-56) {
tmp = y * 4.0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else if (z <= 2.8e+101) {
tmp = t_0;
} else if (z <= 1.7e+199) {
tmp = y * (z * -6.0);
} else {
tmp = x * (6.0 * z);
}
return tmp;
}
def code(x, y, z): t_0 = 6.0 * (x * z) tmp = 0 if z <= -4.5e+213: tmp = -6.0 * (y * z) elif z <= -0.5: tmp = t_0 elif z <= -8.6e-70: tmp = x * -3.0 elif z <= -2.2e-268: tmp = y * 4.0 elif z <= 1.05e-87: tmp = x * -3.0 elif z <= 1.4e-56: tmp = y * 4.0 elif z <= 0.5: tmp = x * -3.0 elif z <= 2.8e+101: tmp = t_0 elif z <= 1.7e+199: tmp = y * (z * -6.0) else: tmp = x * (6.0 * z) return tmp
function code(x, y, z) t_0 = Float64(6.0 * Float64(x * z)) tmp = 0.0 if (z <= -4.5e+213) tmp = Float64(-6.0 * Float64(y * z)); elseif (z <= -0.5) tmp = t_0; elseif (z <= -8.6e-70) tmp = Float64(x * -3.0); elseif (z <= -2.2e-268) tmp = Float64(y * 4.0); elseif (z <= 1.05e-87) tmp = Float64(x * -3.0); elseif (z <= 1.4e-56) tmp = Float64(y * 4.0); elseif (z <= 0.5) tmp = Float64(x * -3.0); elseif (z <= 2.8e+101) tmp = t_0; elseif (z <= 1.7e+199) tmp = Float64(y * Float64(z * -6.0)); else tmp = Float64(x * Float64(6.0 * z)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 6.0 * (x * z); tmp = 0.0; if (z <= -4.5e+213) tmp = -6.0 * (y * z); elseif (z <= -0.5) tmp = t_0; elseif (z <= -8.6e-70) tmp = x * -3.0; elseif (z <= -2.2e-268) tmp = y * 4.0; elseif (z <= 1.05e-87) tmp = x * -3.0; elseif (z <= 1.4e-56) tmp = y * 4.0; elseif (z <= 0.5) tmp = x * -3.0; elseif (z <= 2.8e+101) tmp = t_0; elseif (z <= 1.7e+199) tmp = y * (z * -6.0); else tmp = x * (6.0 * z); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.5e+213], N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -0.5], t$95$0, If[LessEqual[z, -8.6e-70], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -2.2e-268], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.05e-87], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.4e-56], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.5], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.8e+101], t$95$0, If[LessEqual[z, 1.7e+199], N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(6.0 * z), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(x \cdot z\right)\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{+213}:\\
\;\;\;\;-6 \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;z \leq -0.5:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -8.6 \cdot 10^{-70}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{-268}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-87}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-56}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+101}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{+199}:\\
\;\;\;\;y \cdot \left(z \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(6 \cdot z\right)\\
\end{array}
\end{array}
if z < -4.5000000000000002e213Initial program 99.9%
+-commutative99.9%
associate-*l*99.8%
fma-def99.8%
sub-neg99.8%
distribute-rgt-in99.8%
metadata-eval99.8%
metadata-eval99.8%
distribute-lft-neg-out99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 71.6%
Taylor expanded in z around inf 71.6%
*-commutative71.6%
Simplified71.6%
if -4.5000000000000002e213 < z < -0.5 or 0.5 < z < 2.79999999999999981e101Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 68.8%
sub-neg68.8%
distribute-rgt-in68.8%
metadata-eval68.8%
neg-mul-168.8%
associate-*r*68.8%
*-commutative68.8%
associate-+r+68.8%
metadata-eval68.8%
associate-*r*68.8%
metadata-eval68.8%
*-commutative68.8%
Simplified68.8%
distribute-lft-in68.8%
fma-def68.8%
Applied egg-rr68.8%
fma-udef68.8%
flip-+27.5%
pow227.5%
*-commutative27.5%
*-commutative27.5%
Applied egg-rr27.5%
swap-sqr27.5%
metadata-eval27.5%
*-commutative27.5%
distribute-lft-out--27.5%
*-commutative27.5%
Simplified27.5%
Taylor expanded in z around inf 66.2%
*-commutative66.2%
Simplified66.2%
if -0.5 < z < -8.6e-70 or -2.20000000000000004e-268 < z < 1.05000000000000004e-87 or 1.39999999999999997e-56 < z < 0.5Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 65.7%
sub-neg65.7%
distribute-rgt-in65.7%
metadata-eval65.7%
neg-mul-165.7%
associate-*r*65.7%
*-commutative65.7%
associate-+r+65.7%
metadata-eval65.7%
associate-*r*65.7%
metadata-eval65.7%
*-commutative65.7%
Simplified65.7%
Taylor expanded in z around 0 63.0%
*-commutative63.0%
Simplified63.0%
if -8.6e-70 < z < -2.20000000000000004e-268 or 1.05000000000000004e-87 < z < 1.39999999999999997e-56Initial program 99.6%
+-commutative99.6%
associate-*l*99.9%
fma-def99.9%
sub-neg99.9%
distribute-rgt-in99.9%
metadata-eval99.9%
metadata-eval99.9%
distribute-lft-neg-out99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 67.2%
Taylor expanded in z around 0 67.2%
*-commutative67.2%
Simplified67.2%
if 2.79999999999999981e101 < z < 1.7e199Initial program 99.8%
+-commutative99.8%
associate-*l*99.8%
fma-def99.8%
sub-neg99.8%
distribute-rgt-in99.8%
metadata-eval99.8%
metadata-eval99.8%
distribute-lft-neg-out99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 79.0%
Taylor expanded in z around inf 79.0%
if 1.7e199 < z Initial program 99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 64.5%
sub-neg64.5%
distribute-rgt-in64.5%
metadata-eval64.5%
neg-mul-164.5%
associate-*r*64.5%
*-commutative64.5%
associate-+r+64.5%
metadata-eval64.5%
associate-*r*64.5%
metadata-eval64.5%
*-commutative64.5%
Simplified64.5%
Taylor expanded in z around inf 64.5%
Final simplification66.4%
(FPCore (x y z)
:precision binary64
(if (<= z -5e+213)
(* -6.0 (* y z))
(if (<= z -0.5)
(* 6.0 (* x z))
(if (<= z -1.08e-69)
(* x -3.0)
(if (<= z -2.8e-268)
(* y 4.0)
(if (<= z 9.8e-87)
(* x -3.0)
(if (<= z 2.9e-56)
(* y 4.0)
(if (<= z 0.5)
(* x -3.0)
(if (<= z 1.05e+99)
(* z (* x 6.0))
(if (<= z 1.25e+202)
(* y (* z -6.0))
(* x (* 6.0 z))))))))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5e+213) {
tmp = -6.0 * (y * z);
} else if (z <= -0.5) {
tmp = 6.0 * (x * z);
} else if (z <= -1.08e-69) {
tmp = x * -3.0;
} else if (z <= -2.8e-268) {
tmp = y * 4.0;
} else if (z <= 9.8e-87) {
tmp = x * -3.0;
} else if (z <= 2.9e-56) {
tmp = y * 4.0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else if (z <= 1.05e+99) {
tmp = z * (x * 6.0);
} else if (z <= 1.25e+202) {
tmp = y * (z * -6.0);
} else {
tmp = x * (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 <= (-5d+213)) then
tmp = (-6.0d0) * (y * z)
else if (z <= (-0.5d0)) then
tmp = 6.0d0 * (x * z)
else if (z <= (-1.08d-69)) then
tmp = x * (-3.0d0)
else if (z <= (-2.8d-268)) then
tmp = y * 4.0d0
else if (z <= 9.8d-87) then
tmp = x * (-3.0d0)
else if (z <= 2.9d-56) then
tmp = y * 4.0d0
else if (z <= 0.5d0) then
tmp = x * (-3.0d0)
else if (z <= 1.05d+99) then
tmp = z * (x * 6.0d0)
else if (z <= 1.25d+202) then
tmp = y * (z * (-6.0d0))
else
tmp = x * (6.0d0 * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -5e+213) {
tmp = -6.0 * (y * z);
} else if (z <= -0.5) {
tmp = 6.0 * (x * z);
} else if (z <= -1.08e-69) {
tmp = x * -3.0;
} else if (z <= -2.8e-268) {
tmp = y * 4.0;
} else if (z <= 9.8e-87) {
tmp = x * -3.0;
} else if (z <= 2.9e-56) {
tmp = y * 4.0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else if (z <= 1.05e+99) {
tmp = z * (x * 6.0);
} else if (z <= 1.25e+202) {
tmp = y * (z * -6.0);
} else {
tmp = x * (6.0 * z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5e+213: tmp = -6.0 * (y * z) elif z <= -0.5: tmp = 6.0 * (x * z) elif z <= -1.08e-69: tmp = x * -3.0 elif z <= -2.8e-268: tmp = y * 4.0 elif z <= 9.8e-87: tmp = x * -3.0 elif z <= 2.9e-56: tmp = y * 4.0 elif z <= 0.5: tmp = x * -3.0 elif z <= 1.05e+99: tmp = z * (x * 6.0) elif z <= 1.25e+202: tmp = y * (z * -6.0) else: tmp = x * (6.0 * z) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5e+213) tmp = Float64(-6.0 * Float64(y * z)); elseif (z <= -0.5) tmp = Float64(6.0 * Float64(x * z)); elseif (z <= -1.08e-69) tmp = Float64(x * -3.0); elseif (z <= -2.8e-268) tmp = Float64(y * 4.0); elseif (z <= 9.8e-87) tmp = Float64(x * -3.0); elseif (z <= 2.9e-56) tmp = Float64(y * 4.0); elseif (z <= 0.5) tmp = Float64(x * -3.0); elseif (z <= 1.05e+99) tmp = Float64(z * Float64(x * 6.0)); elseif (z <= 1.25e+202) tmp = Float64(y * Float64(z * -6.0)); else tmp = Float64(x * Float64(6.0 * z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5e+213) tmp = -6.0 * (y * z); elseif (z <= -0.5) tmp = 6.0 * (x * z); elseif (z <= -1.08e-69) tmp = x * -3.0; elseif (z <= -2.8e-268) tmp = y * 4.0; elseif (z <= 9.8e-87) tmp = x * -3.0; elseif (z <= 2.9e-56) tmp = y * 4.0; elseif (z <= 0.5) tmp = x * -3.0; elseif (z <= 1.05e+99) tmp = z * (x * 6.0); elseif (z <= 1.25e+202) tmp = y * (z * -6.0); else tmp = x * (6.0 * z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5e+213], N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -0.5], N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.08e-69], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -2.8e-268], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 9.8e-87], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.9e-56], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.5], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.05e+99], N[(z * N[(x * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.25e+202], N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(6.0 * z), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+213}:\\
\;\;\;\;-6 \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;z \leq -0.5:\\
\;\;\;\;6 \cdot \left(x \cdot z\right)\\
\mathbf{elif}\;z \leq -1.08 \cdot 10^{-69}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{-268}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 9.8 \cdot 10^{-87}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-56}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+99}:\\
\;\;\;\;z \cdot \left(x \cdot 6\right)\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+202}:\\
\;\;\;\;y \cdot \left(z \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(6 \cdot z\right)\\
\end{array}
\end{array}
if z < -4.9999999999999998e213Initial program 99.9%
+-commutative99.9%
associate-*l*99.8%
fma-def99.8%
sub-neg99.8%
distribute-rgt-in99.8%
metadata-eval99.8%
metadata-eval99.8%
distribute-lft-neg-out99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 71.6%
Taylor expanded in z around inf 71.6%
*-commutative71.6%
Simplified71.6%
if -4.9999999999999998e213 < z < -0.5Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 68.6%
sub-neg68.6%
distribute-rgt-in68.6%
metadata-eval68.6%
neg-mul-168.6%
associate-*r*68.6%
*-commutative68.6%
associate-+r+68.6%
metadata-eval68.6%
associate-*r*68.6%
metadata-eval68.6%
*-commutative68.6%
Simplified68.6%
distribute-lft-in68.6%
fma-def68.6%
Applied egg-rr68.6%
fma-udef68.6%
flip-+22.6%
pow222.6%
*-commutative22.6%
*-commutative22.6%
Applied egg-rr22.6%
swap-sqr22.6%
metadata-eval22.6%
*-commutative22.6%
distribute-lft-out--22.6%
*-commutative22.6%
Simplified22.6%
Taylor expanded in z around inf 67.0%
*-commutative67.0%
Simplified67.0%
if -0.5 < z < -1.0800000000000001e-69 or -2.80000000000000015e-268 < z < 9.7999999999999994e-87 or 2.89999999999999991e-56 < z < 0.5Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 65.7%
sub-neg65.7%
distribute-rgt-in65.7%
metadata-eval65.7%
neg-mul-165.7%
associate-*r*65.7%
*-commutative65.7%
associate-+r+65.7%
metadata-eval65.7%
associate-*r*65.7%
metadata-eval65.7%
*-commutative65.7%
Simplified65.7%
Taylor expanded in z around 0 63.0%
*-commutative63.0%
Simplified63.0%
if -1.0800000000000001e-69 < z < -2.80000000000000015e-268 or 9.7999999999999994e-87 < z < 2.89999999999999991e-56Initial program 99.6%
+-commutative99.6%
associate-*l*99.9%
fma-def99.9%
sub-neg99.9%
distribute-rgt-in99.9%
metadata-eval99.9%
metadata-eval99.9%
distribute-lft-neg-out99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 67.2%
Taylor expanded in z around 0 67.2%
*-commutative67.2%
Simplified67.2%
if 0.5 < z < 1.05000000000000005e99Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 69.4%
sub-neg69.4%
distribute-rgt-in69.4%
metadata-eval69.4%
neg-mul-169.4%
associate-*r*69.4%
*-commutative69.4%
associate-+r+69.4%
metadata-eval69.4%
associate-*r*69.4%
metadata-eval69.4%
*-commutative69.4%
Simplified69.4%
distribute-lft-in69.4%
fma-def69.4%
Applied egg-rr69.4%
fma-udef69.4%
flip-+37.4%
pow237.4%
*-commutative37.4%
*-commutative37.4%
Applied egg-rr37.4%
swap-sqr37.4%
metadata-eval37.4%
*-commutative37.4%
distribute-lft-out--37.3%
*-commutative37.3%
Simplified37.3%
Taylor expanded in z around inf 64.5%
*-commutative64.5%
associate-*r*64.5%
*-commutative64.5%
associate-*l*64.5%
Simplified64.5%
if 1.05000000000000005e99 < z < 1.25e202Initial program 99.8%
+-commutative99.8%
associate-*l*99.8%
fma-def99.8%
sub-neg99.8%
distribute-rgt-in99.8%
metadata-eval99.8%
metadata-eval99.8%
distribute-lft-neg-out99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 79.0%
Taylor expanded in z around inf 79.0%
if 1.25e202 < z Initial program 99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 64.5%
sub-neg64.5%
distribute-rgt-in64.5%
metadata-eval64.5%
neg-mul-164.5%
associate-*r*64.5%
*-commutative64.5%
associate-+r+64.5%
metadata-eval64.5%
associate-*r*64.5%
metadata-eval64.5%
*-commutative64.5%
Simplified64.5%
Taylor expanded in z around inf 64.5%
Final simplification66.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* (- y x) z))))
(if (<= z -0.011)
t_0
(if (<= z -1.8e-69)
(* x -3.0)
(if (<= z -2.4e-268)
(* y 4.0)
(if (<= z 1.25e-86)
(* x -3.0)
(if (<= z 5.4e-56) (* y 4.0) (if (<= z 0.5) (* x -3.0) t_0))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -0.011) {
tmp = t_0;
} else if (z <= -1.8e-69) {
tmp = x * -3.0;
} else if (z <= -2.4e-268) {
tmp = y * 4.0;
} else if (z <= 1.25e-86) {
tmp = x * -3.0;
} else if (z <= 5.4e-56) {
tmp = y * 4.0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (-6.0d0) * ((y - x) * z)
if (z <= (-0.011d0)) then
tmp = t_0
else if (z <= (-1.8d-69)) then
tmp = x * (-3.0d0)
else if (z <= (-2.4d-268)) then
tmp = y * 4.0d0
else if (z <= 1.25d-86) then
tmp = x * (-3.0d0)
else if (z <= 5.4d-56) then
tmp = y * 4.0d0
else if (z <= 0.5d0) then
tmp = x * (-3.0d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -0.011) {
tmp = t_0;
} else if (z <= -1.8e-69) {
tmp = x * -3.0;
} else if (z <= -2.4e-268) {
tmp = y * 4.0;
} else if (z <= 1.25e-86) {
tmp = x * -3.0;
} else if (z <= 5.4e-56) {
tmp = y * 4.0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * ((y - x) * z) tmp = 0 if z <= -0.011: tmp = t_0 elif z <= -1.8e-69: tmp = x * -3.0 elif z <= -2.4e-268: tmp = y * 4.0 elif z <= 1.25e-86: tmp = x * -3.0 elif z <= 5.4e-56: tmp = y * 4.0 elif z <= 0.5: tmp = x * -3.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(Float64(y - x) * z)) tmp = 0.0 if (z <= -0.011) tmp = t_0; elseif (z <= -1.8e-69) tmp = Float64(x * -3.0); elseif (z <= -2.4e-268) tmp = Float64(y * 4.0); elseif (z <= 1.25e-86) tmp = Float64(x * -3.0); elseif (z <= 5.4e-56) tmp = Float64(y * 4.0); elseif (z <= 0.5) tmp = Float64(x * -3.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * ((y - x) * z); tmp = 0.0; if (z <= -0.011) tmp = t_0; elseif (z <= -1.8e-69) tmp = x * -3.0; elseif (z <= -2.4e-268) tmp = y * 4.0; elseif (z <= 1.25e-86) tmp = x * -3.0; elseif (z <= 5.4e-56) tmp = y * 4.0; elseif (z <= 0.5) tmp = x * -3.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.011], t$95$0, If[LessEqual[z, -1.8e-69], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -2.4e-268], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.25e-86], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 5.4e-56], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.5], N[(x * -3.0), $MachinePrecision], t$95$0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{if}\;z \leq -0.011:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{-69}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -2.4 \cdot 10^{-268}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-86}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{-56}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -0.010999999999999999 or 0.5 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 97.7%
if -0.010999999999999999 < z < -1.80000000000000009e-69 or -2.3999999999999999e-268 < z < 1.25e-86 or 5.3999999999999999e-56 < z < 0.5Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 65.7%
sub-neg65.7%
distribute-rgt-in65.7%
metadata-eval65.7%
neg-mul-165.7%
associate-*r*65.7%
*-commutative65.7%
associate-+r+65.7%
metadata-eval65.7%
associate-*r*65.7%
metadata-eval65.7%
*-commutative65.7%
Simplified65.7%
Taylor expanded in z around 0 63.0%
*-commutative63.0%
Simplified63.0%
if -1.80000000000000009e-69 < z < -2.3999999999999999e-268 or 1.25e-86 < z < 5.3999999999999999e-56Initial program 99.6%
+-commutative99.6%
associate-*l*99.9%
fma-def99.9%
sub-neg99.9%
distribute-rgt-in99.9%
metadata-eval99.9%
metadata-eval99.9%
distribute-lft-neg-out99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 67.2%
Taylor expanded in z around 0 67.2%
*-commutative67.2%
Simplified67.2%
Final simplification80.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ -3.0 (* 6.0 z)))) (t_1 (* -6.0 (* (- y x) z))))
(if (<= z -54000.0)
t_1
(if (<= z -4.2e-69)
t_0
(if (<= z -2.5e-268)
(* y 4.0)
(if (<= z 7.8e-88)
(* x -3.0)
(if (<= z 1.7e-56) (* y 4.0) (if (<= z 1450000000.0) t_0 t_1))))))))
double code(double x, double y, double z) {
double t_0 = x * (-3.0 + (6.0 * z));
double t_1 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -54000.0) {
tmp = t_1;
} else if (z <= -4.2e-69) {
tmp = t_0;
} else if (z <= -2.5e-268) {
tmp = y * 4.0;
} else if (z <= 7.8e-88) {
tmp = x * -3.0;
} else if (z <= 1.7e-56) {
tmp = y * 4.0;
} else if (z <= 1450000000.0) {
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) + (6.0d0 * z))
t_1 = (-6.0d0) * ((y - x) * z)
if (z <= (-54000.0d0)) then
tmp = t_1
else if (z <= (-4.2d-69)) then
tmp = t_0
else if (z <= (-2.5d-268)) then
tmp = y * 4.0d0
else if (z <= 7.8d-88) then
tmp = x * (-3.0d0)
else if (z <= 1.7d-56) then
tmp = y * 4.0d0
else if (z <= 1450000000.0d0) 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 + (6.0 * z));
double t_1 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -54000.0) {
tmp = t_1;
} else if (z <= -4.2e-69) {
tmp = t_0;
} else if (z <= -2.5e-268) {
tmp = y * 4.0;
} else if (z <= 7.8e-88) {
tmp = x * -3.0;
} else if (z <= 1.7e-56) {
tmp = y * 4.0;
} else if (z <= 1450000000.0) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = x * (-3.0 + (6.0 * z)) t_1 = -6.0 * ((y - x) * z) tmp = 0 if z <= -54000.0: tmp = t_1 elif z <= -4.2e-69: tmp = t_0 elif z <= -2.5e-268: tmp = y * 4.0 elif z <= 7.8e-88: tmp = x * -3.0 elif z <= 1.7e-56: tmp = y * 4.0 elif z <= 1450000000.0: tmp = t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(x * Float64(-3.0 + Float64(6.0 * z))) t_1 = Float64(-6.0 * Float64(Float64(y - x) * z)) tmp = 0.0 if (z <= -54000.0) tmp = t_1; elseif (z <= -4.2e-69) tmp = t_0; elseif (z <= -2.5e-268) tmp = Float64(y * 4.0); elseif (z <= 7.8e-88) tmp = Float64(x * -3.0); elseif (z <= 1.7e-56) tmp = Float64(y * 4.0); elseif (z <= 1450000000.0) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (-3.0 + (6.0 * z)); t_1 = -6.0 * ((y - x) * z); tmp = 0.0; if (z <= -54000.0) tmp = t_1; elseif (z <= -4.2e-69) tmp = t_0; elseif (z <= -2.5e-268) tmp = y * 4.0; elseif (z <= 7.8e-88) tmp = x * -3.0; elseif (z <= 1.7e-56) tmp = y * 4.0; elseif (z <= 1450000000.0) 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[(6.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -54000.0], t$95$1, If[LessEqual[z, -4.2e-69], t$95$0, If[LessEqual[z, -2.5e-268], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 7.8e-88], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.7e-56], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1450000000.0], t$95$0, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(-3 + 6 \cdot z\right)\\
t_1 := -6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{if}\;z \leq -54000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4.2 \cdot 10^{-69}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{-268}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{-88}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-56}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1450000000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -54000 or 1.45e9 < 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.1%
if -54000 < z < -4.1999999999999999e-69 or 1.69999999999999991e-56 < z < 1.45e9Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 85.1%
sub-neg85.1%
distribute-rgt-in85.1%
metadata-eval85.1%
neg-mul-185.1%
associate-*r*85.1%
*-commutative85.1%
associate-+r+85.1%
metadata-eval85.1%
associate-*r*85.1%
metadata-eval85.1%
*-commutative85.1%
Simplified85.1%
if -4.1999999999999999e-69 < z < -2.5e-268 or 7.79999999999999985e-88 < z < 1.69999999999999991e-56Initial program 99.6%
+-commutative99.6%
associate-*l*99.9%
fma-def99.9%
sub-neg99.9%
distribute-rgt-in99.9%
metadata-eval99.9%
metadata-eval99.9%
distribute-lft-neg-out99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 67.2%
Taylor expanded in z around 0 67.2%
*-commutative67.2%
Simplified67.2%
if -2.5e-268 < z < 7.79999999999999985e-88Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 60.1%
sub-neg60.1%
distribute-rgt-in60.1%
metadata-eval60.1%
neg-mul-160.1%
associate-*r*60.1%
*-commutative60.1%
associate-+r+60.1%
metadata-eval60.1%
associate-*r*60.1%
metadata-eval60.1%
*-commutative60.1%
Simplified60.1%
Taylor expanded in z around 0 60.1%
*-commutative60.1%
Simplified60.1%
Final simplification82.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))))
(if (<= z -110.0)
t_0
(if (<= z -1.55e-67)
(* x -3.0)
(if (<= z -1.7e-268)
(* y 4.0)
(if (<= z 2.7e-86)
(* x -3.0)
(if (<= z 2e-56) (* y 4.0) (if (<= z 0.64) (* x -3.0) t_0))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double tmp;
if (z <= -110.0) {
tmp = t_0;
} else if (z <= -1.55e-67) {
tmp = x * -3.0;
} else if (z <= -1.7e-268) {
tmp = y * 4.0;
} else if (z <= 2.7e-86) {
tmp = x * -3.0;
} else if (z <= 2e-56) {
tmp = y * 4.0;
} else if (z <= 0.64) {
tmp = x * -3.0;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (-6.0d0) * (y * z)
if (z <= (-110.0d0)) then
tmp = t_0
else if (z <= (-1.55d-67)) then
tmp = x * (-3.0d0)
else if (z <= (-1.7d-268)) then
tmp = y * 4.0d0
else if (z <= 2.7d-86) then
tmp = x * (-3.0d0)
else if (z <= 2d-56) then
tmp = y * 4.0d0
else if (z <= 0.64d0) then
tmp = x * (-3.0d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double tmp;
if (z <= -110.0) {
tmp = t_0;
} else if (z <= -1.55e-67) {
tmp = x * -3.0;
} else if (z <= -1.7e-268) {
tmp = y * 4.0;
} else if (z <= 2.7e-86) {
tmp = x * -3.0;
} else if (z <= 2e-56) {
tmp = y * 4.0;
} else if (z <= 0.64) {
tmp = x * -3.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) tmp = 0 if z <= -110.0: tmp = t_0 elif z <= -1.55e-67: tmp = x * -3.0 elif z <= -1.7e-268: tmp = y * 4.0 elif z <= 2.7e-86: tmp = x * -3.0 elif z <= 2e-56: tmp = y * 4.0 elif z <= 0.64: tmp = x * -3.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(y * z)) tmp = 0.0 if (z <= -110.0) tmp = t_0; elseif (z <= -1.55e-67) tmp = Float64(x * -3.0); elseif (z <= -1.7e-268) tmp = Float64(y * 4.0); elseif (z <= 2.7e-86) tmp = Float64(x * -3.0); elseif (z <= 2e-56) tmp = Float64(y * 4.0); elseif (z <= 0.64) tmp = Float64(x * -3.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (y * z); tmp = 0.0; if (z <= -110.0) tmp = t_0; elseif (z <= -1.55e-67) tmp = x * -3.0; elseif (z <= -1.7e-268) tmp = y * 4.0; elseif (z <= 2.7e-86) tmp = x * -3.0; elseif (z <= 2e-56) tmp = y * 4.0; elseif (z <= 0.64) tmp = x * -3.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -110.0], t$95$0, If[LessEqual[z, -1.55e-67], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, -1.7e-268], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.7e-86], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2e-56], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.64], N[(x * -3.0), $MachinePrecision], t$95$0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -110:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{-67}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-268}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-86}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-56}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.64:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -110 or 0.640000000000000013 < z Initial program 99.7%
+-commutative99.7%
associate-*l*99.7%
fma-def99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 47.3%
Taylor expanded in z around inf 46.7%
*-commutative46.7%
Simplified46.7%
if -110 < z < -1.5500000000000001e-67 or -1.7e-268 < z < 2.69999999999999992e-86 or 2.0000000000000001e-56 < z < 0.640000000000000013Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 66.1%
sub-neg66.1%
distribute-rgt-in66.1%
metadata-eval66.1%
neg-mul-166.1%
associate-*r*66.1%
*-commutative66.1%
associate-+r+66.1%
metadata-eval66.1%
associate-*r*66.1%
metadata-eval66.1%
*-commutative66.1%
Simplified66.1%
Taylor expanded in z around 0 62.5%
*-commutative62.5%
Simplified62.5%
if -1.5500000000000001e-67 < z < -1.7e-268 or 2.69999999999999992e-86 < z < 2.0000000000000001e-56Initial program 99.6%
+-commutative99.6%
associate-*l*99.9%
fma-def99.9%
sub-neg99.9%
distribute-rgt-in99.9%
metadata-eval99.9%
metadata-eval99.9%
distribute-lft-neg-out99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 67.2%
Taylor expanded in z around 0 67.2%
*-commutative67.2%
Simplified67.2%
Final simplification55.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.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around 0 99.8%
Final simplification99.8%
(FPCore (x y z) :precision binary64 (+ x (* (- 0.6666666666666666 z) (+ (* x -6.0) (* y 6.0)))))
double code(double x, double y, double z) {
return x + ((0.6666666666666666 - z) * ((x * -6.0) + (y * 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) * ((x * (-6.0d0)) + (y * 6.0d0)))
end function
public static double code(double x, double y, double z) {
return x + ((0.6666666666666666 - z) * ((x * -6.0) + (y * 6.0)));
}
def code(x, y, z): return x + ((0.6666666666666666 - z) * ((x * -6.0) + (y * 6.0)))
function code(x, y, z) return Float64(x + Float64(Float64(0.6666666666666666 - z) * Float64(Float64(x * -6.0) + Float64(y * 6.0)))) end
function tmp = code(x, y, z) tmp = x + ((0.6666666666666666 - z) * ((x * -6.0) + (y * 6.0))); end
code[x_, y_, z_] := N[(x + N[(N[(0.6666666666666666 - z), $MachinePrecision] * N[(N[(x * -6.0), $MachinePrecision] + N[(y * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(0.6666666666666666 - z\right) \cdot \left(x \cdot -6 + y \cdot 6\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 (if (or (<= x -3e-73) (not (<= x 10500000000000.0))) (* x (+ -3.0 (* 6.0 z))) (* y (+ 4.0 (* z -6.0)))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -3e-73) || !(x <= 10500000000000.0)) {
tmp = x * (-3.0 + (6.0 * z));
} else {
tmp = y * (4.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 ((x <= (-3d-73)) .or. (.not. (x <= 10500000000000.0d0))) then
tmp = x * ((-3.0d0) + (6.0d0 * z))
else
tmp = y * (4.0d0 + (z * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -3e-73) || !(x <= 10500000000000.0)) {
tmp = x * (-3.0 + (6.0 * z));
} else {
tmp = y * (4.0 + (z * -6.0));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -3e-73) or not (x <= 10500000000000.0): tmp = x * (-3.0 + (6.0 * z)) else: tmp = y * (4.0 + (z * -6.0)) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -3e-73) || !(x <= 10500000000000.0)) tmp = Float64(x * Float64(-3.0 + Float64(6.0 * z))); else tmp = Float64(y * Float64(4.0 + Float64(z * -6.0))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -3e-73) || ~((x <= 10500000000000.0))) tmp = x * (-3.0 + (6.0 * z)); else tmp = y * (4.0 + (z * -6.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -3e-73], N[Not[LessEqual[x, 10500000000000.0]], $MachinePrecision]], N[(x * N[(-3.0 + N[(6.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(4.0 + N[(z * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3 \cdot 10^{-73} \lor \neg \left(x \leq 10500000000000\right):\\
\;\;\;\;x \cdot \left(-3 + 6 \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(4 + z \cdot -6\right)\\
\end{array}
\end{array}
if x < -3e-73 or 1.05e13 < x Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 77.0%
sub-neg77.0%
distribute-rgt-in77.0%
metadata-eval77.0%
neg-mul-177.0%
associate-*r*77.0%
*-commutative77.0%
associate-+r+77.0%
metadata-eval77.0%
associate-*r*77.0%
metadata-eval77.0%
*-commutative77.0%
Simplified77.0%
if -3e-73 < x < 1.05e13Initial program 99.6%
+-commutative99.6%
associate-*l*99.8%
fma-def99.9%
sub-neg99.9%
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.5%
Final simplification78.0%
(FPCore (x y z) :precision binary64 (if (<= z -0.52) (* -6.0 (* (- y x) z)) (if (<= z 0.5) (+ x (* (- y x) 4.0)) (* z (* (- y x) -6.0)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.52) {
tmp = -6.0 * ((y - x) * z);
} else if (z <= 0.5) {
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.52d0)) then
tmp = (-6.0d0) * ((y - x) * z)
else if (z <= 0.5d0) 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.52) {
tmp = -6.0 * ((y - x) * z);
} else if (z <= 0.5) {
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.52: tmp = -6.0 * ((y - x) * z) elif z <= 0.5: 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.52) tmp = Float64(-6.0 * Float64(Float64(y - x) * z)); elseif (z <= 0.5) 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.52) tmp = -6.0 * ((y - x) * z); elseif (z <= 0.5) 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.52], N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.5], 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.52:\\
\;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;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.52000000000000002Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 97.5%
if -0.52000000000000002 < z < 0.5Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in z around 0 97.6%
if 0.5 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 97.8%
associate-*r*97.8%
*-commutative97.8%
associate-*l*97.9%
Simplified97.9%
Final simplification97.7%
(FPCore (x y z) :precision binary64 (if (<= z -0.56) (* -6.0 (* (- y x) z)) (if (<= z 0.65) (+ (* y 4.0) (* x -3.0)) (* z (* (- y x) -6.0)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.56) {
tmp = -6.0 * ((y - x) * z);
} else if (z <= 0.65) {
tmp = (y * 4.0) + (x * -3.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.56d0)) then
tmp = (-6.0d0) * ((y - x) * z)
else if (z <= 0.65d0) then
tmp = (y * 4.0d0) + (x * (-3.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.56) {
tmp = -6.0 * ((y - x) * z);
} else if (z <= 0.65) {
tmp = (y * 4.0) + (x * -3.0);
} else {
tmp = z * ((y - x) * -6.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.56: tmp = -6.0 * ((y - x) * z) elif z <= 0.65: tmp = (y * 4.0) + (x * -3.0) else: tmp = z * ((y - x) * -6.0) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.56) tmp = Float64(-6.0 * Float64(Float64(y - x) * z)); elseif (z <= 0.65) tmp = Float64(Float64(y * 4.0) + Float64(x * -3.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.56) tmp = -6.0 * ((y - x) * z); elseif (z <= 0.65) tmp = (y * 4.0) + (x * -3.0); else tmp = z * ((y - x) * -6.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.56], N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.65], N[(N[(y * 4.0), $MachinePrecision] + N[(x * -3.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.56:\\
\;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{elif}\;z \leq 0.65:\\
\;\;\;\;y \cdot 4 + x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(\left(y - x\right) \cdot -6\right)\\
\end{array}
\end{array}
if z < -0.56000000000000005Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 97.5%
if -0.56000000000000005 < z < 0.650000000000000022Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in z around 0 97.6%
Taylor expanded in x around 0 97.6%
if 0.650000000000000022 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 97.8%
associate-*r*97.8%
*-commutative97.8%
associate-*l*97.9%
Simplified97.9%
Final simplification97.7%
(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 (if (<= y -4.5e-25) (* y 4.0) (if (<= y 2.7e+150) (* x -3.0) (* y 4.0))))
double code(double x, double y, double z) {
double tmp;
if (y <= -4.5e-25) {
tmp = y * 4.0;
} else if (y <= 2.7e+150) {
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 (y <= (-4.5d-25)) then
tmp = y * 4.0d0
else if (y <= 2.7d+150) 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 (y <= -4.5e-25) {
tmp = y * 4.0;
} else if (y <= 2.7e+150) {
tmp = x * -3.0;
} else {
tmp = y * 4.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -4.5e-25: tmp = y * 4.0 elif y <= 2.7e+150: tmp = x * -3.0 else: tmp = y * 4.0 return tmp
function code(x, y, z) tmp = 0.0 if (y <= -4.5e-25) tmp = Float64(y * 4.0); elseif (y <= 2.7e+150) 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 (y <= -4.5e-25) tmp = y * 4.0; elseif (y <= 2.7e+150) tmp = x * -3.0; else tmp = y * 4.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -4.5e-25], N[(y * 4.0), $MachinePrecision], If[LessEqual[y, 2.7e+150], N[(x * -3.0), $MachinePrecision], N[(y * 4.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.5 \cdot 10^{-25}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{+150}:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;y \cdot 4\\
\end{array}
\end{array}
if y < -4.5000000000000001e-25 or 2.70000000000000008e150 < y Initial program 99.7%
+-commutative99.7%
associate-*l*99.9%
fma-def99.9%
sub-neg99.9%
distribute-rgt-in99.9%
metadata-eval99.9%
metadata-eval99.9%
distribute-lft-neg-out99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 81.4%
Taylor expanded in z around 0 45.8%
*-commutative45.8%
Simplified45.8%
if -4.5000000000000001e-25 < y < 2.70000000000000008e150Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 76.3%
sub-neg76.3%
distribute-rgt-in76.3%
metadata-eval76.3%
neg-mul-176.3%
associate-*r*76.3%
*-commutative76.3%
associate-+r+76.3%
metadata-eval76.3%
associate-*r*76.3%
metadata-eval76.3%
*-commutative76.3%
Simplified76.3%
Taylor expanded in z around 0 40.9%
*-commutative40.9%
Simplified40.9%
Final simplification42.7%
(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 56.8%
sub-neg56.8%
distribute-rgt-in56.8%
metadata-eval56.8%
neg-mul-156.8%
associate-*r*56.8%
*-commutative56.8%
associate-+r+56.8%
metadata-eval56.8%
associate-*r*56.8%
metadata-eval56.8%
*-commutative56.8%
Simplified56.8%
Taylor expanded in z around 0 29.0%
*-commutative29.0%
Simplified29.0%
Final simplification29.0%
herbie shell --seed 2023280
(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))))