
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) z)))
double code(double x, double y, double z) {
return x + (((y - x) * 6.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) * z)
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * z);
}
def code(x, y, z): return x + (((y - x) * 6.0) * z)
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * z)) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * z); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot z
\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) z)))
double code(double x, double y, double z) {
return x + (((y - x) * 6.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) * z)
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * z);
}
def code(x, y, z): return x + (((y - x) * 6.0) * z)
function code(x, y, z) return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * z)) end
function tmp = code(x, y, z) tmp = x + (((y - x) * 6.0) * z); end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot z
\end{array}
(FPCore (x y z) :precision binary64 (fma (fma z -6.0 1.0) x (* (* z 6.0) y)))
double code(double x, double y, double z) {
return fma(fma(z, -6.0, 1.0), x, ((z * 6.0) * y));
}
function code(x, y, z) return fma(fma(z, -6.0, 1.0), x, Float64(Float64(z * 6.0) * y)) end
code[x_, y_, z_] := N[(N[(z * -6.0 + 1.0), $MachinePrecision] * x + N[(N[(z * 6.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\mathsf{fma}\left(z, -6, 1\right), x, \left(z \cdot 6\right) \cdot y\right)
\end{array}
Initial program 99.8%
lift--.f64N/A
associate-*l*N/A
*-commutativeN/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-lft-inN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lower-*.f6499.8
Applied egg-rr99.8%
lift-*.f64N/A
lift-neg.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-+r+N/A
lift-neg.f64N/A
distribute-rgt-neg-outN/A
unsub-negN/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
distribute-rgt1-inN/A
lower-fma.f64N/A
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 6.0 (* z y))))
(if (<= z -4.5e+190)
t_0
(if (<= z -7e-5)
(* x (* z -6.0))
(if (<= z 2.75e-39)
x
(if (<= z 1.1e+91)
t_0
(if (<= z 3e+230) (* z (* -6.0 x)) (* (* z 6.0) y))))))))
double code(double x, double y, double z) {
double t_0 = 6.0 * (z * y);
double tmp;
if (z <= -4.5e+190) {
tmp = t_0;
} else if (z <= -7e-5) {
tmp = x * (z * -6.0);
} else if (z <= 2.75e-39) {
tmp = x;
} else if (z <= 1.1e+91) {
tmp = t_0;
} else if (z <= 3e+230) {
tmp = z * (-6.0 * x);
} else {
tmp = (z * 6.0) * y;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = 6.0d0 * (z * y)
if (z <= (-4.5d+190)) then
tmp = t_0
else if (z <= (-7d-5)) then
tmp = x * (z * (-6.0d0))
else if (z <= 2.75d-39) then
tmp = x
else if (z <= 1.1d+91) then
tmp = t_0
else if (z <= 3d+230) then
tmp = z * ((-6.0d0) * x)
else
tmp = (z * 6.0d0) * y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 6.0 * (z * y);
double tmp;
if (z <= -4.5e+190) {
tmp = t_0;
} else if (z <= -7e-5) {
tmp = x * (z * -6.0);
} else if (z <= 2.75e-39) {
tmp = x;
} else if (z <= 1.1e+91) {
tmp = t_0;
} else if (z <= 3e+230) {
tmp = z * (-6.0 * x);
} else {
tmp = (z * 6.0) * y;
}
return tmp;
}
def code(x, y, z): t_0 = 6.0 * (z * y) tmp = 0 if z <= -4.5e+190: tmp = t_0 elif z <= -7e-5: tmp = x * (z * -6.0) elif z <= 2.75e-39: tmp = x elif z <= 1.1e+91: tmp = t_0 elif z <= 3e+230: tmp = z * (-6.0 * x) else: tmp = (z * 6.0) * y return tmp
function code(x, y, z) t_0 = Float64(6.0 * Float64(z * y)) tmp = 0.0 if (z <= -4.5e+190) tmp = t_0; elseif (z <= -7e-5) tmp = Float64(x * Float64(z * -6.0)); elseif (z <= 2.75e-39) tmp = x; elseif (z <= 1.1e+91) tmp = t_0; elseif (z <= 3e+230) tmp = Float64(z * Float64(-6.0 * x)); else tmp = Float64(Float64(z * 6.0) * y); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 6.0 * (z * y); tmp = 0.0; if (z <= -4.5e+190) tmp = t_0; elseif (z <= -7e-5) tmp = x * (z * -6.0); elseif (z <= 2.75e-39) tmp = x; elseif (z <= 1.1e+91) tmp = t_0; elseif (z <= 3e+230) tmp = z * (-6.0 * x); else tmp = (z * 6.0) * y; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(6.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.5e+190], t$95$0, If[LessEqual[z, -7e-5], N[(x * N[(z * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.75e-39], x, If[LessEqual[z, 1.1e+91], t$95$0, If[LessEqual[z, 3e+230], N[(z * N[(-6.0 * x), $MachinePrecision]), $MachinePrecision], N[(N[(z * 6.0), $MachinePrecision] * y), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(z \cdot y\right)\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{+190}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -7 \cdot 10^{-5}:\\
\;\;\;\;x \cdot \left(z \cdot -6\right)\\
\mathbf{elif}\;z \leq 2.75 \cdot 10^{-39}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+91}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+230}:\\
\;\;\;\;z \cdot \left(-6 \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot 6\right) \cdot y\\
\end{array}
\end{array}
if z < -4.4999999999999999e190 or 2.75000000000000009e-39 < z < 1.1e91Initial program 99.8%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6465.9
Simplified65.9%
if -4.4999999999999999e190 < z < -6.9999999999999994e-5Initial program 99.6%
Taylor expanded in z around inf
associate-*r*N/A
distribute-lft-out--N/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-inN/A
mul-1-negN/A
distribute-rgt-out--N/A
distribute-lft-out--N/A
neg-mul-1N/A
neg-sub0N/A
associate-+l-N/A
neg-sub0N/A
mul-1-negN/A
*-lft-identityN/A
*-inversesN/A
associate-*l/N/A
associate-*r/N/A
associate-*r/N/A
*-rgt-identityN/A
Simplified96.2%
Taylor expanded in x around inf
metadata-evalN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
lower-*.f6453.8
Simplified53.8%
associate-*r*N/A
lower-*.f64N/A
lower-*.f6453.8
Applied egg-rr53.8%
if -6.9999999999999994e-5 < z < 2.75000000000000009e-39Initial program 99.8%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6475.5
Simplified75.5%
lift-*.f64N/A
*-commutativeN/A
distribute-rgt1-inN/A
lower-*.f64N/A
lift-*.f64N/A
lower-fma.f6475.5
Applied egg-rr75.5%
Taylor expanded in z around 0
Simplified75.2%
*-lft-identity75.2
Applied egg-rr75.2%
if 1.1e91 < z < 3.00000000000000008e230Initial program 99.8%
Taylor expanded in z around inf
associate-*r*N/A
distribute-lft-out--N/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-inN/A
mul-1-negN/A
distribute-rgt-out--N/A
distribute-lft-out--N/A
neg-mul-1N/A
neg-sub0N/A
associate-+l-N/A
neg-sub0N/A
mul-1-negN/A
*-lft-identityN/A
*-inversesN/A
associate-*l/N/A
associate-*r/N/A
associate-*r/N/A
*-rgt-identityN/A
Simplified99.8%
Taylor expanded in x around inf
metadata-evalN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
lower-*.f6472.1
Simplified72.1%
if 3.00000000000000008e230 < z Initial program 99.9%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6481.4
Simplified81.4%
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f6481.5
Applied egg-rr81.5%
Final simplification69.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 6.0 (* z y))) (t_1 (* z (* -6.0 x))))
(if (<= z -3.2e+188)
t_0
(if (<= z -7e-5)
t_1
(if (<= z 2e-39)
x
(if (<= z 1.5e+91) t_0 (if (<= z 8.2e+230) t_1 (* (* z 6.0) y))))))))
double code(double x, double y, double z) {
double t_0 = 6.0 * (z * y);
double t_1 = z * (-6.0 * x);
double tmp;
if (z <= -3.2e+188) {
tmp = t_0;
} else if (z <= -7e-5) {
tmp = t_1;
} else if (z <= 2e-39) {
tmp = x;
} else if (z <= 1.5e+91) {
tmp = t_0;
} else if (z <= 8.2e+230) {
tmp = t_1;
} else {
tmp = (z * 6.0) * y;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 6.0d0 * (z * y)
t_1 = z * ((-6.0d0) * x)
if (z <= (-3.2d+188)) then
tmp = t_0
else if (z <= (-7d-5)) then
tmp = t_1
else if (z <= 2d-39) then
tmp = x
else if (z <= 1.5d+91) then
tmp = t_0
else if (z <= 8.2d+230) then
tmp = t_1
else
tmp = (z * 6.0d0) * y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 6.0 * (z * y);
double t_1 = z * (-6.0 * x);
double tmp;
if (z <= -3.2e+188) {
tmp = t_0;
} else if (z <= -7e-5) {
tmp = t_1;
} else if (z <= 2e-39) {
tmp = x;
} else if (z <= 1.5e+91) {
tmp = t_0;
} else if (z <= 8.2e+230) {
tmp = t_1;
} else {
tmp = (z * 6.0) * y;
}
return tmp;
}
def code(x, y, z): t_0 = 6.0 * (z * y) t_1 = z * (-6.0 * x) tmp = 0 if z <= -3.2e+188: tmp = t_0 elif z <= -7e-5: tmp = t_1 elif z <= 2e-39: tmp = x elif z <= 1.5e+91: tmp = t_0 elif z <= 8.2e+230: tmp = t_1 else: tmp = (z * 6.0) * y return tmp
function code(x, y, z) t_0 = Float64(6.0 * Float64(z * y)) t_1 = Float64(z * Float64(-6.0 * x)) tmp = 0.0 if (z <= -3.2e+188) tmp = t_0; elseif (z <= -7e-5) tmp = t_1; elseif (z <= 2e-39) tmp = x; elseif (z <= 1.5e+91) tmp = t_0; elseif (z <= 8.2e+230) tmp = t_1; else tmp = Float64(Float64(z * 6.0) * y); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 6.0 * (z * y); t_1 = z * (-6.0 * x); tmp = 0.0; if (z <= -3.2e+188) tmp = t_0; elseif (z <= -7e-5) tmp = t_1; elseif (z <= 2e-39) tmp = x; elseif (z <= 1.5e+91) tmp = t_0; elseif (z <= 8.2e+230) tmp = t_1; else tmp = (z * 6.0) * y; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(6.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(z * N[(-6.0 * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.2e+188], t$95$0, If[LessEqual[z, -7e-5], t$95$1, If[LessEqual[z, 2e-39], x, If[LessEqual[z, 1.5e+91], t$95$0, If[LessEqual[z, 8.2e+230], t$95$1, N[(N[(z * 6.0), $MachinePrecision] * y), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(z \cdot y\right)\\
t_1 := z \cdot \left(-6 \cdot x\right)\\
\mathbf{if}\;z \leq -3.2 \cdot 10^{+188}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -7 \cdot 10^{-5}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-39}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+91}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{+230}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot 6\right) \cdot y\\
\end{array}
\end{array}
if z < -3.1999999999999997e188 or 1.99999999999999986e-39 < z < 1.50000000000000003e91Initial program 99.8%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6465.9
Simplified65.9%
if -3.1999999999999997e188 < z < -6.9999999999999994e-5 or 1.50000000000000003e91 < z < 8.20000000000000026e230Initial program 99.7%
Taylor expanded in z around inf
associate-*r*N/A
distribute-lft-out--N/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-inN/A
mul-1-negN/A
distribute-rgt-out--N/A
distribute-lft-out--N/A
neg-mul-1N/A
neg-sub0N/A
associate-+l-N/A
neg-sub0N/A
mul-1-negN/A
*-lft-identityN/A
*-inversesN/A
associate-*l/N/A
associate-*r/N/A
associate-*r/N/A
*-rgt-identityN/A
Simplified97.6%
Taylor expanded in x around inf
metadata-evalN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
lower-*.f6461.0
Simplified61.0%
if -6.9999999999999994e-5 < z < 1.99999999999999986e-39Initial program 99.8%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6475.5
Simplified75.5%
lift-*.f64N/A
*-commutativeN/A
distribute-rgt1-inN/A
lower-*.f64N/A
lift-*.f64N/A
lower-fma.f6475.5
Applied egg-rr75.5%
Taylor expanded in z around 0
Simplified75.2%
*-lft-identity75.2
Applied egg-rr75.2%
if 8.20000000000000026e230 < z Initial program 99.9%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6481.4
Simplified81.4%
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f6481.5
Applied egg-rr81.5%
Final simplification69.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 6.0 (* z y))) (t_1 (* z (* -6.0 x))))
(if (<= z -9.6e+185)
t_0
(if (<= z -7e-5)
t_1
(if (<= z 1.9e-39)
x
(if (<= z 2.55e+92) t_0 (if (<= z 1.08e+230) t_1 t_0)))))))
double code(double x, double y, double z) {
double t_0 = 6.0 * (z * y);
double t_1 = z * (-6.0 * x);
double tmp;
if (z <= -9.6e+185) {
tmp = t_0;
} else if (z <= -7e-5) {
tmp = t_1;
} else if (z <= 1.9e-39) {
tmp = x;
} else if (z <= 2.55e+92) {
tmp = t_0;
} else if (z <= 1.08e+230) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 6.0d0 * (z * y)
t_1 = z * ((-6.0d0) * x)
if (z <= (-9.6d+185)) then
tmp = t_0
else if (z <= (-7d-5)) then
tmp = t_1
else if (z <= 1.9d-39) then
tmp = x
else if (z <= 2.55d+92) then
tmp = t_0
else if (z <= 1.08d+230) then
tmp = t_1
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 6.0 * (z * y);
double t_1 = z * (-6.0 * x);
double tmp;
if (z <= -9.6e+185) {
tmp = t_0;
} else if (z <= -7e-5) {
tmp = t_1;
} else if (z <= 1.9e-39) {
tmp = x;
} else if (z <= 2.55e+92) {
tmp = t_0;
} else if (z <= 1.08e+230) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = 6.0 * (z * y) t_1 = z * (-6.0 * x) tmp = 0 if z <= -9.6e+185: tmp = t_0 elif z <= -7e-5: tmp = t_1 elif z <= 1.9e-39: tmp = x elif z <= 2.55e+92: tmp = t_0 elif z <= 1.08e+230: tmp = t_1 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(6.0 * Float64(z * y)) t_1 = Float64(z * Float64(-6.0 * x)) tmp = 0.0 if (z <= -9.6e+185) tmp = t_0; elseif (z <= -7e-5) tmp = t_1; elseif (z <= 1.9e-39) tmp = x; elseif (z <= 2.55e+92) tmp = t_0; elseif (z <= 1.08e+230) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = 6.0 * (z * y); t_1 = z * (-6.0 * x); tmp = 0.0; if (z <= -9.6e+185) tmp = t_0; elseif (z <= -7e-5) tmp = t_1; elseif (z <= 1.9e-39) tmp = x; elseif (z <= 2.55e+92) tmp = t_0; elseif (z <= 1.08e+230) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(6.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(z * N[(-6.0 * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.6e+185], t$95$0, If[LessEqual[z, -7e-5], t$95$1, If[LessEqual[z, 1.9e-39], x, If[LessEqual[z, 2.55e+92], t$95$0, If[LessEqual[z, 1.08e+230], t$95$1, t$95$0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(z \cdot y\right)\\
t_1 := z \cdot \left(-6 \cdot x\right)\\
\mathbf{if}\;z \leq -9.6 \cdot 10^{+185}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -7 \cdot 10^{-5}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-39}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.55 \cdot 10^{+92}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 1.08 \cdot 10^{+230}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -9.59999999999999956e185 or 1.9000000000000001e-39 < z < 2.5500000000000001e92 or 1.08e230 < z Initial program 99.8%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6470.3
Simplified70.3%
if -9.59999999999999956e185 < z < -6.9999999999999994e-5 or 2.5500000000000001e92 < z < 1.08e230Initial program 99.7%
Taylor expanded in z around inf
associate-*r*N/A
distribute-lft-out--N/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-inN/A
mul-1-negN/A
distribute-rgt-out--N/A
distribute-lft-out--N/A
neg-mul-1N/A
neg-sub0N/A
associate-+l-N/A
neg-sub0N/A
mul-1-negN/A
*-lft-identityN/A
*-inversesN/A
associate-*l/N/A
associate-*r/N/A
associate-*r/N/A
*-rgt-identityN/A
Simplified97.6%
Taylor expanded in x around inf
metadata-evalN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
lower-*.f6461.0
Simplified61.0%
if -6.9999999999999994e-5 < z < 1.9000000000000001e-39Initial program 99.8%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6475.5
Simplified75.5%
lift-*.f64N/A
*-commutativeN/A
distribute-rgt1-inN/A
lower-*.f64N/A
lift-*.f64N/A
lower-fma.f6475.5
Applied egg-rr75.5%
Taylor expanded in z around 0
Simplified75.2%
*-lft-identity75.2
Applied egg-rr75.2%
Final simplification69.7%
(FPCore (x y z) :precision binary64 (if (<= z -0.17) (* (* z -6.0) (- x y)) (if (<= z 0.17) (fma (* z 6.0) y x) (* z (* -6.0 (- x y))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.17) {
tmp = (z * -6.0) * (x - y);
} else if (z <= 0.17) {
tmp = fma((z * 6.0), y, x);
} else {
tmp = z * (-6.0 * (x - y));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (z <= -0.17) tmp = Float64(Float64(z * -6.0) * Float64(x - y)); elseif (z <= 0.17) tmp = fma(Float64(z * 6.0), y, x); else tmp = Float64(z * Float64(-6.0 * Float64(x - y))); end return tmp end
code[x_, y_, z_] := If[LessEqual[z, -0.17], N[(N[(z * -6.0), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.17], N[(N[(z * 6.0), $MachinePrecision] * y + x), $MachinePrecision], N[(z * N[(-6.0 * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.17:\\
\;\;\;\;\left(z \cdot -6\right) \cdot \left(x - y\right)\\
\mathbf{elif}\;z \leq 0.17:\\
\;\;\;\;\mathsf{fma}\left(z \cdot 6, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(-6 \cdot \left(x - y\right)\right)\\
\end{array}
\end{array}
if z < -0.170000000000000012Initial program 99.7%
Taylor expanded in z around inf
associate-*r*N/A
distribute-lft-out--N/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-inN/A
mul-1-negN/A
distribute-rgt-out--N/A
distribute-lft-out--N/A
neg-mul-1N/A
neg-sub0N/A
associate-+l-N/A
neg-sub0N/A
mul-1-negN/A
*-lft-identityN/A
*-inversesN/A
associate-*l/N/A
associate-*r/N/A
associate-*r/N/A
*-rgt-identityN/A
Simplified97.7%
if -0.170000000000000012 < z < 0.170000000000000012Initial program 99.8%
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f6499.9
Applied egg-rr99.9%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f6498.3
Simplified98.3%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lower-fma.f6498.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6498.4
Applied egg-rr98.4%
if 0.170000000000000012 < z Initial program 99.8%
Taylor expanded in z around inf
associate-*r*N/A
distribute-lft-out--N/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-inN/A
mul-1-negN/A
distribute-rgt-out--N/A
distribute-lft-out--N/A
neg-mul-1N/A
neg-sub0N/A
associate-+l-N/A
neg-sub0N/A
mul-1-negN/A
*-lft-identityN/A
*-inversesN/A
associate-*l/N/A
associate-*r/N/A
associate-*r/N/A
*-rgt-identityN/A
Simplified99.3%
lift--.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6499.3
Applied egg-rr99.3%
Final simplification98.4%
(FPCore (x y z) :precision binary64 (let* ((t_0 (* z (* -6.0 (- x y))))) (if (<= z -0.155) t_0 (if (<= z 0.17) (fma (* z 6.0) y x) t_0))))
double code(double x, double y, double z) {
double t_0 = z * (-6.0 * (x - y));
double tmp;
if (z <= -0.155) {
tmp = t_0;
} else if (z <= 0.17) {
tmp = fma((z * 6.0), y, x);
} else {
tmp = t_0;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(z * Float64(-6.0 * Float64(x - y))) tmp = 0.0 if (z <= -0.155) tmp = t_0; elseif (z <= 0.17) tmp = fma(Float64(z * 6.0), y, x); else tmp = t_0; end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(-6.0 * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.155], t$95$0, If[LessEqual[z, 0.17], N[(N[(z * 6.0), $MachinePrecision] * y + x), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(-6 \cdot \left(x - y\right)\right)\\
\mathbf{if}\;z \leq -0.155:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 0.17:\\
\;\;\;\;\mathsf{fma}\left(z \cdot 6, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -0.154999999999999999 or 0.170000000000000012 < z Initial program 99.7%
Taylor expanded in z around inf
associate-*r*N/A
distribute-lft-out--N/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
metadata-evalN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-inN/A
mul-1-negN/A
distribute-rgt-out--N/A
distribute-lft-out--N/A
neg-mul-1N/A
neg-sub0N/A
associate-+l-N/A
neg-sub0N/A
mul-1-negN/A
*-lft-identityN/A
*-inversesN/A
associate-*l/N/A
associate-*r/N/A
associate-*r/N/A
*-rgt-identityN/A
Simplified98.4%
lift--.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6498.4
Applied egg-rr98.4%
if -0.154999999999999999 < z < 0.170000000000000012Initial program 99.8%
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f6499.9
Applied egg-rr99.9%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f6498.3
Simplified98.3%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lower-fma.f6498.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6498.4
Applied egg-rr98.4%
Final simplification98.4%
(FPCore (x y z) :precision binary64 (let* ((t_0 (fma (* z x) -6.0 x))) (if (<= x -5.6e+42) t_0 (if (<= x 3.1e+74) (fma (* z 6.0) y x) t_0))))
double code(double x, double y, double z) {
double t_0 = fma((z * x), -6.0, x);
double tmp;
if (x <= -5.6e+42) {
tmp = t_0;
} else if (x <= 3.1e+74) {
tmp = fma((z * 6.0), y, x);
} else {
tmp = t_0;
}
return tmp;
}
function code(x, y, z) t_0 = fma(Float64(z * x), -6.0, x) tmp = 0.0 if (x <= -5.6e+42) tmp = t_0; elseif (x <= 3.1e+74) tmp = fma(Float64(z * 6.0), y, x); else tmp = t_0; end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(z * x), $MachinePrecision] * -6.0 + x), $MachinePrecision]}, If[LessEqual[x, -5.6e+42], t$95$0, If[LessEqual[x, 3.1e+74], N[(N[(z * 6.0), $MachinePrecision] * y + x), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(z \cdot x, -6, x\right)\\
\mathbf{if}\;x \leq -5.6 \cdot 10^{+42}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 3.1 \cdot 10^{+74}:\\
\;\;\;\;\mathsf{fma}\left(z \cdot 6, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -5.5999999999999999e42 or 3.10000000000000021e74 < x Initial program 99.8%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6493.4
Simplified93.4%
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6493.4
Applied egg-rr93.4%
if -5.5999999999999999e42 < x < 3.10000000000000021e74Initial program 99.7%
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f6499.7
Applied egg-rr99.7%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f6485.4
Simplified85.4%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lower-fma.f6485.5
lift-*.f64N/A
*-commutativeN/A
lower-*.f6485.5
Applied egg-rr85.5%
(FPCore (x y z) :precision binary64 (let* ((t_0 (* (fma z -6.0 1.0) x))) (if (<= x -8e+40) t_0 (if (<= x 5.4e+82) (fma (* z 6.0) y x) t_0))))
double code(double x, double y, double z) {
double t_0 = fma(z, -6.0, 1.0) * x;
double tmp;
if (x <= -8e+40) {
tmp = t_0;
} else if (x <= 5.4e+82) {
tmp = fma((z * 6.0), y, x);
} else {
tmp = t_0;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(fma(z, -6.0, 1.0) * x) tmp = 0.0 if (x <= -8e+40) tmp = t_0; elseif (x <= 5.4e+82) tmp = fma(Float64(z * 6.0), y, x); else tmp = t_0; end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(z * -6.0 + 1.0), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -8e+40], t$95$0, If[LessEqual[x, 5.4e+82], N[(N[(z * 6.0), $MachinePrecision] * y + x), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(z, -6, 1\right) \cdot x\\
\mathbf{if}\;x \leq -8 \cdot 10^{+40}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 5.4 \cdot 10^{+82}:\\
\;\;\;\;\mathsf{fma}\left(z \cdot 6, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -8.00000000000000024e40 or 5.3999999999999999e82 < x Initial program 99.8%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6493.4
Simplified93.4%
lift-*.f64N/A
*-commutativeN/A
distribute-rgt1-inN/A
lower-*.f64N/A
lift-*.f64N/A
lower-fma.f6493.4
Applied egg-rr93.4%
if -8.00000000000000024e40 < x < 5.3999999999999999e82Initial program 99.7%
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f6499.7
Applied egg-rr99.7%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f6485.4
Simplified85.4%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lower-fma.f6485.5
lift-*.f64N/A
*-commutativeN/A
lower-*.f6485.5
Applied egg-rr85.5%
(FPCore (x y z) :precision binary64 (if (<= y -3.5e+60) (* (* z 6.0) y) (if (<= y 9.5e+83) (* (fma z -6.0 1.0) x) (* 6.0 (* z y)))))
double code(double x, double y, double z) {
double tmp;
if (y <= -3.5e+60) {
tmp = (z * 6.0) * y;
} else if (y <= 9.5e+83) {
tmp = fma(z, -6.0, 1.0) * x;
} else {
tmp = 6.0 * (z * y);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (y <= -3.5e+60) tmp = Float64(Float64(z * 6.0) * y); elseif (y <= 9.5e+83) tmp = Float64(fma(z, -6.0, 1.0) * x); else tmp = Float64(6.0 * Float64(z * y)); end return tmp end
code[x_, y_, z_] := If[LessEqual[y, -3.5e+60], N[(N[(z * 6.0), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, 9.5e+83], N[(N[(z * -6.0 + 1.0), $MachinePrecision] * x), $MachinePrecision], N[(6.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.5 \cdot 10^{+60}:\\
\;\;\;\;\left(z \cdot 6\right) \cdot y\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{+83}:\\
\;\;\;\;\mathsf{fma}\left(z, -6, 1\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;6 \cdot \left(z \cdot y\right)\\
\end{array}
\end{array}
if y < -3.5000000000000002e60Initial program 99.8%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6482.6
Simplified82.6%
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f6482.8
Applied egg-rr82.8%
if -3.5000000000000002e60 < y < 9.5000000000000002e83Initial program 99.8%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6479.5
Simplified79.5%
lift-*.f64N/A
*-commutativeN/A
distribute-rgt1-inN/A
lower-*.f64N/A
lift-*.f64N/A
lower-fma.f6479.5
Applied egg-rr79.5%
if 9.5000000000000002e83 < y Initial program 99.7%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6476.6
Simplified76.6%
Final simplification79.7%
(FPCore (x y z) :precision binary64 (let* ((t_0 (* 6.0 (* z y)))) (if (<= z -5.5e-7) t_0 (if (<= z 2.2e-39) x t_0))))
double code(double x, double y, double z) {
double t_0 = 6.0 * (z * y);
double tmp;
if (z <= -5.5e-7) {
tmp = t_0;
} else if (z <= 2.2e-39) {
tmp = x;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = 6.0d0 * (z * y)
if (z <= (-5.5d-7)) then
tmp = t_0
else if (z <= 2.2d-39) then
tmp = x
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 6.0 * (z * y);
double tmp;
if (z <= -5.5e-7) {
tmp = t_0;
} else if (z <= 2.2e-39) {
tmp = x;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = 6.0 * (z * y) tmp = 0 if z <= -5.5e-7: tmp = t_0 elif z <= 2.2e-39: tmp = x else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(6.0 * Float64(z * y)) tmp = 0.0 if (z <= -5.5e-7) tmp = t_0; elseif (z <= 2.2e-39) tmp = x; else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = 6.0 * (z * y); tmp = 0.0; if (z <= -5.5e-7) tmp = t_0; elseif (z <= 2.2e-39) tmp = x; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(6.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.5e-7], t$95$0, If[LessEqual[z, 2.2e-39], x, t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(z \cdot y\right)\\
\mathbf{if}\;z \leq -5.5 \cdot 10^{-7}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-39}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -5.5000000000000003e-7 or 2.20000000000000001e-39 < z Initial program 99.7%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6454.5
Simplified54.5%
if -5.5000000000000003e-7 < z < 2.20000000000000001e-39Initial program 99.8%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6475.5
Simplified75.5%
lift-*.f64N/A
*-commutativeN/A
distribute-rgt1-inN/A
lower-*.f64N/A
lift-*.f64N/A
lower-fma.f6475.5
Applied egg-rr75.5%
Taylor expanded in z around 0
Simplified75.2%
*-lft-identity75.2
Applied egg-rr75.2%
Final simplification63.2%
(FPCore (x y z) :precision binary64 (fma (* z (- y x)) 6.0 x))
double code(double x, double y, double z) {
return fma((z * (y - x)), 6.0, x);
}
function code(x, y, z) return fma(Float64(z * Float64(y - x)), 6.0, x) end
code[x_, y_, z_] := N[(N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision] * 6.0 + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(z \cdot \left(y - x\right), 6, x\right)
\end{array}
Initial program 99.8%
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f6499.8
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z) :precision binary64 (fma (* 6.0 (- y x)) z x))
double code(double x, double y, double z) {
return fma((6.0 * (y - x)), z, x);
}
function code(x, y, z) return fma(Float64(6.0 * Float64(y - x)), z, x) end
code[x_, y_, z_] := N[(N[(6.0 * N[(y - x), $MachinePrecision]), $MachinePrecision] * z + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(6 \cdot \left(y - x\right), z, x\right)
\end{array}
Initial program 99.8%
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.8
Applied egg-rr99.8%
Final simplification99.8%
(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.8%
Taylor expanded in y around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6462.5
Simplified62.5%
lift-*.f64N/A
*-commutativeN/A
distribute-rgt1-inN/A
lower-*.f64N/A
lift-*.f64N/A
lower-fma.f6462.5
Applied egg-rr62.5%
Taylor expanded in z around 0
Simplified34.5%
*-lft-identity34.5
Applied egg-rr34.5%
(FPCore (x y z) :precision binary64 (- x (* (* 6.0 z) (- x y))))
double code(double x, double y, double z) {
return x - ((6.0 * z) * (x - y));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x - ((6.0d0 * z) * (x - y))
end function
public static double code(double x, double y, double z) {
return x - ((6.0 * z) * (x - y));
}
def code(x, y, z): return x - ((6.0 * z) * (x - y))
function code(x, y, z) return Float64(x - Float64(Float64(6.0 * z) * Float64(x - y))) end
function tmp = code(x, y, z) tmp = x - ((6.0 * z) * (x - y)); end
code[x_, y_, z_] := N[(x - N[(N[(6.0 * z), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \left(6 \cdot z\right) \cdot \left(x - y\right)
\end{array}
herbie shell --seed 2024207
(FPCore (x y z)
:name "Data.Colour.RGBSpace.HSL:hsl from colour-2.3.3, E"
:precision binary64
:alt
(! :herbie-platform default (- x (* (* 6 z) (- x y))))
(+ x (* (* (- y x) 6.0) z)))