
(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 13 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 z))))
(if (<= z -3400000000000.0)
t_0
(if (<= z -4.2e-215)
(* y 4.0)
(if (<= z -1.55e-255)
(* x -3.0)
(if (<= z 3.6e-306)
(* y 4.0)
(if (<= z 3.6e-223)
(* x -3.0)
(if (<= z 1.65e-183)
(* y 4.0)
(if (<= z 1.3e-78)
(* x -3.0)
(if (<= z 0.0092) (* y 4.0) t_0))))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double tmp;
if (z <= -3400000000000.0) {
tmp = t_0;
} else if (z <= -4.2e-215) {
tmp = y * 4.0;
} else if (z <= -1.55e-255) {
tmp = x * -3.0;
} else if (z <= 3.6e-306) {
tmp = y * 4.0;
} else if (z <= 3.6e-223) {
tmp = x * -3.0;
} else if (z <= 1.65e-183) {
tmp = y * 4.0;
} else if (z <= 1.3e-78) {
tmp = x * -3.0;
} else if (z <= 0.0092) {
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 <= (-3400000000000.0d0)) then
tmp = t_0
else if (z <= (-4.2d-215)) then
tmp = y * 4.0d0
else if (z <= (-1.55d-255)) then
tmp = x * (-3.0d0)
else if (z <= 3.6d-306) then
tmp = y * 4.0d0
else if (z <= 3.6d-223) then
tmp = x * (-3.0d0)
else if (z <= 1.65d-183) then
tmp = y * 4.0d0
else if (z <= 1.3d-78) then
tmp = x * (-3.0d0)
else if (z <= 0.0092d0) 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 <= -3400000000000.0) {
tmp = t_0;
} else if (z <= -4.2e-215) {
tmp = y * 4.0;
} else if (z <= -1.55e-255) {
tmp = x * -3.0;
} else if (z <= 3.6e-306) {
tmp = y * 4.0;
} else if (z <= 3.6e-223) {
tmp = x * -3.0;
} else if (z <= 1.65e-183) {
tmp = y * 4.0;
} else if (z <= 1.3e-78) {
tmp = x * -3.0;
} else if (z <= 0.0092) {
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 <= -3400000000000.0: tmp = t_0 elif z <= -4.2e-215: tmp = y * 4.0 elif z <= -1.55e-255: tmp = x * -3.0 elif z <= 3.6e-306: tmp = y * 4.0 elif z <= 3.6e-223: tmp = x * -3.0 elif z <= 1.65e-183: tmp = y * 4.0 elif z <= 1.3e-78: tmp = x * -3.0 elif z <= 0.0092: 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 <= -3400000000000.0) tmp = t_0; elseif (z <= -4.2e-215) tmp = Float64(y * 4.0); elseif (z <= -1.55e-255) tmp = Float64(x * -3.0); elseif (z <= 3.6e-306) tmp = Float64(y * 4.0); elseif (z <= 3.6e-223) tmp = Float64(x * -3.0); elseif (z <= 1.65e-183) tmp = Float64(y * 4.0); elseif (z <= 1.3e-78) tmp = Float64(x * -3.0); elseif (z <= 0.0092) 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 <= -3400000000000.0) tmp = t_0; elseif (z <= -4.2e-215) tmp = y * 4.0; elseif (z <= -1.55e-255) tmp = x * -3.0; elseif (z <= 3.6e-306) tmp = y * 4.0; elseif (z <= 3.6e-223) tmp = x * -3.0; elseif (z <= 1.65e-183) tmp = y * 4.0; elseif (z <= 1.3e-78) tmp = x * -3.0; elseif (z <= 0.0092) 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, -3400000000000.0], t$95$0, If[LessEqual[z, -4.2e-215], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -1.55e-255], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 3.6e-306], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 3.6e-223], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.65e-183], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.3e-78], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.0092], 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 -3400000000000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -4.2 \cdot 10^{-215}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{-255}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{-306}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{-223}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{-183}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-78}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.0092:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -3.4e12 or 0.0091999999999999998 < z Initial program 99.7%
+-commutative99.7%
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 57.0%
Taylor expanded in z around inf 56.2%
Taylor expanded in y around 0 56.1%
*-commutative56.1%
Simplified56.1%
if -3.4e12 < z < -4.2e-215 or -1.54999999999999999e-255 < z < 3.59999999999999991e-306 or 3.6000000000000004e-223 < z < 1.65e-183 or 1.3000000000000001e-78 < z < 0.0091999999999999998Initial 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 72.4%
Taylor expanded in z around 0 72.3%
if -4.2e-215 < z < -1.54999999999999999e-255 or 3.59999999999999991e-306 < z < 3.6000000000000004e-223 or 1.65e-183 < z < 1.3000000000000001e-78Initial program 99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around inf 70.7%
sub-neg70.7%
distribute-rgt-in70.7%
metadata-eval70.7%
neg-mul-170.7%
associate-*r*70.7%
*-commutative70.7%
associate-+r+70.7%
metadata-eval70.7%
associate-*r*70.7%
metadata-eval70.7%
*-commutative70.7%
Simplified70.7%
Taylor expanded in z around 0 70.7%
*-commutative70.7%
Simplified70.7%
Final simplification63.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* y (* z -6.0))))
(if (<= z -3400000000000.0)
t_0
(if (<= z -1.18e-220)
(* y 4.0)
(if (<= z -1.9e-254)
(* x -3.0)
(if (<= z 2.4e-308)
(* y 4.0)
(if (<= z 3.3e-223)
(* x -3.0)
(if (<= z 1.2e-183)
(* y 4.0)
(if (<= z 6.5e-80)
(* x -3.0)
(if (<= z 0.0092) (* y 4.0) t_0))))))))))
double code(double x, double y, double z) {
double t_0 = y * (z * -6.0);
double tmp;
if (z <= -3400000000000.0) {
tmp = t_0;
} else if (z <= -1.18e-220) {
tmp = y * 4.0;
} else if (z <= -1.9e-254) {
tmp = x * -3.0;
} else if (z <= 2.4e-308) {
tmp = y * 4.0;
} else if (z <= 3.3e-223) {
tmp = x * -3.0;
} else if (z <= 1.2e-183) {
tmp = y * 4.0;
} else if (z <= 6.5e-80) {
tmp = x * -3.0;
} else if (z <= 0.0092) {
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 = y * (z * (-6.0d0))
if (z <= (-3400000000000.0d0)) then
tmp = t_0
else if (z <= (-1.18d-220)) then
tmp = y * 4.0d0
else if (z <= (-1.9d-254)) then
tmp = x * (-3.0d0)
else if (z <= 2.4d-308) then
tmp = y * 4.0d0
else if (z <= 3.3d-223) then
tmp = x * (-3.0d0)
else if (z <= 1.2d-183) then
tmp = y * 4.0d0
else if (z <= 6.5d-80) then
tmp = x * (-3.0d0)
else if (z <= 0.0092d0) 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 = y * (z * -6.0);
double tmp;
if (z <= -3400000000000.0) {
tmp = t_0;
} else if (z <= -1.18e-220) {
tmp = y * 4.0;
} else if (z <= -1.9e-254) {
tmp = x * -3.0;
} else if (z <= 2.4e-308) {
tmp = y * 4.0;
} else if (z <= 3.3e-223) {
tmp = x * -3.0;
} else if (z <= 1.2e-183) {
tmp = y * 4.0;
} else if (z <= 6.5e-80) {
tmp = x * -3.0;
} else if (z <= 0.0092) {
tmp = y * 4.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = y * (z * -6.0) tmp = 0 if z <= -3400000000000.0: tmp = t_0 elif z <= -1.18e-220: tmp = y * 4.0 elif z <= -1.9e-254: tmp = x * -3.0 elif z <= 2.4e-308: tmp = y * 4.0 elif z <= 3.3e-223: tmp = x * -3.0 elif z <= 1.2e-183: tmp = y * 4.0 elif z <= 6.5e-80: tmp = x * -3.0 elif z <= 0.0092: tmp = y * 4.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(y * Float64(z * -6.0)) tmp = 0.0 if (z <= -3400000000000.0) tmp = t_0; elseif (z <= -1.18e-220) tmp = Float64(y * 4.0); elseif (z <= -1.9e-254) tmp = Float64(x * -3.0); elseif (z <= 2.4e-308) tmp = Float64(y * 4.0); elseif (z <= 3.3e-223) tmp = Float64(x * -3.0); elseif (z <= 1.2e-183) tmp = Float64(y * 4.0); elseif (z <= 6.5e-80) tmp = Float64(x * -3.0); elseif (z <= 0.0092) tmp = Float64(y * 4.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = y * (z * -6.0); tmp = 0.0; if (z <= -3400000000000.0) tmp = t_0; elseif (z <= -1.18e-220) tmp = y * 4.0; elseif (z <= -1.9e-254) tmp = x * -3.0; elseif (z <= 2.4e-308) tmp = y * 4.0; elseif (z <= 3.3e-223) tmp = x * -3.0; elseif (z <= 1.2e-183) tmp = y * 4.0; elseif (z <= 6.5e-80) tmp = x * -3.0; elseif (z <= 0.0092) tmp = y * 4.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3400000000000.0], t$95$0, If[LessEqual[z, -1.18e-220], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, -1.9e-254], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.4e-308], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 3.3e-223], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.2e-183], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 6.5e-80], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 0.0092], N[(y * 4.0), $MachinePrecision], t$95$0]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \left(z \cdot -6\right)\\
\mathbf{if}\;z \leq -3400000000000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.18 \cdot 10^{-220}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{-254}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-308}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{-223}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-183}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-80}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.0092:\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -3.4e12 or 0.0091999999999999998 < z Initial program 99.7%
+-commutative99.7%
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 57.0%
Taylor expanded in z around inf 56.2%
if -3.4e12 < z < -1.1799999999999999e-220 or -1.9000000000000001e-254 < z < 2.40000000000000008e-308 or 3.29999999999999994e-223 < z < 1.19999999999999996e-183 or 6.49999999999999984e-80 < z < 0.0091999999999999998Initial 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 72.4%
Taylor expanded in z around 0 72.3%
if -1.1799999999999999e-220 < z < -1.9000000000000001e-254 or 2.40000000000000008e-308 < z < 3.29999999999999994e-223 or 1.19999999999999996e-183 < z < 6.49999999999999984e-80Initial program 99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around inf 70.7%
sub-neg70.7%
distribute-rgt-in70.7%
metadata-eval70.7%
neg-mul-170.7%
associate-*r*70.7%
*-commutative70.7%
associate-+r+70.7%
metadata-eval70.7%
associate-*r*70.7%
metadata-eval70.7%
*-commutative70.7%
Simplified70.7%
Taylor expanded in z around 0 70.7%
*-commutative70.7%
Simplified70.7%
Final simplification63.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 6.0 (* y (- 0.6666666666666666 z)))))
(if (<= y -4.4e-121)
t_0
(if (<= y 1.45e-271)
(* z (* x 6.0))
(if (<= y 1.5e-155) (* x -3.0) t_0)))))
double code(double x, double y, double z) {
double t_0 = 6.0 * (y * (0.6666666666666666 - z));
double tmp;
if (y <= -4.4e-121) {
tmp = t_0;
} else if (y <= 1.45e-271) {
tmp = z * (x * 6.0);
} else if (y <= 1.5e-155) {
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 * (0.6666666666666666d0 - z))
if (y <= (-4.4d-121)) then
tmp = t_0
else if (y <= 1.45d-271) then
tmp = z * (x * 6.0d0)
else if (y <= 1.5d-155) 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 * (0.6666666666666666 - z));
double tmp;
if (y <= -4.4e-121) {
tmp = t_0;
} else if (y <= 1.45e-271) {
tmp = z * (x * 6.0);
} else if (y <= 1.5e-155) {
tmp = x * -3.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = 6.0 * (y * (0.6666666666666666 - z)) tmp = 0 if y <= -4.4e-121: tmp = t_0 elif y <= 1.45e-271: tmp = z * (x * 6.0) elif y <= 1.5e-155: tmp = x * -3.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(6.0 * Float64(y * Float64(0.6666666666666666 - z))) tmp = 0.0 if (y <= -4.4e-121) tmp = t_0; elseif (y <= 1.45e-271) tmp = Float64(z * Float64(x * 6.0)); elseif (y <= 1.5e-155) 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 * (0.6666666666666666 - z)); tmp = 0.0; if (y <= -4.4e-121) tmp = t_0; elseif (y <= 1.45e-271) tmp = z * (x * 6.0); elseif (y <= 1.5e-155) 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 * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.4e-121], t$95$0, If[LessEqual[y, 1.45e-271], N[(z * N[(x * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e-155], N[(x * -3.0), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\
\mathbf{if}\;y \leq -4.4 \cdot 10^{-121}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{-271}:\\
\;\;\;\;z \cdot \left(x \cdot 6\right)\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{-155}:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y < -4.40000000000000042e-121 or 1.49999999999999992e-155 < y Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 96.2%
Taylor expanded in y around inf 72.1%
if -4.40000000000000042e-121 < y < 1.45000000000000007e-271Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
flip-+51.2%
div-sub51.3%
associate-*l*51.3%
pow251.3%
associate-*l*51.0%
associate-*l*51.2%
Applied egg-rr51.2%
div-sub51.1%
*-commutative51.1%
associate-*r*50.9%
associate-*r*51.1%
sub-neg51.1%
distribute-lft-in51.1%
metadata-eval51.1%
distribute-rgt-neg-in51.1%
distribute-lft-neg-in51.1%
metadata-eval51.1%
+-commutative51.1%
*-commutative51.1%
fma-udef51.0%
fma-udef51.1%
*-commutative51.1%
+-commutative51.1%
Simplified51.1%
unpow251.1%
*-commutative51.1%
*-commutative51.1%
associate-*r*51.2%
associate-*r*50.9%
Applied egg-rr50.9%
Taylor expanded in z around inf 66.2%
*-commutative66.2%
*-commutative66.2%
associate-*l*66.2%
*-commutative66.2%
Simplified66.2%
Taylor expanded in y around 0 66.1%
associate-*r*66.2%
Simplified66.2%
if 1.45000000000000007e-271 < y < 1.49999999999999992e-155Initial program 99.0%
metadata-eval99.0%
Simplified99.0%
Taylor expanded in x around inf 86.1%
sub-neg86.1%
distribute-rgt-in86.1%
metadata-eval86.1%
neg-mul-186.1%
associate-*r*86.1%
*-commutative86.1%
associate-+r+86.1%
metadata-eval86.1%
associate-*r*86.1%
metadata-eval86.1%
*-commutative86.1%
Simplified86.1%
Taylor expanded in z around 0 59.6%
*-commutative59.6%
Simplified59.6%
Final simplification70.3%
(FPCore (x y z) :precision binary64 (if (or (<= y -2.9e-120) (not (<= y 1.95e-45))) (* 6.0 (* y (- 0.6666666666666666 z))) (* x (+ -3.0 (* z 6.0)))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -2.9e-120) || !(y <= 1.95e-45)) {
tmp = 6.0 * (y * (0.6666666666666666 - z));
} else {
tmp = x * (-3.0 + (z * 6.0));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y <= (-2.9d-120)) .or. (.not. (y <= 1.95d-45))) then
tmp = 6.0d0 * (y * (0.6666666666666666d0 - z))
else
tmp = x * ((-3.0d0) + (z * 6.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -2.9e-120) || !(y <= 1.95e-45)) {
tmp = 6.0 * (y * (0.6666666666666666 - z));
} else {
tmp = x * (-3.0 + (z * 6.0));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -2.9e-120) or not (y <= 1.95e-45): tmp = 6.0 * (y * (0.6666666666666666 - z)) else: tmp = x * (-3.0 + (z * 6.0)) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -2.9e-120) || !(y <= 1.95e-45)) tmp = Float64(6.0 * Float64(y * Float64(0.6666666666666666 - z))); else tmp = Float64(x * Float64(-3.0 + Float64(z * 6.0))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -2.9e-120) || ~((y <= 1.95e-45))) tmp = 6.0 * (y * (0.6666666666666666 - z)); else tmp = x * (-3.0 + (z * 6.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -2.9e-120], N[Not[LessEqual[y, 1.95e-45]], $MachinePrecision]], N[(6.0 * N[(y * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{-120} \lor \neg \left(y \leq 1.95 \cdot 10^{-45}\right):\\
\;\;\;\;6 \cdot \left(y \cdot \left(0.6666666666666666 - z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\end{array}
\end{array}
if y < -2.9e-120 or 1.95e-45 < y Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 95.6%
Taylor expanded in y around inf 77.9%
if -2.9e-120 < y < 1.95e-45Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 84.8%
sub-neg84.8%
distribute-rgt-in84.8%
metadata-eval84.8%
neg-mul-184.8%
associate-*r*84.8%
*-commutative84.8%
associate-+r+84.8%
metadata-eval84.8%
associate-*r*84.8%
metadata-eval84.8%
*-commutative84.8%
Simplified84.8%
Final simplification80.1%
(FPCore (x y z) :precision binary64 (if (or (<= y -2.9e-120) (not (<= y 1.7e-47))) (* y (+ 4.0 (* z -6.0))) (* x (+ -3.0 (* z 6.0)))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -2.9e-120) || !(y <= 1.7e-47)) {
tmp = y * (4.0 + (z * -6.0));
} else {
tmp = x * (-3.0 + (z * 6.0));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y <= (-2.9d-120)) .or. (.not. (y <= 1.7d-47))) then
tmp = y * (4.0d0 + (z * (-6.0d0)))
else
tmp = x * ((-3.0d0) + (z * 6.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -2.9e-120) || !(y <= 1.7e-47)) {
tmp = y * (4.0 + (z * -6.0));
} else {
tmp = x * (-3.0 + (z * 6.0));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -2.9e-120) or not (y <= 1.7e-47): tmp = y * (4.0 + (z * -6.0)) else: tmp = x * (-3.0 + (z * 6.0)) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -2.9e-120) || !(y <= 1.7e-47)) tmp = Float64(y * Float64(4.0 + Float64(z * -6.0))); else tmp = Float64(x * Float64(-3.0 + Float64(z * 6.0))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -2.9e-120) || ~((y <= 1.7e-47))) tmp = y * (4.0 + (z * -6.0)); else tmp = x * (-3.0 + (z * 6.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -2.9e-120], N[Not[LessEqual[y, 1.7e-47]], $MachinePrecision]], N[(y * N[(4.0 + N[(z * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{-120} \lor \neg \left(y \leq 1.7 \cdot 10^{-47}\right):\\
\;\;\;\;y \cdot \left(4 + z \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\end{array}
\end{array}
if y < -2.9e-120 or 1.7000000000000001e-47 < y Initial program 99.6%
+-commutative99.6%
associate-*l*99.9%
fma-def99.9%
sub-neg99.9%
distribute-rgt-in99.9%
metadata-eval99.9%
metadata-eval99.9%
distribute-lft-neg-out99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 78.1%
if -2.9e-120 < y < 1.7000000000000001e-47Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 84.8%
sub-neg84.8%
distribute-rgt-in84.8%
metadata-eval84.8%
neg-mul-184.8%
associate-*r*84.8%
*-commutative84.8%
associate-+r+84.8%
metadata-eval84.8%
associate-*r*84.8%
metadata-eval84.8%
*-commutative84.8%
Simplified84.8%
Final simplification80.3%
(FPCore (x y z) :precision binary64 (if (or (<= z -0.56) (not (<= z 0.58))) (* (- y x) (* z -6.0)) (+ x (* (- y x) 4.0))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -0.56) || !(z <= 0.58)) {
tmp = (y - x) * (z * -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.56d0)) .or. (.not. (z <= 0.58d0))) then
tmp = (y - x) * (z * (-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.56) || !(z <= 0.58)) {
tmp = (y - x) * (z * -6.0);
} else {
tmp = x + ((y - x) * 4.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -0.56) or not (z <= 0.58): tmp = (y - x) * (z * -6.0) else: tmp = x + ((y - x) * 4.0) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -0.56) || !(z <= 0.58)) tmp = Float64(Float64(y - x) * Float64(z * -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.56) || ~((z <= 0.58))) tmp = (y - x) * (z * -6.0); else tmp = x + ((y - x) * 4.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -0.56], N[Not[LessEqual[z, 0.58]], $MachinePrecision]], N[(N[(y - x), $MachinePrecision] * N[(z * -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.56 \lor \neg \left(z \leq 0.58\right):\\
\;\;\;\;\left(y - x\right) \cdot \left(z \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - x\right) \cdot 4\\
\end{array}
\end{array}
if z < -0.56000000000000005 or 0.57999999999999996 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
flip-+31.7%
div-sub31.7%
associate-*l*31.7%
pow231.7%
associate-*l*31.5%
associate-*l*31.7%
Applied egg-rr31.7%
div-sub31.7%
*-commutative31.7%
associate-*r*31.5%
associate-*r*31.7%
sub-neg31.7%
distribute-lft-in31.6%
metadata-eval31.6%
distribute-rgt-neg-in31.6%
distribute-lft-neg-in31.6%
metadata-eval31.6%
+-commutative31.6%
*-commutative31.6%
fma-udef31.6%
fma-udef31.6%
*-commutative31.6%
+-commutative31.6%
Simplified31.7%
unpow231.7%
*-commutative31.7%
*-commutative31.7%
associate-*r*31.7%
associate-*r*31.5%
Applied egg-rr31.5%
Taylor expanded in z around inf 97.8%
*-commutative97.8%
*-commutative97.8%
associate-*l*97.8%
*-commutative97.8%
Simplified97.8%
if -0.56000000000000005 < z < 0.57999999999999996Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in z around 0 99.2%
Final simplification98.5%
(FPCore (x y z) :precision binary64 (if (or (<= z -0.58) (not (<= z 0.66))) (* (- y x) (* z -6.0)) (+ (* x -3.0) (* y 4.0))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -0.58) || !(z <= 0.66)) {
tmp = (y - x) * (z * -6.0);
} else {
tmp = (x * -3.0) + (y * 4.0);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-0.58d0)) .or. (.not. (z <= 0.66d0))) then
tmp = (y - x) * (z * (-6.0d0))
else
tmp = (x * (-3.0d0)) + (y * 4.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -0.58) || !(z <= 0.66)) {
tmp = (y - x) * (z * -6.0);
} else {
tmp = (x * -3.0) + (y * 4.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -0.58) or not (z <= 0.66): tmp = (y - x) * (z * -6.0) else: tmp = (x * -3.0) + (y * 4.0) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -0.58) || !(z <= 0.66)) tmp = Float64(Float64(y - x) * Float64(z * -6.0)); else tmp = Float64(Float64(x * -3.0) + Float64(y * 4.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -0.58) || ~((z <= 0.66))) tmp = (y - x) * (z * -6.0); else tmp = (x * -3.0) + (y * 4.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -0.58], N[Not[LessEqual[z, 0.66]], $MachinePrecision]], N[(N[(y - x), $MachinePrecision] * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * -3.0), $MachinePrecision] + N[(y * 4.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.58 \lor \neg \left(z \leq 0.66\right):\\
\;\;\;\;\left(y - x\right) \cdot \left(z \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot -3 + y \cdot 4\\
\end{array}
\end{array}
if z < -0.57999999999999996 or 0.660000000000000031 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
flip-+31.7%
div-sub31.7%
associate-*l*31.7%
pow231.7%
associate-*l*31.5%
associate-*l*31.7%
Applied egg-rr31.7%
div-sub31.7%
*-commutative31.7%
associate-*r*31.5%
associate-*r*31.7%
sub-neg31.7%
distribute-lft-in31.6%
metadata-eval31.6%
distribute-rgt-neg-in31.6%
distribute-lft-neg-in31.6%
metadata-eval31.6%
+-commutative31.6%
*-commutative31.6%
fma-udef31.6%
fma-udef31.6%
*-commutative31.6%
+-commutative31.6%
Simplified31.7%
unpow231.7%
*-commutative31.7%
*-commutative31.7%
associate-*r*31.7%
associate-*r*31.5%
Applied egg-rr31.5%
Taylor expanded in z around inf 97.8%
*-commutative97.8%
*-commutative97.8%
associate-*l*97.8%
*-commutative97.8%
Simplified97.8%
if -0.57999999999999996 < z < 0.660000000000000031Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around 0 99.6%
Taylor expanded in z around 0 99.2%
Final simplification98.5%
(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 (+ x (* (- y x) (+ 4.0 (* z -6.0)))))
double code(double x, double y, double z) {
return x + ((y - x) * (4.0 + (z * -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 + ((y - x) * (4.0d0 + (z * (-6.0d0))))
end function
public static double code(double x, double y, double z) {
return x + ((y - x) * (4.0 + (z * -6.0)));
}
def code(x, y, z): return x + ((y - x) * (4.0 + (z * -6.0)))
function code(x, y, z) return Float64(x + Float64(Float64(y - x) * Float64(4.0 + Float64(z * -6.0)))) end
function tmp = code(x, y, z) tmp = x + ((y - x) * (4.0 + (z * -6.0))); end
code[x_, y_, z_] := N[(x + N[(N[(y - x), $MachinePrecision] * N[(4.0 + N[(z * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - x\right) \cdot \left(4 + z \cdot -6\right)
\end{array}
Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
flip--89.3%
associate-*r/87.2%
metadata-eval87.2%
Applied egg-rr87.2%
associate-/l*89.4%
*-commutative89.4%
associate-/l*89.5%
Simplified89.5%
Taylor expanded in z around inf 99.8%
+-commutative99.8%
associate-*r*99.8%
*-commutative99.8%
distribute-rgt-out99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z) :precision binary64 (if (<= y -1.95e-120) (* y 4.0) (if (<= y 5e-23) (* x -3.0) (* y 4.0))))
double code(double x, double y, double z) {
double tmp;
if (y <= -1.95e-120) {
tmp = y * 4.0;
} else if (y <= 5e-23) {
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 <= (-1.95d-120)) then
tmp = y * 4.0d0
else if (y <= 5d-23) 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 <= -1.95e-120) {
tmp = y * 4.0;
} else if (y <= 5e-23) {
tmp = x * -3.0;
} else {
tmp = y * 4.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -1.95e-120: tmp = y * 4.0 elif y <= 5e-23: tmp = x * -3.0 else: tmp = y * 4.0 return tmp
function code(x, y, z) tmp = 0.0 if (y <= -1.95e-120) tmp = Float64(y * 4.0); elseif (y <= 5e-23) 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 <= -1.95e-120) tmp = y * 4.0; elseif (y <= 5e-23) tmp = x * -3.0; else tmp = y * 4.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -1.95e-120], N[(y * 4.0), $MachinePrecision], If[LessEqual[y, 5e-23], N[(x * -3.0), $MachinePrecision], N[(y * 4.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.95 \cdot 10^{-120}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;y \leq 5 \cdot 10^{-23}:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;y \cdot 4\\
\end{array}
\end{array}
if y < -1.9500000000000001e-120 or 5.0000000000000002e-23 < y Initial program 99.6%
+-commutative99.6%
associate-*l*99.9%
fma-def99.9%
sub-neg99.9%
distribute-rgt-in99.9%
metadata-eval99.9%
metadata-eval99.9%
distribute-lft-neg-out99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 78.8%
Taylor expanded in z around 0 41.5%
if -1.9500000000000001e-120 < y < 5.0000000000000002e-23Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 80.9%
sub-neg80.9%
distribute-rgt-in80.9%
metadata-eval80.9%
neg-mul-180.9%
associate-*r*80.9%
*-commutative80.9%
associate-+r+80.9%
metadata-eval80.9%
associate-*r*80.9%
metadata-eval80.9%
*-commutative80.9%
Simplified80.9%
Taylor expanded in z around 0 38.0%
*-commutative38.0%
Simplified38.0%
Final simplification40.2%
(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 44.0%
sub-neg44.0%
distribute-rgt-in44.0%
metadata-eval44.0%
neg-mul-144.0%
associate-*r*44.0%
*-commutative44.0%
associate-+r+44.0%
metadata-eval44.0%
associate-*r*44.0%
metadata-eval44.0%
*-commutative44.0%
Simplified44.0%
Taylor expanded in z around 0 20.2%
*-commutative20.2%
Simplified20.2%
Final simplification20.2%
(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 57.7%
*-commutative57.7%
Simplified57.7%
Taylor expanded in x around inf 2.4%
Final simplification2.4%
herbie shell --seed 2023290
(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))))