
(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 14 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.5%
+-commutative99.5%
associate-*l*99.8%
fma-define99.8%
sub-neg99.8%
distribute-rgt-in99.8%
metadata-eval99.8%
metadata-eval99.8%
distribute-lft-neg-out99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z) :precision binary64 (fma (* (- y x) (- 0.6666666666666666 z)) 6.0 x))
double code(double x, double y, double z) {
return fma(((y - x) * (0.6666666666666666 - z)), 6.0, x);
}
function code(x, y, z) return fma(Float64(Float64(y - x) * Float64(0.6666666666666666 - z)), 6.0, x) end
code[x_, y_, z_] := N[(N[(N[(y - x), $MachinePrecision] * N[(0.6666666666666666 - z), $MachinePrecision]), $MachinePrecision] * 6.0 + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\left(y - x\right) \cdot \left(0.6666666666666666 - z\right), 6, x\right)
\end{array}
Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
+-commutative99.5%
*-commutative99.5%
associate-*r*99.6%
fma-define99.6%
Applied egg-rr99.6%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))) (t_1 (* 6.0 (* x z))))
(if (<= z -1.75e+219)
t_0
(if (<= z -9.8e+141)
t_1
(if (<= z -250.0)
t_0
(if (<= z -8.8e-202)
(* y 4.0)
(if (<= z 0.52) (* x -3.0) (if (<= z 2.3e+144) t_0 t_1))))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double t_1 = 6.0 * (x * z);
double tmp;
if (z <= -1.75e+219) {
tmp = t_0;
} else if (z <= -9.8e+141) {
tmp = t_1;
} else if (z <= -250.0) {
tmp = t_0;
} else if (z <= -8.8e-202) {
tmp = y * 4.0;
} else if (z <= 0.52) {
tmp = x * -3.0;
} else if (z <= 2.3e+144) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (-6.0d0) * (y * z)
t_1 = 6.0d0 * (x * z)
if (z <= (-1.75d+219)) then
tmp = t_0
else if (z <= (-9.8d+141)) then
tmp = t_1
else if (z <= (-250.0d0)) then
tmp = t_0
else if (z <= (-8.8d-202)) then
tmp = y * 4.0d0
else if (z <= 0.52d0) then
tmp = x * (-3.0d0)
else if (z <= 2.3d+144) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double t_1 = 6.0 * (x * z);
double tmp;
if (z <= -1.75e+219) {
tmp = t_0;
} else if (z <= -9.8e+141) {
tmp = t_1;
} else if (z <= -250.0) {
tmp = t_0;
} else if (z <= -8.8e-202) {
tmp = y * 4.0;
} else if (z <= 0.52) {
tmp = x * -3.0;
} else if (z <= 2.3e+144) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) t_1 = 6.0 * (x * z) tmp = 0 if z <= -1.75e+219: tmp = t_0 elif z <= -9.8e+141: tmp = t_1 elif z <= -250.0: tmp = t_0 elif z <= -8.8e-202: tmp = y * 4.0 elif z <= 0.52: tmp = x * -3.0 elif z <= 2.3e+144: tmp = t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(y * z)) t_1 = Float64(6.0 * Float64(x * z)) tmp = 0.0 if (z <= -1.75e+219) tmp = t_0; elseif (z <= -9.8e+141) tmp = t_1; elseif (z <= -250.0) tmp = t_0; elseif (z <= -8.8e-202) tmp = Float64(y * 4.0); elseif (z <= 0.52) tmp = Float64(x * -3.0); elseif (z <= 2.3e+144) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (y * z); t_1 = 6.0 * (x * z); tmp = 0.0; if (z <= -1.75e+219) tmp = t_0; elseif (z <= -9.8e+141) tmp = t_1; elseif (z <= -250.0) tmp = t_0; elseif (z <= -8.8e-202) tmp = y * 4.0; elseif (z <= 0.52) tmp = x * -3.0; elseif (z <= 2.3e+144) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.75e+219], t$95$0, If[LessEqual[z, -9.8e+141], t$95$1, If[LessEqual[z, -250.0], t$95$0, If[LessEqual[z, -8.8e-202], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.52], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.3e+144], t$95$0, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
t_1 := 6 \cdot \left(x \cdot z\right)\\
\mathbf{if}\;z \leq -1.75 \cdot 10^{+219}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -9.8 \cdot 10^{+141}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -250:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -8.8 \cdot 10^{-202}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.52:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{+144}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.7500000000000001e219 or -9.8000000000000002e141 < z < -250 or 0.52000000000000002 < z < 2.3000000000000001e144Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
+-commutative99.6%
*-commutative99.6%
associate-*r*99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 97.0%
Taylor expanded in y around inf 64.6%
if -1.7500000000000001e219 < z < -9.8000000000000002e141 or 2.3000000000000001e144 < z Initial program 99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 69.6%
sub-neg69.6%
distribute-rgt-in69.6%
metadata-eval69.6%
distribute-lft-neg-in69.6%
associate-+r+69.6%
metadata-eval69.6%
distribute-rgt-neg-in69.6%
metadata-eval69.6%
Simplified69.6%
Taylor expanded in z around inf 69.7%
if -250 < z < -8.80000000000000032e-202Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 99.4%
Taylor expanded in z around 0 89.6%
Taylor expanded in x around 0 62.0%
*-commutative62.0%
Simplified62.0%
if -8.80000000000000032e-202 < z < 0.52000000000000002Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 57.5%
sub-neg57.5%
distribute-rgt-in57.5%
metadata-eval57.5%
distribute-lft-neg-in57.5%
associate-+r+57.5%
metadata-eval57.5%
distribute-rgt-neg-in57.5%
metadata-eval57.5%
Simplified57.5%
Taylor expanded in z around 0 57.5%
*-commutative57.5%
Simplified57.5%
Final simplification62.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* (- y x) z))))
(if (<= z -0.0001)
t_0
(if (<= z -2.1e-202)
(* y 4.0)
(if (<= z 2e-203)
(* x -3.0)
(if (<= z 1.9e-174) (* y 4.0) (if (<= z 0.5) (* x -3.0) t_0)))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -0.0001) {
tmp = t_0;
} else if (z <= -2.1e-202) {
tmp = y * 4.0;
} else if (z <= 2e-203) {
tmp = x * -3.0;
} else if (z <= 1.9e-174) {
tmp = y * 4.0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (-6.0d0) * ((y - x) * z)
if (z <= (-0.0001d0)) then
tmp = t_0
else if (z <= (-2.1d-202)) then
tmp = y * 4.0d0
else if (z <= 2d-203) then
tmp = x * (-3.0d0)
else if (z <= 1.9d-174) then
tmp = y * 4.0d0
else if (z <= 0.5d0) then
tmp = x * (-3.0d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -0.0001) {
tmp = t_0;
} else if (z <= -2.1e-202) {
tmp = y * 4.0;
} else if (z <= 2e-203) {
tmp = x * -3.0;
} else if (z <= 1.9e-174) {
tmp = y * 4.0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * ((y - x) * z) tmp = 0 if z <= -0.0001: tmp = t_0 elif z <= -2.1e-202: tmp = y * 4.0 elif z <= 2e-203: tmp = x * -3.0 elif z <= 1.9e-174: tmp = y * 4.0 elif z <= 0.5: tmp = x * -3.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(Float64(y - x) * z)) tmp = 0.0 if (z <= -0.0001) tmp = t_0; elseif (z <= -2.1e-202) tmp = Float64(y * 4.0); elseif (z <= 2e-203) tmp = Float64(x * -3.0); elseif (z <= 1.9e-174) tmp = Float64(y * 4.0); elseif (z <= 0.5) tmp = Float64(x * -3.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * ((y - x) * z); tmp = 0.0; if (z <= -0.0001) tmp = t_0; elseif (z <= -2.1e-202) tmp = y * 4.0; elseif (z <= 2e-203) tmp = x * -3.0; elseif (z <= 1.9e-174) tmp = y * 4.0; elseif (z <= 0.5) tmp = x * -3.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.0001], t$95$0, If[LessEqual[z, -2.1e-202], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2e-203], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.9e-174], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.5], N[(x * -3.0), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{if}\;z \leq -0.0001:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -2.1 \cdot 10^{-202}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-203}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-174}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -1.00000000000000005e-4 or 0.5 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
+-commutative99.7%
*-commutative99.7%
associate-*r*99.7%
fma-define99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 95.7%
if -1.00000000000000005e-4 < z < -2.09999999999999985e-202 or 2.0000000000000001e-203 < z < 1.9000000000000001e-174Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 99.5%
Taylor expanded in z around 0 97.1%
Taylor expanded in x around 0 71.6%
*-commutative71.6%
Simplified71.6%
if -2.09999999999999985e-202 < z < 2.0000000000000001e-203 or 1.9000000000000001e-174 < z < 0.5Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 60.9%
sub-neg60.9%
distribute-rgt-in60.9%
metadata-eval60.9%
distribute-lft-neg-in60.9%
associate-+r+60.9%
metadata-eval60.9%
distribute-rgt-neg-in60.9%
metadata-eval60.9%
Simplified60.9%
Taylor expanded in z around 0 60.9%
*-commutative60.9%
Simplified60.9%
Final simplification80.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* (- y x) z))))
(if (<= z -9.5e-5)
t_0
(if (<= z -1.85e-202)
(* y 4.0)
(if (<= z 2e-203)
(* x -3.0)
(if (<= z 1.75e-174)
(* y 4.0)
(if (<= z 750000.0) (* x (+ -3.0 (* z 6.0))) t_0)))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -9.5e-5) {
tmp = t_0;
} else if (z <= -1.85e-202) {
tmp = y * 4.0;
} else if (z <= 2e-203) {
tmp = x * -3.0;
} else if (z <= 1.75e-174) {
tmp = y * 4.0;
} else if (z <= 750000.0) {
tmp = x * (-3.0 + (z * 6.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 <= (-9.5d-5)) then
tmp = t_0
else if (z <= (-1.85d-202)) then
tmp = y * 4.0d0
else if (z <= 2d-203) then
tmp = x * (-3.0d0)
else if (z <= 1.75d-174) then
tmp = y * 4.0d0
else if (z <= 750000.0d0) then
tmp = x * ((-3.0d0) + (z * 6.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 <= -9.5e-5) {
tmp = t_0;
} else if (z <= -1.85e-202) {
tmp = y * 4.0;
} else if (z <= 2e-203) {
tmp = x * -3.0;
} else if (z <= 1.75e-174) {
tmp = y * 4.0;
} else if (z <= 750000.0) {
tmp = x * (-3.0 + (z * 6.0));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * ((y - x) * z) tmp = 0 if z <= -9.5e-5: tmp = t_0 elif z <= -1.85e-202: tmp = y * 4.0 elif z <= 2e-203: tmp = x * -3.0 elif z <= 1.75e-174: tmp = y * 4.0 elif z <= 750000.0: tmp = x * (-3.0 + (z * 6.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 <= -9.5e-5) tmp = t_0; elseif (z <= -1.85e-202) tmp = Float64(y * 4.0); elseif (z <= 2e-203) tmp = Float64(x * -3.0); elseif (z <= 1.75e-174) tmp = Float64(y * 4.0); elseif (z <= 750000.0) tmp = Float64(x * Float64(-3.0 + Float64(z * 6.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 <= -9.5e-5) tmp = t_0; elseif (z <= -1.85e-202) tmp = y * 4.0; elseif (z <= 2e-203) tmp = x * -3.0; elseif (z <= 1.75e-174) tmp = y * 4.0; elseif (z <= 750000.0) tmp = x * (-3.0 + (z * 6.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, -9.5e-5], t$95$0, If[LessEqual[z, -1.85e-202], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2e-203], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.75e-174], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 750000.0], N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $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 -9.5 \cdot 10^{-5}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -1.85 \cdot 10^{-202}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-203}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{-174}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 750000:\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -9.5000000000000005e-5 or 7.5e5 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
+-commutative99.7%
*-commutative99.7%
associate-*r*99.7%
fma-define99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 96.6%
if -9.5000000000000005e-5 < z < -1.84999999999999995e-202 or 2.0000000000000001e-203 < z < 1.74999999999999994e-174Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 99.5%
Taylor expanded in z around 0 97.1%
Taylor expanded in x around 0 71.6%
*-commutative71.6%
Simplified71.6%
if -1.84999999999999995e-202 < z < 2.0000000000000001e-203Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 64.7%
sub-neg64.7%
distribute-rgt-in64.7%
metadata-eval64.7%
distribute-lft-neg-in64.7%
associate-+r+64.7%
metadata-eval64.7%
distribute-rgt-neg-in64.7%
metadata-eval64.7%
Simplified64.7%
Taylor expanded in z around 0 64.7%
*-commutative64.7%
Simplified64.7%
if 1.74999999999999994e-174 < z < 7.5e5Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 58.8%
sub-neg58.8%
distribute-rgt-in58.8%
metadata-eval58.8%
distribute-lft-neg-in58.8%
associate-+r+58.8%
metadata-eval58.8%
distribute-rgt-neg-in58.8%
metadata-eval58.8%
Simplified58.8%
Final simplification80.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))))
(if (<= z -250.0)
t_0
(if (<= z -3.3e-202)
(* y 4.0)
(if (<= z 2.1e-203)
(* x -3.0)
(if (<= z 2e-174) (* y 4.0) (if (<= z 0.5) (* x -3.0) t_0)))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double tmp;
if (z <= -250.0) {
tmp = t_0;
} else if (z <= -3.3e-202) {
tmp = y * 4.0;
} else if (z <= 2.1e-203) {
tmp = x * -3.0;
} else if (z <= 2e-174) {
tmp = y * 4.0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (-6.0d0) * (y * z)
if (z <= (-250.0d0)) then
tmp = t_0
else if (z <= (-3.3d-202)) then
tmp = y * 4.0d0
else if (z <= 2.1d-203) then
tmp = x * (-3.0d0)
else if (z <= 2d-174) then
tmp = y * 4.0d0
else if (z <= 0.5d0) then
tmp = x * (-3.0d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double tmp;
if (z <= -250.0) {
tmp = t_0;
} else if (z <= -3.3e-202) {
tmp = y * 4.0;
} else if (z <= 2.1e-203) {
tmp = x * -3.0;
} else if (z <= 2e-174) {
tmp = y * 4.0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * (y * z) tmp = 0 if z <= -250.0: tmp = t_0 elif z <= -3.3e-202: tmp = y * 4.0 elif z <= 2.1e-203: tmp = x * -3.0 elif z <= 2e-174: tmp = y * 4.0 elif z <= 0.5: tmp = x * -3.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(y * z)) tmp = 0.0 if (z <= -250.0) tmp = t_0; elseif (z <= -3.3e-202) tmp = Float64(y * 4.0); elseif (z <= 2.1e-203) tmp = Float64(x * -3.0); elseif (z <= 2e-174) tmp = Float64(y * 4.0); elseif (z <= 0.5) tmp = Float64(x * -3.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * (y * z); tmp = 0.0; if (z <= -250.0) tmp = t_0; elseif (z <= -3.3e-202) tmp = y * 4.0; elseif (z <= 2.1e-203) tmp = x * -3.0; elseif (z <= 2e-174) tmp = y * 4.0; elseif (z <= 0.5) tmp = x * -3.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -250.0], t$95$0, If[LessEqual[z, -3.3e-202], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.1e-203], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2e-174], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.5], N[(x * -3.0), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -250:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -3.3 \cdot 10^{-202}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-203}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-174}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -250 or 0.5 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
+-commutative99.7%
*-commutative99.7%
associate-*r*99.7%
fma-define99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 98.0%
Taylor expanded in y around inf 56.2%
if -250 < z < -3.29999999999999989e-202 or 2.10000000000000002e-203 < z < 2e-174Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 99.4%
Taylor expanded in z around 0 90.7%
Taylor expanded in x around 0 66.0%
*-commutative66.0%
Simplified66.0%
if -3.29999999999999989e-202 < z < 2.10000000000000002e-203 or 2e-174 < z < 0.5Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 60.9%
sub-neg60.9%
distribute-rgt-in60.9%
metadata-eval60.9%
distribute-lft-neg-in60.9%
associate-+r+60.9%
metadata-eval60.9%
distribute-rgt-neg-in60.9%
metadata-eval60.9%
Simplified60.9%
Taylor expanded in z around 0 60.9%
*-commutative60.9%
Simplified60.9%
Final simplification59.5%
(FPCore (x y z) :precision binary64 (if (or (<= x -5.1e+42) (not (<= x 1.65e-18))) (* x (+ -3.0 (* z 6.0))) (* y (+ 4.0 (* z -6.0)))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -5.1e+42) || !(x <= 1.65e-18)) {
tmp = x * (-3.0 + (z * 6.0));
} else {
tmp = y * (4.0 + (z * -6.0));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-5.1d+42)) .or. (.not. (x <= 1.65d-18))) then
tmp = x * ((-3.0d0) + (z * 6.0d0))
else
tmp = y * (4.0d0 + (z * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -5.1e+42) || !(x <= 1.65e-18)) {
tmp = x * (-3.0 + (z * 6.0));
} else {
tmp = y * (4.0 + (z * -6.0));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -5.1e+42) or not (x <= 1.65e-18): tmp = x * (-3.0 + (z * 6.0)) else: tmp = y * (4.0 + (z * -6.0)) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -5.1e+42) || !(x <= 1.65e-18)) tmp = Float64(x * Float64(-3.0 + Float64(z * 6.0))); else tmp = Float64(y * Float64(4.0 + Float64(z * -6.0))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -5.1e+42) || ~((x <= 1.65e-18))) tmp = x * (-3.0 + (z * 6.0)); else tmp = y * (4.0 + (z * -6.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -5.1e+42], N[Not[LessEqual[x, 1.65e-18]], $MachinePrecision]], N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(4.0 + N[(z * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.1 \cdot 10^{+42} \lor \neg \left(x \leq 1.65 \cdot 10^{-18}\right):\\
\;\;\;\;x \cdot \left(-3 + z \cdot 6\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(4 + z \cdot -6\right)\\
\end{array}
\end{array}
if x < -5.0999999999999999e42 or 1.6500000000000001e-18 < x Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 81.2%
sub-neg81.2%
distribute-rgt-in81.2%
metadata-eval81.2%
distribute-lft-neg-in81.2%
associate-+r+81.3%
metadata-eval81.3%
distribute-rgt-neg-in81.3%
metadata-eval81.3%
Simplified81.3%
if -5.0999999999999999e42 < x < 1.6500000000000001e-18Initial program 99.5%
+-commutative99.5%
associate-*l*99.7%
fma-define99.7%
sub-neg99.7%
distribute-rgt-in99.8%
metadata-eval99.8%
metadata-eval99.8%
distribute-lft-neg-out99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 79.8%
Final simplification80.5%
(FPCore (x y z) :precision binary64 (if (<= z -0.65) (* -6.0 (* (- y x) z)) (if (<= z 0.64) (+ x (* (- y x) 4.0)) (* (- y x) (* z -6.0)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.65) {
tmp = -6.0 * ((y - x) * z);
} else if (z <= 0.64) {
tmp = x + ((y - x) * 4.0);
} else {
tmp = (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.65d0)) then
tmp = (-6.0d0) * ((y - x) * z)
else if (z <= 0.64d0) then
tmp = x + ((y - x) * 4.0d0)
else
tmp = (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.65) {
tmp = -6.0 * ((y - x) * z);
} else if (z <= 0.64) {
tmp = x + ((y - x) * 4.0);
} else {
tmp = (y - x) * (z * -6.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.65: tmp = -6.0 * ((y - x) * z) elif z <= 0.64: tmp = x + ((y - x) * 4.0) else: tmp = (y - x) * (z * -6.0) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.65) tmp = Float64(-6.0 * Float64(Float64(y - x) * z)); elseif (z <= 0.64) tmp = Float64(x + Float64(Float64(y - x) * 4.0)); else tmp = 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.65) tmp = -6.0 * ((y - x) * z); elseif (z <= 0.64) tmp = x + ((y - x) * 4.0); else tmp = (y - x) * (z * -6.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.65], N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.64], N[(x + N[(N[(y - x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision], N[(N[(y - x), $MachinePrecision] * N[(z * -6.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.65:\\
\;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{elif}\;z \leq 0.64:\\
\;\;\;\;x + \left(y - x\right) \cdot 4\\
\mathbf{else}:\\
\;\;\;\;\left(y - x\right) \cdot \left(z \cdot -6\right)\\
\end{array}
\end{array}
if z < -0.650000000000000022Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
+-commutative99.6%
*-commutative99.6%
associate-*r*99.8%
fma-define99.9%
Applied egg-rr99.9%
Taylor expanded in z around inf 96.7%
if -0.650000000000000022 < z < 0.640000000000000013Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in z around 0 97.3%
if 0.640000000000000013 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
+-commutative99.8%
*-commutative99.8%
associate-*r*99.6%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 97.3%
*-commutative97.3%
*-commutative97.3%
associate-*l*97.4%
*-commutative97.4%
Simplified97.4%
Final simplification97.2%
(FPCore (x y z) :precision binary64 (if (<= z -0.65) (* -6.0 (* (- y x) z)) (if (<= z 0.58) (+ (* y 4.0) (* x -3.0)) (* (- y x) (* z -6.0)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.65) {
tmp = -6.0 * ((y - x) * z);
} else if (z <= 0.58) {
tmp = (y * 4.0) + (x * -3.0);
} else {
tmp = (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.65d0)) then
tmp = (-6.0d0) * ((y - x) * z)
else if (z <= 0.58d0) then
tmp = (y * 4.0d0) + (x * (-3.0d0))
else
tmp = (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.65) {
tmp = -6.0 * ((y - x) * z);
} else if (z <= 0.58) {
tmp = (y * 4.0) + (x * -3.0);
} else {
tmp = (y - x) * (z * -6.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.65: tmp = -6.0 * ((y - x) * z) elif z <= 0.58: tmp = (y * 4.0) + (x * -3.0) else: tmp = (y - x) * (z * -6.0) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.65) tmp = Float64(-6.0 * Float64(Float64(y - x) * z)); elseif (z <= 0.58) tmp = Float64(Float64(y * 4.0) + Float64(x * -3.0)); else tmp = 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.65) tmp = -6.0 * ((y - x) * z); elseif (z <= 0.58) tmp = (y * 4.0) + (x * -3.0); else tmp = (y - x) * (z * -6.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.65], N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.58], N[(N[(y * 4.0), $MachinePrecision] + N[(x * -3.0), $MachinePrecision]), $MachinePrecision], N[(N[(y - x), $MachinePrecision] * N[(z * -6.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.65:\\
\;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{elif}\;z \leq 0.58:\\
\;\;\;\;y \cdot 4 + x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;\left(y - x\right) \cdot \left(z \cdot -6\right)\\
\end{array}
\end{array}
if z < -0.650000000000000022Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
+-commutative99.6%
*-commutative99.6%
associate-*r*99.8%
fma-define99.9%
Applied egg-rr99.9%
Taylor expanded in z around inf 96.7%
if -0.650000000000000022 < z < 0.57999999999999996Initial program 99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around 0 99.6%
Taylor expanded in z around 0 97.4%
if 0.57999999999999996 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
+-commutative99.8%
*-commutative99.8%
associate-*r*99.6%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 97.3%
*-commutative97.3%
*-commutative97.3%
associate-*l*97.4%
*-commutative97.4%
Simplified97.4%
Final simplification97.2%
(FPCore (x y z) :precision binary64 (if (or (<= y -1040000000000.0) (not (<= y 1.35e+39))) (* y 4.0) (* x -3.0)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -1040000000000.0) || !(y <= 1.35e+39)) {
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 <= (-1040000000000.0d0)) .or. (.not. (y <= 1.35d+39))) 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 <= -1040000000000.0) || !(y <= 1.35e+39)) {
tmp = y * 4.0;
} else {
tmp = x * -3.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -1040000000000.0) or not (y <= 1.35e+39): tmp = y * 4.0 else: tmp = x * -3.0 return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -1040000000000.0) || !(y <= 1.35e+39)) 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 <= -1040000000000.0) || ~((y <= 1.35e+39))) tmp = y * 4.0; else tmp = x * -3.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -1040000000000.0], N[Not[LessEqual[y, 1.35e+39]], $MachinePrecision]], N[(y * 4.0), $MachinePrecision], N[(x * -3.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1040000000000 \lor \neg \left(y \leq 1.35 \cdot 10^{+39}\right):\\
\;\;\;\;y \cdot 4\\
\mathbf{else}:\\
\;\;\;\;x \cdot -3\\
\end{array}
\end{array}
if y < -1.04e12 or 1.35000000000000002e39 < y Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 94.1%
Taylor expanded in z around 0 51.8%
Taylor expanded in x around 0 43.8%
*-commutative43.8%
Simplified43.8%
if -1.04e12 < y < 1.35000000000000002e39Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 74.5%
sub-neg74.5%
distribute-rgt-in74.5%
metadata-eval74.5%
distribute-lft-neg-in74.5%
associate-+r+74.5%
metadata-eval74.5%
distribute-rgt-neg-in74.5%
metadata-eval74.5%
Simplified74.5%
Taylor expanded in z around 0 42.4%
*-commutative42.4%
Simplified42.4%
Final simplification43.1%
(FPCore (x y z) :precision binary64 (+ x (* (- 0.6666666666666666 z) (+ (* x -6.0) (* y 6.0)))))
double code(double x, double y, double z) {
return x + ((0.6666666666666666 - z) * ((x * -6.0) + (y * 6.0)));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + ((0.6666666666666666d0 - z) * ((x * (-6.0d0)) + (y * 6.0d0)))
end function
public static double code(double x, double y, double z) {
return x + ((0.6666666666666666 - z) * ((x * -6.0) + (y * 6.0)));
}
def code(x, y, z): return x + ((0.6666666666666666 - z) * ((x * -6.0) + (y * 6.0)))
function code(x, y, z) return Float64(x + Float64(Float64(0.6666666666666666 - z) * Float64(Float64(x * -6.0) + Float64(y * 6.0)))) end
function tmp = code(x, y, z) tmp = x + ((0.6666666666666666 - z) * ((x * -6.0) + (y * 6.0))); end
code[x_, y_, z_] := N[(x + N[(N[(0.6666666666666666 - z), $MachinePrecision] * N[(N[(x * -6.0), $MachinePrecision] + N[(y * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(0.6666666666666666 - z\right) \cdot \left(x \cdot -6 + y \cdot 6\right)
\end{array}
Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 99.6%
Final simplification99.6%
(FPCore (x y z) :precision binary64 (+ x (* (- 0.6666666666666666 z) (* (- y x) 6.0))))
double code(double x, double y, double z) {
return x + ((0.6666666666666666 - z) * ((y - x) * 6.0));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + ((0.6666666666666666d0 - z) * ((y - x) * 6.0d0))
end function
public static double code(double x, double y, double z) {
return x + ((0.6666666666666666 - z) * ((y - x) * 6.0));
}
def code(x, y, z): return x + ((0.6666666666666666 - z) * ((y - x) * 6.0))
function code(x, y, z) return Float64(x + Float64(Float64(0.6666666666666666 - z) * Float64(Float64(y - x) * 6.0))) end
function tmp = code(x, y, z) tmp = x + ((0.6666666666666666 - z) * ((y - x) * 6.0)); end
code[x_, y_, z_] := N[(x + N[(N[(0.6666666666666666 - z), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(0.6666666666666666 - z\right) \cdot \left(\left(y - x\right) \cdot 6\right)
\end{array}
Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Final simplification99.5%
(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.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 50.2%
sub-neg50.2%
distribute-rgt-in50.2%
metadata-eval50.2%
distribute-lft-neg-in50.2%
associate-+r+50.2%
metadata-eval50.2%
distribute-rgt-neg-in50.2%
metadata-eval50.2%
Simplified50.2%
Taylor expanded in z around 0 26.3%
*-commutative26.3%
Simplified26.3%
Final simplification26.3%
(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.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 53.0%
associate-*r*53.0%
Simplified53.0%
Taylor expanded in x around inf 2.6%
Final simplification2.6%
herbie shell --seed 2024078
(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))))