
(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 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))
double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + (((y - x) * 6.0d0) * ((2.0d0 / 3.0d0) - z))
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
def code(x, y, z): return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z))
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(Float64(2.0 / 3.0) - z))) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * ((2.0 / 3.0) - z)); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right)
\end{array}
(FPCore (x y z) :precision binary64 (fma (- y x) (+ 4.0 (* z -6.0)) x))
double code(double x, double y, double z) {
return fma((y - x), (4.0 + (z * -6.0)), x);
}
function code(x, y, z) return fma(Float64(y - x), Float64(4.0 + Float64(z * -6.0)), x) end
code[x_, y_, z_] := N[(N[(y - x), $MachinePrecision] * N[(4.0 + N[(z * -6.0), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y - x, 4 + z \cdot -6, x\right)
\end{array}
Initial program 99.6%
+-commutative99.6%
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%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 6.0 (* y (- 0.6666666666666666 z))))
(t_1 (* -6.0 (* (- y x) z))))
(if (<= z -5400000.0)
t_1
(if (<= z -3.3e-57)
t_0
(if (<= z 1.1e-255) (* x -3.0) (if (<= z 15500000000000.0) t_0 t_1))))))
double code(double x, double y, double z) {
double t_0 = 6.0 * (y * (0.6666666666666666 - z));
double t_1 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -5400000.0) {
tmp = t_1;
} else if (z <= -3.3e-57) {
tmp = t_0;
} else if (z <= 1.1e-255) {
tmp = x * -3.0;
} else if (z <= 15500000000000.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 = 6.0d0 * (y * (0.6666666666666666d0 - z))
t_1 = (-6.0d0) * ((y - x) * z)
if (z <= (-5400000.0d0)) then
tmp = t_1
else if (z <= (-3.3d-57)) then
tmp = t_0
else if (z <= 1.1d-255) then
tmp = x * (-3.0d0)
else if (z <= 15500000000000.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 = 6.0 * (y * (0.6666666666666666 - z));
double t_1 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -5400000.0) {
tmp = t_1;
} else if (z <= -3.3e-57) {
tmp = t_0;
} else if (z <= 1.1e-255) {
tmp = x * -3.0;
} else if (z <= 15500000000000.0) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = 6.0 * (y * (0.6666666666666666 - z)) t_1 = -6.0 * ((y - x) * z) tmp = 0 if z <= -5400000.0: tmp = t_1 elif z <= -3.3e-57: tmp = t_0 elif z <= 1.1e-255: tmp = x * -3.0 elif z <= 15500000000000.0: tmp = t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(6.0 * Float64(y * Float64(0.6666666666666666 - z))) t_1 = Float64(-6.0 * Float64(Float64(y - x) * z)) tmp = 0.0 if (z <= -5400000.0) tmp = t_1; elseif (z <= -3.3e-57) tmp = t_0; elseif (z <= 1.1e-255) tmp = Float64(x * -3.0); elseif (z <= 15500000000000.0) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = 6.0 * (y * (0.6666666666666666 - z)); t_1 = -6.0 * ((y - x) * z); tmp = 0.0; if (z <= -5400000.0) tmp = t_1; elseif (z <= -3.3e-57) tmp = t_0; elseif (z <= 1.1e-255) tmp = x * -3.0; elseif (z <= 15500000000000.0) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(6.0 * N[(y * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5400000.0], t$95$1, If[LessEqual[z, -3.3e-57], t$95$0, If[LessEqual[z, 1.1e-255], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 15500000000000.0], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\
t_1 := -6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{if}\;z \leq -5400000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3.3 \cdot 10^{-57}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-255}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 15500000000000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -5.4e6 or 1.55e13 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 99.6%
if -5.4e6 < z < -3.2999999999999998e-57 or 1.1e-255 < z < 1.55e13Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 63.6%
Taylor expanded in x around 0 64.3%
if -3.2999999999999998e-57 < z < 1.1e-255Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 69.5%
sub-neg69.5%
distribute-lft-in69.5%
metadata-eval69.5%
metadata-eval69.5%
neg-mul-169.5%
*-commutative69.5%
associate-*l*69.5%
distribute-rgt-in69.5%
distribute-lft-in69.5%
metadata-eval69.5%
metadata-eval69.5%
associate-+r+69.5%
metadata-eval69.5%
metadata-eval69.5%
associate-*r*69.5%
metadata-eval69.5%
*-commutative69.5%
Simplified69.5%
Taylor expanded in z around 0 69.5%
*-commutative69.5%
Simplified69.5%
Final simplification84.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 6.0 (* y (- 0.6666666666666666 z))))
(t_1 (* -6.0 (* (- y x) z))))
(if (<= z -4500000.0)
t_1
(if (<= z -1.55e-57)
t_0
(if (<= z 1.1e-255)
(* x (+ -3.0 (* z 6.0)))
(if (<= z 18500000000000.0) t_0 t_1))))))
double code(double x, double y, double z) {
double t_0 = 6.0 * (y * (0.6666666666666666 - z));
double t_1 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -4500000.0) {
tmp = t_1;
} else if (z <= -1.55e-57) {
tmp = t_0;
} else if (z <= 1.1e-255) {
tmp = x * (-3.0 + (z * 6.0));
} else if (z <= 18500000000000.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 = 6.0d0 * (y * (0.6666666666666666d0 - z))
t_1 = (-6.0d0) * ((y - x) * z)
if (z <= (-4500000.0d0)) then
tmp = t_1
else if (z <= (-1.55d-57)) then
tmp = t_0
else if (z <= 1.1d-255) then
tmp = x * ((-3.0d0) + (z * 6.0d0))
else if (z <= 18500000000000.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 = 6.0 * (y * (0.6666666666666666 - z));
double t_1 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -4500000.0) {
tmp = t_1;
} else if (z <= -1.55e-57) {
tmp = t_0;
} else if (z <= 1.1e-255) {
tmp = x * (-3.0 + (z * 6.0));
} else if (z <= 18500000000000.0) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = 6.0 * (y * (0.6666666666666666 - z)) t_1 = -6.0 * ((y - x) * z) tmp = 0 if z <= -4500000.0: tmp = t_1 elif z <= -1.55e-57: tmp = t_0 elif z <= 1.1e-255: tmp = x * (-3.0 + (z * 6.0)) elif z <= 18500000000000.0: tmp = t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(6.0 * Float64(y * Float64(0.6666666666666666 - z))) t_1 = Float64(-6.0 * Float64(Float64(y - x) * z)) tmp = 0.0 if (z <= -4500000.0) tmp = t_1; elseif (z <= -1.55e-57) tmp = t_0; elseif (z <= 1.1e-255) tmp = Float64(x * Float64(-3.0 + Float64(z * 6.0))); elseif (z <= 18500000000000.0) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = 6.0 * (y * (0.6666666666666666 - z)); t_1 = -6.0 * ((y - x) * z); tmp = 0.0; if (z <= -4500000.0) tmp = t_1; elseif (z <= -1.55e-57) tmp = t_0; elseif (z <= 1.1e-255) tmp = x * (-3.0 + (z * 6.0)); elseif (z <= 18500000000000.0) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(6.0 * N[(y * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4500000.0], t$95$1, If[LessEqual[z, -1.55e-57], t$95$0, If[LessEqual[z, 1.1e-255], N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 18500000000000.0], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\
t_1 := -6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{if}\;z \leq -4500000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{-57}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-255}:\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\mathbf{elif}\;z \leq 18500000000000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -4.5e6 or 1.85e13 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 99.6%
if -4.5e6 < z < -1.54999999999999988e-57 or 1.1e-255 < z < 1.85e13Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 63.6%
Taylor expanded in x around 0 64.3%
if -1.54999999999999988e-57 < z < 1.1e-255Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 69.5%
sub-neg69.5%
distribute-lft-in69.5%
metadata-eval69.5%
metadata-eval69.5%
neg-mul-169.5%
*-commutative69.5%
associate-*l*69.5%
distribute-rgt-in69.5%
distribute-lft-in69.5%
metadata-eval69.5%
metadata-eval69.5%
associate-+r+69.5%
metadata-eval69.5%
metadata-eval69.5%
associate-*r*69.5%
metadata-eval69.5%
*-commutative69.5%
Simplified69.5%
Final simplification84.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* y (+ 4.0 (* z -6.0)))) (t_1 (* -6.0 (* (- y x) z))))
(if (<= z -4200000.0)
t_1
(if (<= z -6.6e-75)
t_0
(if (<= z 1.92e-255)
(* x (+ -3.0 (* z 6.0)))
(if (<= z 15500000000000.0) t_0 t_1))))))
double code(double x, double y, double z) {
double t_0 = y * (4.0 + (z * -6.0));
double t_1 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -4200000.0) {
tmp = t_1;
} else if (z <= -6.6e-75) {
tmp = t_0;
} else if (z <= 1.92e-255) {
tmp = x * (-3.0 + (z * 6.0));
} else if (z <= 15500000000000.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 = y * (4.0d0 + (z * (-6.0d0)))
t_1 = (-6.0d0) * ((y - x) * z)
if (z <= (-4200000.0d0)) then
tmp = t_1
else if (z <= (-6.6d-75)) then
tmp = t_0
else if (z <= 1.92d-255) then
tmp = x * ((-3.0d0) + (z * 6.0d0))
else if (z <= 15500000000000.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 = y * (4.0 + (z * -6.0));
double t_1 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -4200000.0) {
tmp = t_1;
} else if (z <= -6.6e-75) {
tmp = t_0;
} else if (z <= 1.92e-255) {
tmp = x * (-3.0 + (z * 6.0));
} else if (z <= 15500000000000.0) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = y * (4.0 + (z * -6.0)) t_1 = -6.0 * ((y - x) * z) tmp = 0 if z <= -4200000.0: tmp = t_1 elif z <= -6.6e-75: tmp = t_0 elif z <= 1.92e-255: tmp = x * (-3.0 + (z * 6.0)) elif z <= 15500000000000.0: tmp = t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(y * Float64(4.0 + Float64(z * -6.0))) t_1 = Float64(-6.0 * Float64(Float64(y - x) * z)) tmp = 0.0 if (z <= -4200000.0) tmp = t_1; elseif (z <= -6.6e-75) tmp = t_0; elseif (z <= 1.92e-255) tmp = Float64(x * Float64(-3.0 + Float64(z * 6.0))); elseif (z <= 15500000000000.0) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = y * (4.0 + (z * -6.0)); t_1 = -6.0 * ((y - x) * z); tmp = 0.0; if (z <= -4200000.0) tmp = t_1; elseif (z <= -6.6e-75) tmp = t_0; elseif (z <= 1.92e-255) tmp = x * (-3.0 + (z * 6.0)); elseif (z <= 15500000000000.0) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(y * N[(4.0 + N[(z * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4200000.0], t$95$1, If[LessEqual[z, -6.6e-75], t$95$0, If[LessEqual[z, 1.92e-255], N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 15500000000000.0], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \left(4 + z \cdot -6\right)\\
t_1 := -6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{if}\;z \leq -4200000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -6.6 \cdot 10^{-75}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 1.92 \cdot 10^{-255}:\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\mathbf{elif}\;z \leq 15500000000000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -4.2e6 or 1.55e13 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 99.6%
if -4.2e6 < z < -6.5999999999999999e-75 or 1.92e-255 < z < 1.55e13Initial program 99.4%
+-commutative99.4%
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 63.8%
if -6.5999999999999999e-75 < z < 1.92e-255Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 70.8%
sub-neg70.8%
distribute-lft-in70.8%
metadata-eval70.8%
metadata-eval70.8%
neg-mul-170.8%
*-commutative70.8%
associate-*l*70.8%
distribute-rgt-in70.8%
distribute-lft-in70.8%
metadata-eval70.8%
metadata-eval70.8%
associate-+r+70.8%
metadata-eval70.8%
metadata-eval70.8%
associate-*r*70.8%
metadata-eval70.8%
*-commutative70.8%
Simplified70.8%
Final simplification84.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* y (+ 4.0 (* z -6.0)))) (t_1 (* z (* (- y x) -6.0))))
(if (<= z -8200000.0)
t_1
(if (<= z -1.55e-73)
t_0
(if (<= z 1.32e-255)
(* x (+ -3.0 (* z 6.0)))
(if (<= z 15500000000000.0) t_0 t_1))))))
double code(double x, double y, double z) {
double t_0 = y * (4.0 + (z * -6.0));
double t_1 = z * ((y - x) * -6.0);
double tmp;
if (z <= -8200000.0) {
tmp = t_1;
} else if (z <= -1.55e-73) {
tmp = t_0;
} else if (z <= 1.32e-255) {
tmp = x * (-3.0 + (z * 6.0));
} else if (z <= 15500000000000.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 = y * (4.0d0 + (z * (-6.0d0)))
t_1 = z * ((y - x) * (-6.0d0))
if (z <= (-8200000.0d0)) then
tmp = t_1
else if (z <= (-1.55d-73)) then
tmp = t_0
else if (z <= 1.32d-255) then
tmp = x * ((-3.0d0) + (z * 6.0d0))
else if (z <= 15500000000000.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 = y * (4.0 + (z * -6.0));
double t_1 = z * ((y - x) * -6.0);
double tmp;
if (z <= -8200000.0) {
tmp = t_1;
} else if (z <= -1.55e-73) {
tmp = t_0;
} else if (z <= 1.32e-255) {
tmp = x * (-3.0 + (z * 6.0));
} else if (z <= 15500000000000.0) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = y * (4.0 + (z * -6.0)) t_1 = z * ((y - x) * -6.0) tmp = 0 if z <= -8200000.0: tmp = t_1 elif z <= -1.55e-73: tmp = t_0 elif z <= 1.32e-255: tmp = x * (-3.0 + (z * 6.0)) elif z <= 15500000000000.0: tmp = t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(y * Float64(4.0 + Float64(z * -6.0))) t_1 = Float64(z * Float64(Float64(y - x) * -6.0)) tmp = 0.0 if (z <= -8200000.0) tmp = t_1; elseif (z <= -1.55e-73) tmp = t_0; elseif (z <= 1.32e-255) tmp = Float64(x * Float64(-3.0 + Float64(z * 6.0))); elseif (z <= 15500000000000.0) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = y * (4.0 + (z * -6.0)); t_1 = z * ((y - x) * -6.0); tmp = 0.0; if (z <= -8200000.0) tmp = t_1; elseif (z <= -1.55e-73) tmp = t_0; elseif (z <= 1.32e-255) tmp = x * (-3.0 + (z * 6.0)); elseif (z <= 15500000000000.0) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(y * N[(4.0 + N[(z * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(z * N[(N[(y - x), $MachinePrecision] * -6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8200000.0], t$95$1, If[LessEqual[z, -1.55e-73], t$95$0, If[LessEqual[z, 1.32e-255], N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 15500000000000.0], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \left(4 + z \cdot -6\right)\\
t_1 := z \cdot \left(\left(y - x\right) \cdot -6\right)\\
\mathbf{if}\;z \leq -8200000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{-73}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 1.32 \cdot 10^{-255}:\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\mathbf{elif}\;z \leq 15500000000000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -8.2e6 or 1.55e13 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 99.6%
Taylor expanded in y around 0 95.9%
*-commutative95.9%
associate-*r*96.0%
associate-*r*96.0%
*-commutative96.0%
associate-*r*96.0%
*-commutative96.0%
metadata-eval96.0%
distribute-lft-neg-in96.0%
distribute-rgt-neg-in96.0%
distribute-lft-neg-out96.0%
distribute-rgt-out99.6%
metadata-eval99.6%
distribute-lft-neg-in99.6%
distribute-rgt-neg-out99.6%
*-commutative99.6%
sub-neg99.6%
associate-*r*99.6%
*-commutative99.6%
distribute-lft-neg-out99.6%
distribute-rgt-neg-in99.6%
*-commutative99.6%
distribute-lft-neg-in99.6%
metadata-eval99.6%
Simplified99.6%
if -8.2e6 < z < -1.54999999999999985e-73 or 1.32e-255 < z < 1.55e13Initial program 99.4%
+-commutative99.4%
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 63.8%
if -1.54999999999999985e-73 < z < 1.32e-255Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 70.8%
sub-neg70.8%
distribute-lft-in70.8%
metadata-eval70.8%
metadata-eval70.8%
neg-mul-170.8%
*-commutative70.8%
associate-*l*70.8%
distribute-rgt-in70.8%
distribute-lft-in70.8%
metadata-eval70.8%
metadata-eval70.8%
associate-+r+70.8%
metadata-eval70.8%
metadata-eval70.8%
associate-*r*70.8%
metadata-eval70.8%
*-commutative70.8%
Simplified70.8%
Final simplification84.6%
(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
(let* ((t_0 (* 6.0 (* x z))))
(if (<= z -6e+177)
t_0
(if (<= z -3.6e-14)
(* -6.0 (* y z))
(if (<= z 2.05e-255) (* x -3.0) (if (<= z 0.5) (* y 4.0) t_0))))))
double code(double x, double y, double z) {
double t_0 = 6.0 * (x * z);
double tmp;
if (z <= -6e+177) {
tmp = t_0;
} else if (z <= -3.6e-14) {
tmp = -6.0 * (y * z);
} else if (z <= 2.05e-255) {
tmp = x * -3.0;
} else if (z <= 0.5) {
tmp = y * 4.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 * (x * z)
if (z <= (-6d+177)) then
tmp = t_0
else if (z <= (-3.6d-14)) then
tmp = (-6.0d0) * (y * z)
else if (z <= 2.05d-255) then
tmp = x * (-3.0d0)
else if (z <= 0.5d0) then
tmp = y * 4.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 * (x * z);
double tmp;
if (z <= -6e+177) {
tmp = t_0;
} else if (z <= -3.6e-14) {
tmp = -6.0 * (y * z);
} else if (z <= 2.05e-255) {
tmp = x * -3.0;
} else if (z <= 0.5) {
tmp = y * 4.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = 6.0 * (x * z) tmp = 0 if z <= -6e+177: tmp = t_0 elif z <= -3.6e-14: tmp = -6.0 * (y * z) elif z <= 2.05e-255: tmp = x * -3.0 elif z <= 0.5: tmp = y * 4.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(6.0 * Float64(x * z)) tmp = 0.0 if (z <= -6e+177) tmp = t_0; elseif (z <= -3.6e-14) tmp = Float64(-6.0 * Float64(y * z)); elseif (z <= 2.05e-255) tmp = Float64(x * -3.0); elseif (z <= 0.5) tmp = Float64(y * 4.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = 6.0 * (x * z); tmp = 0.0; if (z <= -6e+177) tmp = t_0; elseif (z <= -3.6e-14) tmp = -6.0 * (y * z); elseif (z <= 2.05e-255) tmp = x * -3.0; elseif (z <= 0.5) tmp = y * 4.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6e+177], t$95$0, If[LessEqual[z, -3.6e-14], N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.05e-255], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.5], N[(y * 4.0), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(x \cdot z\right)\\
\mathbf{if}\;z \leq -6 \cdot 10^{+177}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{-14}:\\
\;\;\;\;-6 \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;z \leq 2.05 \cdot 10^{-255}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -6e177 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 99.6%
Taylor expanded in y around 0 58.6%
if -6e177 < z < -3.5999999999999998e-14Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around 0 99.6%
Taylor expanded in z around inf 83.7%
Taylor expanded in y around inf 54.5%
*-commutative54.5%
Simplified54.5%
if -3.5999999999999998e-14 < z < 2.05e-255Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 66.3%
sub-neg66.3%
distribute-lft-in66.3%
metadata-eval66.3%
metadata-eval66.3%
neg-mul-166.3%
*-commutative66.3%
associate-*l*66.3%
distribute-rgt-in66.3%
distribute-lft-in66.3%
metadata-eval66.3%
metadata-eval66.3%
associate-+r+66.4%
metadata-eval66.4%
metadata-eval66.4%
associate-*r*66.4%
metadata-eval66.4%
*-commutative66.4%
Simplified66.4%
Taylor expanded in z around 0 66.1%
*-commutative66.1%
Simplified66.1%
if 2.05e-255 < z < 0.5Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 99.5%
Taylor expanded in z around 0 95.2%
distribute-lft-in95.2%
associate-*r*95.4%
metadata-eval95.4%
associate-+r+95.4%
associate-*r*95.5%
metadata-eval95.5%
distribute-rgt1-in95.5%
metadata-eval95.5%
*-commutative95.5%
*-commutative95.5%
Simplified95.5%
Taylor expanded in x around 0 59.1%
*-commutative59.1%
Simplified59.1%
Final simplification60.1%
(FPCore (x y z)
:precision binary64
(if (<= z -1.5e+161)
(* x (* z 6.0))
(if (<= z -3.6e-14)
(* -6.0 (* y z))
(if (<= z 2.05e-255)
(* x -3.0)
(if (<= z 0.58) (* y 4.0) (* 6.0 (* x z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.5e+161) {
tmp = x * (z * 6.0);
} else if (z <= -3.6e-14) {
tmp = -6.0 * (y * z);
} else if (z <= 2.05e-255) {
tmp = x * -3.0;
} else if (z <= 0.58) {
tmp = y * 4.0;
} else {
tmp = 6.0 * (x * z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-1.5d+161)) then
tmp = x * (z * 6.0d0)
else if (z <= (-3.6d-14)) then
tmp = (-6.0d0) * (y * z)
else if (z <= 2.05d-255) then
tmp = x * (-3.0d0)
else if (z <= 0.58d0) then
tmp = y * 4.0d0
else
tmp = 6.0d0 * (x * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -1.5e+161) {
tmp = x * (z * 6.0);
} else if (z <= -3.6e-14) {
tmp = -6.0 * (y * z);
} else if (z <= 2.05e-255) {
tmp = x * -3.0;
} else if (z <= 0.58) {
tmp = y * 4.0;
} else {
tmp = 6.0 * (x * z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.5e+161: tmp = x * (z * 6.0) elif z <= -3.6e-14: tmp = -6.0 * (y * z) elif z <= 2.05e-255: tmp = x * -3.0 elif z <= 0.58: tmp = y * 4.0 else: tmp = 6.0 * (x * z) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.5e+161) tmp = Float64(x * Float64(z * 6.0)); elseif (z <= -3.6e-14) tmp = Float64(-6.0 * Float64(y * z)); elseif (z <= 2.05e-255) tmp = Float64(x * -3.0); elseif (z <= 0.58) tmp = Float64(y * 4.0); else tmp = Float64(6.0 * Float64(x * z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -1.5e+161) tmp = x * (z * 6.0); elseif (z <= -3.6e-14) tmp = -6.0 * (y * z); elseif (z <= 2.05e-255) tmp = x * -3.0; elseif (z <= 0.58) tmp = y * 4.0; else tmp = 6.0 * (x * z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.5e+161], N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.6e-14], N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.05e-255], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.58], N[(y * 4.0), $MachinePrecision], N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{+161}:\\
\;\;\;\;x \cdot \left(z \cdot 6\right)\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{-14}:\\
\;\;\;\;-6 \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;z \leq 2.05 \cdot 10^{-255}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.58:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;6 \cdot \left(x \cdot z\right)\\
\end{array}
\end{array}
if z < -1.50000000000000006e161Initial program 100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 63.7%
sub-neg63.7%
distribute-lft-in63.7%
metadata-eval63.7%
metadata-eval63.7%
neg-mul-163.7%
*-commutative63.7%
associate-*l*63.7%
distribute-rgt-in63.7%
distribute-lft-in63.7%
metadata-eval63.7%
metadata-eval63.7%
associate-+r+63.7%
metadata-eval63.7%
metadata-eval63.7%
associate-*r*63.7%
metadata-eval63.7%
*-commutative63.7%
Simplified63.7%
Taylor expanded in z around inf 63.7%
if -1.50000000000000006e161 < z < -3.5999999999999998e-14Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 82.8%
Taylor expanded in y around inf 54.7%
*-commutative54.7%
Simplified54.7%
if -3.5999999999999998e-14 < z < 2.05e-255Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 66.3%
sub-neg66.3%
distribute-lft-in66.3%
metadata-eval66.3%
metadata-eval66.3%
neg-mul-166.3%
*-commutative66.3%
associate-*l*66.3%
distribute-rgt-in66.3%
distribute-lft-in66.3%
metadata-eval66.3%
metadata-eval66.3%
associate-+r+66.4%
metadata-eval66.4%
metadata-eval66.4%
associate-*r*66.4%
metadata-eval66.4%
*-commutative66.4%
Simplified66.4%
Taylor expanded in z around 0 66.1%
*-commutative66.1%
Simplified66.1%
if 2.05e-255 < z < 0.57999999999999996Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 99.5%
Taylor expanded in z around 0 95.2%
distribute-lft-in95.2%
associate-*r*95.4%
metadata-eval95.4%
associate-+r+95.4%
associate-*r*95.5%
metadata-eval95.5%
distribute-rgt1-in95.5%
metadata-eval95.5%
*-commutative95.5%
*-commutative95.5%
Simplified95.5%
Taylor expanded in x around 0 59.1%
*-commutative59.1%
Simplified59.1%
if 0.57999999999999996 < 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.6%
Taylor expanded in y around 0 56.6%
Final simplification60.1%
(FPCore (x y z)
:precision binary64
(if (<= z -1.02e+162)
(* x (* z 6.0))
(if (<= z -3.6e-14)
(* y (* z -6.0))
(if (<= z 1.6e-255)
(* x -3.0)
(if (<= z 0.5) (* y 4.0) (* 6.0 (* x z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.02e+162) {
tmp = x * (z * 6.0);
} else if (z <= -3.6e-14) {
tmp = y * (z * -6.0);
} else if (z <= 1.6e-255) {
tmp = x * -3.0;
} else if (z <= 0.5) {
tmp = y * 4.0;
} else {
tmp = 6.0 * (x * z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-1.02d+162)) then
tmp = x * (z * 6.0d0)
else if (z <= (-3.6d-14)) then
tmp = y * (z * (-6.0d0))
else if (z <= 1.6d-255) then
tmp = x * (-3.0d0)
else if (z <= 0.5d0) then
tmp = y * 4.0d0
else
tmp = 6.0d0 * (x * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -1.02e+162) {
tmp = x * (z * 6.0);
} else if (z <= -3.6e-14) {
tmp = y * (z * -6.0);
} else if (z <= 1.6e-255) {
tmp = x * -3.0;
} else if (z <= 0.5) {
tmp = y * 4.0;
} else {
tmp = 6.0 * (x * z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.02e+162: tmp = x * (z * 6.0) elif z <= -3.6e-14: tmp = y * (z * -6.0) elif z <= 1.6e-255: tmp = x * -3.0 elif z <= 0.5: tmp = y * 4.0 else: tmp = 6.0 * (x * z) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.02e+162) tmp = Float64(x * Float64(z * 6.0)); elseif (z <= -3.6e-14) tmp = Float64(y * Float64(z * -6.0)); elseif (z <= 1.6e-255) tmp = Float64(x * -3.0); elseif (z <= 0.5) tmp = Float64(y * 4.0); else tmp = Float64(6.0 * Float64(x * z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -1.02e+162) tmp = x * (z * 6.0); elseif (z <= -3.6e-14) tmp = y * (z * -6.0); elseif (z <= 1.6e-255) tmp = x * -3.0; elseif (z <= 0.5) tmp = y * 4.0; else tmp = 6.0 * (x * z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.02e+162], N[(x * N[(z * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.6e-14], N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e-255], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.5], N[(y * 4.0), $MachinePrecision], N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.02 \cdot 10^{+162}:\\
\;\;\;\;x \cdot \left(z \cdot 6\right)\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{-14}:\\
\;\;\;\;y \cdot \left(z \cdot -6\right)\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-255}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;6 \cdot \left(x \cdot z\right)\\
\end{array}
\end{array}
if z < -1.01999999999999993e162Initial program 100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 63.7%
sub-neg63.7%
distribute-lft-in63.7%
metadata-eval63.7%
metadata-eval63.7%
neg-mul-163.7%
*-commutative63.7%
associate-*l*63.7%
distribute-rgt-in63.7%
distribute-lft-in63.7%
metadata-eval63.7%
metadata-eval63.7%
associate-+r+63.7%
metadata-eval63.7%
metadata-eval63.7%
associate-*r*63.7%
metadata-eval63.7%
*-commutative63.7%
Simplified63.7%
Taylor expanded in z around inf 63.7%
if -1.01999999999999993e162 < z < -3.5999999999999998e-14Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 82.8%
Taylor expanded in y around inf 54.7%
*-commutative54.7%
associate-*r*54.8%
Simplified54.8%
if -3.5999999999999998e-14 < z < 1.59999999999999996e-255Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 66.3%
sub-neg66.3%
distribute-lft-in66.3%
metadata-eval66.3%
metadata-eval66.3%
neg-mul-166.3%
*-commutative66.3%
associate-*l*66.3%
distribute-rgt-in66.3%
distribute-lft-in66.3%
metadata-eval66.3%
metadata-eval66.3%
associate-+r+66.4%
metadata-eval66.4%
metadata-eval66.4%
associate-*r*66.4%
metadata-eval66.4%
*-commutative66.4%
Simplified66.4%
Taylor expanded in z around 0 66.1%
*-commutative66.1%
Simplified66.1%
if 1.59999999999999996e-255 < z < 0.5Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 99.5%
Taylor expanded in z around 0 95.2%
distribute-lft-in95.2%
associate-*r*95.4%
metadata-eval95.4%
associate-+r+95.4%
associate-*r*95.5%
metadata-eval95.5%
distribute-rgt1-in95.5%
metadata-eval95.5%
*-commutative95.5%
*-commutative95.5%
Simplified95.5%
Taylor expanded in x around 0 59.1%
*-commutative59.1%
Simplified59.1%
if 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 99.6%
Taylor expanded in y around 0 56.6%
Final simplification60.2%
(FPCore (x y z)
:precision binary64
(if (<= z -1.35e+162)
(* z (* x 6.0))
(if (<= z -3.6e-14)
(* y (* z -6.0))
(if (<= z 1.02e-255)
(* x -3.0)
(if (<= z 0.5) (* y 4.0) (* 6.0 (* x z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.35e+162) {
tmp = z * (x * 6.0);
} else if (z <= -3.6e-14) {
tmp = y * (z * -6.0);
} else if (z <= 1.02e-255) {
tmp = x * -3.0;
} else if (z <= 0.5) {
tmp = y * 4.0;
} else {
tmp = 6.0 * (x * z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-1.35d+162)) then
tmp = z * (x * 6.0d0)
else if (z <= (-3.6d-14)) then
tmp = y * (z * (-6.0d0))
else if (z <= 1.02d-255) then
tmp = x * (-3.0d0)
else if (z <= 0.5d0) then
tmp = y * 4.0d0
else
tmp = 6.0d0 * (x * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -1.35e+162) {
tmp = z * (x * 6.0);
} else if (z <= -3.6e-14) {
tmp = y * (z * -6.0);
} else if (z <= 1.02e-255) {
tmp = x * -3.0;
} else if (z <= 0.5) {
tmp = y * 4.0;
} else {
tmp = 6.0 * (x * z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.35e+162: tmp = z * (x * 6.0) elif z <= -3.6e-14: tmp = y * (z * -6.0) elif z <= 1.02e-255: tmp = x * -3.0 elif z <= 0.5: tmp = y * 4.0 else: tmp = 6.0 * (x * z) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.35e+162) tmp = Float64(z * Float64(x * 6.0)); elseif (z <= -3.6e-14) tmp = Float64(y * Float64(z * -6.0)); elseif (z <= 1.02e-255) tmp = Float64(x * -3.0); elseif (z <= 0.5) tmp = Float64(y * 4.0); else tmp = Float64(6.0 * Float64(x * z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -1.35e+162) tmp = z * (x * 6.0); elseif (z <= -3.6e-14) tmp = y * (z * -6.0); elseif (z <= 1.02e-255) tmp = x * -3.0; elseif (z <= 0.5) tmp = y * 4.0; else tmp = 6.0 * (x * z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.35e+162], N[(z * N[(x * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.6e-14], N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.02e-255], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.5], N[(y * 4.0), $MachinePrecision], N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{+162}:\\
\;\;\;\;z \cdot \left(x \cdot 6\right)\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{-14}:\\
\;\;\;\;y \cdot \left(z \cdot -6\right)\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{-255}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;6 \cdot \left(x \cdot z\right)\\
\end{array}
\end{array}
if z < -1.3500000000000001e162Initial program 100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 99.8%
Taylor expanded in z around inf 99.8%
Taylor expanded in y around 0 63.5%
expm1-log1p-u44.4%
expm1-udef44.4%
*-commutative44.4%
*-commutative44.4%
associate-*l*44.4%
Applied egg-rr44.4%
expm1-def44.4%
expm1-log1p63.8%
Simplified63.8%
if -1.3500000000000001e162 < z < -3.5999999999999998e-14Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 82.8%
Taylor expanded in y around inf 54.7%
*-commutative54.7%
associate-*r*54.8%
Simplified54.8%
if -3.5999999999999998e-14 < z < 1.02000000000000002e-255Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 66.3%
sub-neg66.3%
distribute-lft-in66.3%
metadata-eval66.3%
metadata-eval66.3%
neg-mul-166.3%
*-commutative66.3%
associate-*l*66.3%
distribute-rgt-in66.3%
distribute-lft-in66.3%
metadata-eval66.3%
metadata-eval66.3%
associate-+r+66.4%
metadata-eval66.4%
metadata-eval66.4%
associate-*r*66.4%
metadata-eval66.4%
*-commutative66.4%
Simplified66.4%
Taylor expanded in z around 0 66.1%
*-commutative66.1%
Simplified66.1%
if 1.02000000000000002e-255 < z < 0.5Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 99.5%
Taylor expanded in z around 0 95.2%
distribute-lft-in95.2%
associate-*r*95.4%
metadata-eval95.4%
associate-+r+95.4%
associate-*r*95.5%
metadata-eval95.5%
distribute-rgt1-in95.5%
metadata-eval95.5%
*-commutative95.5%
*-commutative95.5%
Simplified95.5%
Taylor expanded in x around 0 59.1%
*-commutative59.1%
Simplified59.1%
if 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 99.6%
Taylor expanded in y around 0 56.6%
Final simplification60.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* (- y x) z))))
(if (<= z -3.6e-14)
t_0
(if (<= z 2.1e-255) (* x -3.0) (if (<= z 0.52) (* y 4.0) t_0)))))
double code(double x, double y, double z) {
double t_0 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -3.6e-14) {
tmp = t_0;
} else if (z <= 2.1e-255) {
tmp = x * -3.0;
} else if (z <= 0.52) {
tmp = y * 4.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 <= (-3.6d-14)) then
tmp = t_0
else if (z <= 2.1d-255) then
tmp = x * (-3.0d0)
else if (z <= 0.52d0) then
tmp = y * 4.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 <= -3.6e-14) {
tmp = t_0;
} else if (z <= 2.1e-255) {
tmp = x * -3.0;
} else if (z <= 0.52) {
tmp = y * 4.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * ((y - x) * z) tmp = 0 if z <= -3.6e-14: tmp = t_0 elif z <= 2.1e-255: tmp = x * -3.0 elif z <= 0.52: tmp = y * 4.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 <= -3.6e-14) tmp = t_0; elseif (z <= 2.1e-255) tmp = Float64(x * -3.0); elseif (z <= 0.52) tmp = Float64(y * 4.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 <= -3.6e-14) tmp = t_0; elseif (z <= 2.1e-255) tmp = x * -3.0; elseif (z <= 0.52) tmp = y * 4.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, -3.6e-14], t$95$0, If[LessEqual[z, 2.1e-255], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.52], N[(y * 4.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 -3.6 \cdot 10^{-14}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-255}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.52:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -3.5999999999999998e-14 or 0.52000000000000002 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 95.4%
if -3.5999999999999998e-14 < z < 2.1e-255Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 66.3%
sub-neg66.3%
distribute-lft-in66.3%
metadata-eval66.3%
metadata-eval66.3%
neg-mul-166.3%
*-commutative66.3%
associate-*l*66.3%
distribute-rgt-in66.3%
distribute-lft-in66.3%
metadata-eval66.3%
metadata-eval66.3%
associate-+r+66.4%
metadata-eval66.4%
metadata-eval66.4%
associate-*r*66.4%
metadata-eval66.4%
*-commutative66.4%
Simplified66.4%
Taylor expanded in z around 0 66.1%
*-commutative66.1%
Simplified66.1%
if 2.1e-255 < z < 0.52000000000000002Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 99.5%
Taylor expanded in z around 0 95.2%
distribute-lft-in95.2%
associate-*r*95.4%
metadata-eval95.4%
associate-+r+95.4%
associate-*r*95.5%
metadata-eval95.5%
distribute-rgt1-in95.5%
metadata-eval95.5%
*-commutative95.5%
*-commutative95.5%
Simplified95.5%
Taylor expanded in x around 0 59.1%
*-commutative59.1%
Simplified59.1%
Final simplification81.7%
(FPCore (x y z) :precision binary64 (if (<= z -0.6) (* z (* (- y x) -6.0)) (if (<= z 0.58) (+ x (* (- y x) 4.0)) (+ x (* (- y x) (* z -6.0))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.6) {
tmp = z * ((y - x) * -6.0);
} else if (z <= 0.58) {
tmp = x + ((y - x) * 4.0);
} else {
tmp = x + ((y - x) * (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 (z <= (-0.6d0)) then
tmp = z * ((y - x) * (-6.0d0))
else if (z <= 0.58d0) then
tmp = x + ((y - x) * 4.0d0)
else
tmp = x + ((y - x) * (z * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.6) {
tmp = z * ((y - x) * -6.0);
} else if (z <= 0.58) {
tmp = x + ((y - x) * 4.0);
} else {
tmp = x + ((y - x) * (z * -6.0));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.6: tmp = z * ((y - x) * -6.0) elif z <= 0.58: tmp = x + ((y - x) * 4.0) else: tmp = x + ((y - x) * (z * -6.0)) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.6) tmp = Float64(z * Float64(Float64(y - x) * -6.0)); elseif (z <= 0.58) tmp = Float64(x + Float64(Float64(y - x) * 4.0)); else tmp = Float64(x + Float64(Float64(y - x) * Float64(z * -6.0))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.6) tmp = z * ((y - x) * -6.0); elseif (z <= 0.58) tmp = x + ((y - x) * 4.0); else tmp = x + ((y - x) * (z * -6.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.6], N[(z * N[(N[(y - x), $MachinePrecision] * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.58], N[(x + N[(N[(y - x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] * N[(z * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.6:\\
\;\;\;\;z \cdot \left(\left(y - x\right) \cdot -6\right)\\
\mathbf{elif}\;z \leq 0.58:\\
\;\;\;\;x + \left(y - x\right) \cdot 4\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - x\right) \cdot \left(z \cdot -6\right)\\
\end{array}
\end{array}
if z < -0.599999999999999978Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 96.6%
Taylor expanded in y around 0 91.7%
*-commutative91.7%
associate-*r*91.8%
associate-*r*91.8%
*-commutative91.8%
associate-*r*91.8%
*-commutative91.8%
metadata-eval91.8%
distribute-lft-neg-in91.8%
distribute-rgt-neg-in91.8%
distribute-lft-neg-out91.8%
distribute-rgt-out96.7%
metadata-eval96.7%
distribute-lft-neg-in96.7%
distribute-rgt-neg-out96.7%
*-commutative96.7%
sub-neg96.7%
associate-*r*96.7%
*-commutative96.7%
distribute-lft-neg-out96.7%
distribute-rgt-neg-in96.7%
*-commutative96.7%
distribute-lft-neg-in96.7%
metadata-eval96.7%
Simplified96.7%
if -0.599999999999999978 < z < 0.57999999999999996Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in z around 0 96.2%
if 0.57999999999999996 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
*-commutative99.7%
flip3--39.1%
associate-*l/28.9%
metadata-eval28.9%
metadata-eval28.9%
distribute-rgt-out28.9%
+-commutative28.9%
Applied egg-rr28.9%
Taylor expanded in z around inf 99.6%
*-commutative99.6%
*-commutative99.6%
associate-*l*99.6%
Simplified99.6%
Final simplification97.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))))
(if (<= z -3.6e-14)
t_0
(if (<= z 2e-255) (* x -3.0) (if (<= z 0.68) (* y 4.0) t_0)))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double tmp;
if (z <= -3.6e-14) {
tmp = t_0;
} else if (z <= 2e-255) {
tmp = x * -3.0;
} else if (z <= 0.68) {
tmp = y * 4.0;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (-6.0d0) * (y * z)
if (z <= (-3.6d-14)) then
tmp = t_0
else if (z <= 2d-255) then
tmp = x * (-3.0d0)
else if (z <= 0.68d0) then
tmp = y * 4.0d0
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double tmp;
if (z <= -3.6e-14) {
tmp = t_0;
} else if (z <= 2e-255) {
tmp = x * -3.0;
} else if (z <= 0.68) {
tmp = y * 4.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) tmp = 0 if z <= -3.6e-14: tmp = t_0 elif z <= 2e-255: tmp = x * -3.0 elif z <= 0.68: tmp = y * 4.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(y * z)) tmp = 0.0 if (z <= -3.6e-14) tmp = t_0; elseif (z <= 2e-255) tmp = Float64(x * -3.0); elseif (z <= 0.68) tmp = Float64(y * 4.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (y * z); tmp = 0.0; if (z <= -3.6e-14) tmp = t_0; elseif (z <= 2e-255) tmp = x * -3.0; elseif (z <= 0.68) tmp = y * 4.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.6e-14], t$95$0, If[LessEqual[z, 2e-255], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.68], N[(y * 4.0), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -3.6 \cdot 10^{-14}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-255}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.68:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -3.5999999999999998e-14 or 0.680000000000000049 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 95.4%
Taylor expanded in y around inf 49.5%
*-commutative49.5%
Simplified49.5%
if -3.5999999999999998e-14 < z < 2e-255Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 66.3%
sub-neg66.3%
distribute-lft-in66.3%
metadata-eval66.3%
metadata-eval66.3%
neg-mul-166.3%
*-commutative66.3%
associate-*l*66.3%
distribute-rgt-in66.3%
distribute-lft-in66.3%
metadata-eval66.3%
metadata-eval66.3%
associate-+r+66.4%
metadata-eval66.4%
metadata-eval66.4%
associate-*r*66.4%
metadata-eval66.4%
*-commutative66.4%
Simplified66.4%
Taylor expanded in z around 0 66.1%
*-commutative66.1%
Simplified66.1%
if 2e-255 < z < 0.680000000000000049Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 99.5%
Taylor expanded in z around 0 95.2%
distribute-lft-in95.2%
associate-*r*95.4%
metadata-eval95.4%
associate-+r+95.4%
associate-*r*95.5%
metadata-eval95.5%
distribute-rgt1-in95.5%
metadata-eval95.5%
*-commutative95.5%
*-commutative95.5%
Simplified95.5%
Taylor expanded in x around 0 59.1%
*-commutative59.1%
Simplified59.1%
Final simplification55.6%
(FPCore (x y z) :precision binary64 (if (or (<= z -0.6) (not (<= z 0.68))) (* z (* (- y x) -6.0)) (+ x (* (- y x) 4.0))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -0.6) || !(z <= 0.68)) {
tmp = z * ((y - x) * -6.0);
} 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.6d0)) .or. (.not. (z <= 0.68d0))) then
tmp = z * ((y - x) * (-6.0d0))
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.6) || !(z <= 0.68)) {
tmp = z * ((y - x) * -6.0);
} else {
tmp = x + ((y - x) * 4.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -0.6) or not (z <= 0.68): tmp = z * ((y - x) * -6.0) else: tmp = x + ((y - x) * 4.0) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -0.6) || !(z <= 0.68)) tmp = Float64(z * Float64(Float64(y - x) * -6.0)); 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.6) || ~((z <= 0.68))) tmp = z * ((y - x) * -6.0); else tmp = x + ((y - x) * 4.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -0.6], N[Not[LessEqual[z, 0.68]], $MachinePrecision]], N[(z * N[(N[(y - x), $MachinePrecision] * -6.0), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.6 \lor \neg \left(z \leq 0.68\right):\\
\;\;\;\;z \cdot \left(\left(y - x\right) \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - x\right) \cdot 4\\
\end{array}
\end{array}
if z < -0.599999999999999978 or 0.680000000000000049 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 98.3%
Taylor expanded in y around 0 94.7%
*-commutative94.7%
associate-*r*94.8%
associate-*r*94.8%
*-commutative94.8%
associate-*r*94.8%
*-commutative94.8%
metadata-eval94.8%
distribute-lft-neg-in94.8%
distribute-rgt-neg-in94.8%
distribute-lft-neg-out94.8%
distribute-rgt-out98.3%
metadata-eval98.3%
distribute-lft-neg-in98.3%
distribute-rgt-neg-out98.3%
*-commutative98.3%
sub-neg98.3%
associate-*r*98.3%
*-commutative98.3%
distribute-lft-neg-out98.3%
distribute-rgt-neg-in98.3%
*-commutative98.3%
distribute-lft-neg-in98.3%
metadata-eval98.3%
Simplified98.3%
if -0.599999999999999978 < z < 0.680000000000000049Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in z around 0 96.2%
Final simplification97.4%
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) (- 0.6666666666666666 z))))
double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * (0.6666666666666666 - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + (((y - x) * 6.0d0) * (0.6666666666666666d0 - z))
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * (0.6666666666666666 - z));
}
def code(x, y, z): return x + (((y - x) * 6.0) * (0.6666666666666666 - z))
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(0.6666666666666666 - z))) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * (0.6666666666666666 - z)); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)
\end{array}
Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z) :precision binary64 (if (or (<= y -3.2e+143) (not (<= y 1.55e-41))) (* y 4.0) (* x -3.0)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -3.2e+143) || !(y <= 1.55e-41)) {
tmp = y * 4.0;
} else {
tmp = x * -3.0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y <= (-3.2d+143)) .or. (.not. (y <= 1.55d-41))) then
tmp = y * 4.0d0
else
tmp = x * (-3.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -3.2e+143) || !(y <= 1.55e-41)) {
tmp = y * 4.0;
} else {
tmp = x * -3.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -3.2e+143) or not (y <= 1.55e-41): tmp = y * 4.0 else: tmp = x * -3.0 return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -3.2e+143) || !(y <= 1.55e-41)) tmp = Float64(y * 4.0); else tmp = Float64(x * -3.0); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -3.2e+143) || ~((y <= 1.55e-41))) tmp = y * 4.0; else tmp = x * -3.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -3.2e+143], N[Not[LessEqual[y, 1.55e-41]], $MachinePrecision]], N[(y * 4.0), $MachinePrecision], N[(x * -3.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+143} \lor \neg \left(y \leq 1.55 \cdot 10^{-41}\right):\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;x \cdot -3\\
\end{array}
\end{array}
if y < -3.20000000000000016e143 or 1.55e-41 < y Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 99.6%
Taylor expanded in z around 0 47.7%
distribute-lft-in47.7%
associate-*r*47.8%
metadata-eval47.8%
associate-+r+47.8%
associate-*r*47.9%
metadata-eval47.9%
distribute-rgt1-in47.9%
metadata-eval47.9%
*-commutative47.9%
*-commutative47.9%
Simplified47.9%
Taylor expanded in x around 0 37.0%
*-commutative37.0%
Simplified37.0%
if -3.20000000000000016e143 < y < 1.55e-41Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 76.9%
sub-neg76.9%
distribute-lft-in76.9%
metadata-eval76.9%
metadata-eval76.9%
neg-mul-176.9%
*-commutative76.9%
associate-*l*76.9%
distribute-rgt-in76.9%
distribute-lft-in76.9%
metadata-eval76.9%
metadata-eval76.9%
associate-+r+76.9%
metadata-eval76.9%
metadata-eval76.9%
associate-*r*76.9%
metadata-eval76.9%
*-commutative76.9%
Simplified76.9%
Taylor expanded in z around 0 36.4%
*-commutative36.4%
Simplified36.4%
Final simplification36.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 54.6%
sub-neg54.6%
distribute-lft-in54.6%
metadata-eval54.6%
metadata-eval54.6%
neg-mul-154.6%
*-commutative54.6%
associate-*l*54.6%
distribute-rgt-in54.6%
distribute-lft-in54.6%
metadata-eval54.6%
metadata-eval54.6%
associate-+r+54.6%
metadata-eval54.6%
metadata-eval54.6%
associate-*r*54.6%
metadata-eval54.6%
*-commutative54.6%
Simplified54.6%
Taylor expanded in z around 0 25.9%
*-commutative25.9%
Simplified25.9%
Final simplification25.9%
(FPCore (x y z) :precision binary64 x)
double code(double x, double y, double z) {
return x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x
end function
public static double code(double x, double y, double z) {
return x;
}
def code(x, y, z): return x
function code(x, y, z) return x end
function tmp = code(x, y, z) tmp = x; end
code[x_, y_, z_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 49.3%
Taylor expanded in x around inf 2.8%
Final simplification2.8%
herbie shell --seed 2023325
(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))))