
(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 17 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) (fma z -6.0 4.0) x))
double code(double x, double y, double z) {
return fma((y - x), fma(z, -6.0, 4.0), x);
}
function code(x, y, z) return fma(Float64(y - x), fma(z, -6.0, 4.0), x) end
code[x_, y_, z_] := N[(N[(y - x), $MachinePrecision] * N[(z * -6.0 + 4.0), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y - x, \mathsf{fma}\left(z, -6, 4\right), x\right)
\end{array}
Initial program 99.5%
+-commutative99.5%
associate-*l*99.7%
fma-define99.7%
sub-neg99.7%
+-commutative99.7%
distribute-lft-in99.7%
distribute-rgt-neg-out99.7%
*-commutative99.7%
distribute-rgt-neg-in99.7%
fma-define99.7%
metadata-eval99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
(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.7%
fma-define99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
(FPCore (x y z)
:precision binary64
(if (<= z -1.85e+194)
(* z (* x 6.0))
(if (<= z -0.118)
(* z (* y -6.0))
(if (<= z -4e-299)
(* x -3.0)
(if (<= z 6.4e-125)
(* y 4.0)
(if (<= z 1.4e-6)
(* x -3.0)
(if (<= z 4.5e+182) (* 6.0 (* x z)) (* -6.0 (* y z)))))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.85e+194) {
tmp = z * (x * 6.0);
} else if (z <= -0.118) {
tmp = z * (y * -6.0);
} else if (z <= -4e-299) {
tmp = x * -3.0;
} else if (z <= 6.4e-125) {
tmp = y * 4.0;
} else if (z <= 1.4e-6) {
tmp = x * -3.0;
} else if (z <= 4.5e+182) {
tmp = 6.0 * (x * z);
} else {
tmp = -6.0 * (y * z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-1.85d+194)) then
tmp = z * (x * 6.0d0)
else if (z <= (-0.118d0)) then
tmp = z * (y * (-6.0d0))
else if (z <= (-4d-299)) then
tmp = x * (-3.0d0)
else if (z <= 6.4d-125) then
tmp = y * 4.0d0
else if (z <= 1.4d-6) then
tmp = x * (-3.0d0)
else if (z <= 4.5d+182) then
tmp = 6.0d0 * (x * z)
else
tmp = (-6.0d0) * (y * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -1.85e+194) {
tmp = z * (x * 6.0);
} else if (z <= -0.118) {
tmp = z * (y * -6.0);
} else if (z <= -4e-299) {
tmp = x * -3.0;
} else if (z <= 6.4e-125) {
tmp = y * 4.0;
} else if (z <= 1.4e-6) {
tmp = x * -3.0;
} else if (z <= 4.5e+182) {
tmp = 6.0 * (x * z);
} else {
tmp = -6.0 * (y * z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.85e+194: tmp = z * (x * 6.0) elif z <= -0.118: tmp = z * (y * -6.0) elif z <= -4e-299: tmp = x * -3.0 elif z <= 6.4e-125: tmp = y * 4.0 elif z <= 1.4e-6: tmp = x * -3.0 elif z <= 4.5e+182: tmp = 6.0 * (x * z) else: tmp = -6.0 * (y * z) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.85e+194) tmp = Float64(z * Float64(x * 6.0)); elseif (z <= -0.118) tmp = Float64(z * Float64(y * -6.0)); elseif (z <= -4e-299) tmp = Float64(x * -3.0); elseif (z <= 6.4e-125) tmp = Float64(y * 4.0); elseif (z <= 1.4e-6) tmp = Float64(x * -3.0); elseif (z <= 4.5e+182) tmp = Float64(6.0 * Float64(x * z)); else tmp = Float64(-6.0 * Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -1.85e+194) tmp = z * (x * 6.0); elseif (z <= -0.118) tmp = z * (y * -6.0); elseif (z <= -4e-299) tmp = x * -3.0; elseif (z <= 6.4e-125) tmp = y * 4.0; elseif (z <= 1.4e-6) tmp = x * -3.0; elseif (z <= 4.5e+182) tmp = 6.0 * (x * z); else tmp = -6.0 * (y * z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.85e+194], N[(z * N[(x * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -0.118], N[(z * N[(y * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4e-299], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 6.4e-125], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.4e-6], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 4.5e+182], N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision], N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{+194}:\\
\;\;\;\;z \cdot \left(x \cdot 6\right)\\
\mathbf{elif}\;z \leq -0.118:\\
\;\;\;\;z \cdot \left(y \cdot -6\right)\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-299}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 6.4 \cdot 10^{-125}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-6}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+182}:\\
\;\;\;\;6 \cdot \left(x \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;-6 \cdot \left(y \cdot z\right)\\
\end{array}
\end{array}
if z < -1.8500000000000001e194Initial program 99.9%
+-commutative99.9%
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%
Taylor expanded in y around 0 63.2%
*-lft-identity63.2%
*-commutative63.2%
+-commutative63.2%
*-commutative63.2%
fma-define63.3%
associate-*r*63.3%
neg-mul-163.3%
fma-define63.2%
distribute-neg-in63.2%
distribute-lft-neg-in63.2%
metadata-eval63.2%
metadata-eval63.2%
distribute-rgt-in63.2%
+-commutative63.2%
sub-neg63.2%
distribute-rgt-in63.2%
sub-neg63.2%
distribute-rgt-in63.2%
metadata-eval63.2%
distribute-lft-neg-in63.2%
associate-+r+63.2%
Simplified63.2%
Taylor expanded in z around inf 63.4%
Taylor expanded in z around inf 63.4%
*-commutative63.4%
Simplified63.4%
if -1.8500000000000001e194 < z < -0.11799999999999999Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
add-sqr-sqrt47.4%
fma-define47.4%
associate-*l*47.3%
Applied egg-rr47.3%
Taylor expanded in z around inf 96.2%
Taylor expanded in y around inf 58.8%
*-commutative58.8%
associate-*r*58.8%
*-commutative58.8%
associate-*r*58.9%
Simplified58.9%
if -0.11799999999999999 < z < -3.99999999999999997e-299 or 6.3999999999999997e-125 < z < 1.39999999999999994e-6Initial program 99.2%
+-commutative99.2%
associate-*l*99.7%
fma-define99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 57.6%
*-lft-identity57.6%
*-commutative57.6%
+-commutative57.6%
*-commutative57.6%
fma-define57.6%
associate-*r*57.6%
neg-mul-157.6%
fma-define57.6%
distribute-neg-in57.6%
distribute-lft-neg-in57.6%
metadata-eval57.6%
metadata-eval57.6%
distribute-rgt-in57.5%
+-commutative57.5%
sub-neg57.5%
distribute-rgt-in57.5%
sub-neg57.5%
distribute-rgt-in57.6%
metadata-eval57.6%
distribute-lft-neg-in57.6%
associate-+r+57.6%
Simplified57.6%
Taylor expanded in z around 0 57.3%
*-commutative57.3%
Simplified57.3%
if -3.99999999999999997e-299 < z < 6.3999999999999997e-125Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in z around 0 99.9%
Taylor expanded in x around 0 65.1%
if 1.39999999999999994e-6 < z < 4.50000000000000029e182Initial program 99.5%
+-commutative99.5%
associate-*l*99.5%
fma-define99.6%
sub-neg99.6%
distribute-rgt-in99.5%
metadata-eval99.5%
metadata-eval99.5%
distribute-lft-neg-out99.5%
distribute-rgt-neg-in99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 57.5%
*-lft-identity57.5%
*-commutative57.5%
+-commutative57.5%
*-commutative57.5%
fma-define57.5%
associate-*r*57.5%
neg-mul-157.5%
fma-define57.5%
distribute-neg-in57.5%
distribute-lft-neg-in57.5%
metadata-eval57.5%
metadata-eval57.5%
distribute-rgt-in57.5%
+-commutative57.5%
sub-neg57.5%
distribute-rgt-in57.6%
sub-neg57.6%
distribute-rgt-in57.5%
metadata-eval57.5%
distribute-lft-neg-in57.5%
associate-+r+57.5%
Simplified57.5%
Taylor expanded in z around inf 57.5%
associate-*r/57.5%
metadata-eval57.5%
Simplified57.5%
Taylor expanded in z around inf 56.0%
if 4.50000000000000029e182 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
add-sqr-sqrt39.9%
fma-define39.9%
associate-*l*40.0%
Applied egg-rr40.0%
Taylor expanded in z around inf 99.9%
Taylor expanded in y around inf 64.9%
Final simplification59.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 6.0 (* x z))))
(if (<= z -5.1e+199)
t_0
(if (<= z -0.22)
(* z (* y -6.0))
(if (<= z -6.6e-298)
(* x -3.0)
(if (<= z 5e-125)
(* y 4.0)
(if (<= z 1.4e-6)
(* x -3.0)
(if (<= z 2e+184) t_0 (* -6.0 (* y z))))))))))
double code(double x, double y, double z) {
double t_0 = 6.0 * (x * z);
double tmp;
if (z <= -5.1e+199) {
tmp = t_0;
} else if (z <= -0.22) {
tmp = z * (y * -6.0);
} else if (z <= -6.6e-298) {
tmp = x * -3.0;
} else if (z <= 5e-125) {
tmp = y * 4.0;
} else if (z <= 1.4e-6) {
tmp = x * -3.0;
} else if (z <= 2e+184) {
tmp = t_0;
} else {
tmp = -6.0 * (y * z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = 6.0d0 * (x * z)
if (z <= (-5.1d+199)) then
tmp = t_0
else if (z <= (-0.22d0)) then
tmp = z * (y * (-6.0d0))
else if (z <= (-6.6d-298)) then
tmp = x * (-3.0d0)
else if (z <= 5d-125) then
tmp = y * 4.0d0
else if (z <= 1.4d-6) then
tmp = x * (-3.0d0)
else if (z <= 2d+184) then
tmp = t_0
else
tmp = (-6.0d0) * (y * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 6.0 * (x * z);
double tmp;
if (z <= -5.1e+199) {
tmp = t_0;
} else if (z <= -0.22) {
tmp = z * (y * -6.0);
} else if (z <= -6.6e-298) {
tmp = x * -3.0;
} else if (z <= 5e-125) {
tmp = y * 4.0;
} else if (z <= 1.4e-6) {
tmp = x * -3.0;
} else if (z <= 2e+184) {
tmp = t_0;
} else {
tmp = -6.0 * (y * z);
}
return tmp;
}
def code(x, y, z): t_0 = 6.0 * (x * z) tmp = 0 if z <= -5.1e+199: tmp = t_0 elif z <= -0.22: tmp = z * (y * -6.0) elif z <= -6.6e-298: tmp = x * -3.0 elif z <= 5e-125: tmp = y * 4.0 elif z <= 1.4e-6: tmp = x * -3.0 elif z <= 2e+184: tmp = t_0 else: tmp = -6.0 * (y * z) return tmp
function code(x, y, z) t_0 = Float64(6.0 * Float64(x * z)) tmp = 0.0 if (z <= -5.1e+199) tmp = t_0; elseif (z <= -0.22) tmp = Float64(z * Float64(y * -6.0)); elseif (z <= -6.6e-298) tmp = Float64(x * -3.0); elseif (z <= 5e-125) tmp = Float64(y * 4.0); elseif (z <= 1.4e-6) tmp = Float64(x * -3.0); elseif (z <= 2e+184) tmp = t_0; else tmp = Float64(-6.0 * Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 6.0 * (x * z); tmp = 0.0; if (z <= -5.1e+199) tmp = t_0; elseif (z <= -0.22) tmp = z * (y * -6.0); elseif (z <= -6.6e-298) tmp = x * -3.0; elseif (z <= 5e-125) tmp = y * 4.0; elseif (z <= 1.4e-6) tmp = x * -3.0; elseif (z <= 2e+184) tmp = t_0; else tmp = -6.0 * (y * z); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.1e+199], t$95$0, If[LessEqual[z, -0.22], N[(z * N[(y * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.6e-298], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 5e-125], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.4e-6], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2e+184], t$95$0, N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(x \cdot z\right)\\
\mathbf{if}\;z \leq -5.1 \cdot 10^{+199}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -0.22:\\
\;\;\;\;z \cdot \left(y \cdot -6\right)\\
\mathbf{elif}\;z \leq -6.6 \cdot 10^{-298}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-125}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-6}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+184}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;-6 \cdot \left(y \cdot z\right)\\
\end{array}
\end{array}
if z < -5.10000000000000005e199 or 1.39999999999999994e-6 < z < 2.00000000000000003e184Initial program 99.7%
+-commutative99.7%
associate-*l*99.7%
fma-define99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 59.8%
*-lft-identity59.8%
*-commutative59.8%
+-commutative59.8%
*-commutative59.8%
fma-define59.8%
associate-*r*59.8%
neg-mul-159.8%
fma-define59.8%
distribute-neg-in59.8%
distribute-lft-neg-in59.8%
metadata-eval59.8%
metadata-eval59.8%
distribute-rgt-in59.8%
+-commutative59.8%
sub-neg59.8%
distribute-rgt-in59.8%
sub-neg59.8%
distribute-rgt-in59.8%
metadata-eval59.8%
distribute-lft-neg-in59.8%
associate-+r+59.8%
Simplified59.8%
Taylor expanded in z around inf 59.8%
associate-*r/59.8%
metadata-eval59.8%
Simplified59.8%
Taylor expanded in z around inf 58.9%
if -5.10000000000000005e199 < z < -0.220000000000000001Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
add-sqr-sqrt47.4%
fma-define47.4%
associate-*l*47.3%
Applied egg-rr47.3%
Taylor expanded in z around inf 96.2%
Taylor expanded in y around inf 58.8%
*-commutative58.8%
associate-*r*58.8%
*-commutative58.8%
associate-*r*58.9%
Simplified58.9%
if -0.220000000000000001 < z < -6.6000000000000004e-298 or 4.99999999999999967e-125 < z < 1.39999999999999994e-6Initial program 99.2%
+-commutative99.2%
associate-*l*99.7%
fma-define99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 57.6%
*-lft-identity57.6%
*-commutative57.6%
+-commutative57.6%
*-commutative57.6%
fma-define57.6%
associate-*r*57.6%
neg-mul-157.6%
fma-define57.6%
distribute-neg-in57.6%
distribute-lft-neg-in57.6%
metadata-eval57.6%
metadata-eval57.6%
distribute-rgt-in57.5%
+-commutative57.5%
sub-neg57.5%
distribute-rgt-in57.5%
sub-neg57.5%
distribute-rgt-in57.6%
metadata-eval57.6%
distribute-lft-neg-in57.6%
associate-+r+57.6%
Simplified57.6%
Taylor expanded in z around 0 57.3%
*-commutative57.3%
Simplified57.3%
if -6.6000000000000004e-298 < z < 4.99999999999999967e-125Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in z around 0 99.9%
Taylor expanded in x around 0 65.1%
if 2.00000000000000003e184 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
add-sqr-sqrt39.9%
fma-define39.9%
associate-*l*40.0%
Applied egg-rr40.0%
Taylor expanded in z around inf 99.9%
Taylor expanded in y around inf 64.9%
Final simplification59.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 6.0 (* x z))) (t_1 (* -6.0 (* y z))))
(if (<= z -4.6e+192)
t_0
(if (<= z -0.048)
t_1
(if (<= z -2.4e-296)
(* x -3.0)
(if (<= z 3.3e-125)
(* y 4.0)
(if (<= z 1.4e-6) (* x -3.0) (if (<= z 2.1e+183) t_0 t_1))))))))
double code(double x, double y, double z) {
double t_0 = 6.0 * (x * z);
double t_1 = -6.0 * (y * z);
double tmp;
if (z <= -4.6e+192) {
tmp = t_0;
} else if (z <= -0.048) {
tmp = t_1;
} else if (z <= -2.4e-296) {
tmp = x * -3.0;
} else if (z <= 3.3e-125) {
tmp = y * 4.0;
} else if (z <= 1.4e-6) {
tmp = x * -3.0;
} else if (z <= 2.1e+183) {
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 * (x * z)
t_1 = (-6.0d0) * (y * z)
if (z <= (-4.6d+192)) then
tmp = t_0
else if (z <= (-0.048d0)) then
tmp = t_1
else if (z <= (-2.4d-296)) then
tmp = x * (-3.0d0)
else if (z <= 3.3d-125) then
tmp = y * 4.0d0
else if (z <= 1.4d-6) then
tmp = x * (-3.0d0)
else if (z <= 2.1d+183) 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 * (x * z);
double t_1 = -6.0 * (y * z);
double tmp;
if (z <= -4.6e+192) {
tmp = t_0;
} else if (z <= -0.048) {
tmp = t_1;
} else if (z <= -2.4e-296) {
tmp = x * -3.0;
} else if (z <= 3.3e-125) {
tmp = y * 4.0;
} else if (z <= 1.4e-6) {
tmp = x * -3.0;
} else if (z <= 2.1e+183) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = 6.0 * (x * z) t_1 = -6.0 * (y * z) tmp = 0 if z <= -4.6e+192: tmp = t_0 elif z <= -0.048: tmp = t_1 elif z <= -2.4e-296: tmp = x * -3.0 elif z <= 3.3e-125: tmp = y * 4.0 elif z <= 1.4e-6: tmp = x * -3.0 elif z <= 2.1e+183: tmp = t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(6.0 * Float64(x * z)) t_1 = Float64(-6.0 * Float64(y * z)) tmp = 0.0 if (z <= -4.6e+192) tmp = t_0; elseif (z <= -0.048) tmp = t_1; elseif (z <= -2.4e-296) tmp = Float64(x * -3.0); elseif (z <= 3.3e-125) tmp = Float64(y * 4.0); elseif (z <= 1.4e-6) tmp = Float64(x * -3.0); elseif (z <= 2.1e+183) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = 6.0 * (x * z); t_1 = -6.0 * (y * z); tmp = 0.0; if (z <= -4.6e+192) tmp = t_0; elseif (z <= -0.048) tmp = t_1; elseif (z <= -2.4e-296) tmp = x * -3.0; elseif (z <= 3.3e-125) tmp = y * 4.0; elseif (z <= 1.4e-6) tmp = x * -3.0; elseif (z <= 2.1e+183) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.6e+192], t$95$0, If[LessEqual[z, -0.048], t$95$1, If[LessEqual[z, -2.4e-296], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 3.3e-125], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1.4e-6], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 2.1e+183], t$95$0, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(x \cdot z\right)\\
t_1 := -6 \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -4.6 \cdot 10^{+192}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -0.048:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.4 \cdot 10^{-296}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{-125}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-6}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+183}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.5999999999999999e192 or 1.39999999999999994e-6 < z < 2.1e183Initial program 99.7%
+-commutative99.7%
associate-*l*99.7%
fma-define99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 59.8%
*-lft-identity59.8%
*-commutative59.8%
+-commutative59.8%
*-commutative59.8%
fma-define59.8%
associate-*r*59.8%
neg-mul-159.8%
fma-define59.8%
distribute-neg-in59.8%
distribute-lft-neg-in59.8%
metadata-eval59.8%
metadata-eval59.8%
distribute-rgt-in59.8%
+-commutative59.8%
sub-neg59.8%
distribute-rgt-in59.8%
sub-neg59.8%
distribute-rgt-in59.8%
metadata-eval59.8%
distribute-lft-neg-in59.8%
associate-+r+59.8%
Simplified59.8%
Taylor expanded in z around inf 59.8%
associate-*r/59.8%
metadata-eval59.8%
Simplified59.8%
Taylor expanded in z around inf 58.9%
if -4.5999999999999999e192 < z < -0.048000000000000001 or 2.1e183 < z Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
add-sqr-sqrt44.5%
fma-define44.5%
associate-*l*44.5%
Applied egg-rr44.5%
Taylor expanded in z around inf 97.6%
Taylor expanded in y around inf 61.1%
if -0.048000000000000001 < z < -2.39999999999999996e-296 or 3.3000000000000001e-125 < z < 1.39999999999999994e-6Initial program 99.2%
+-commutative99.2%
associate-*l*99.7%
fma-define99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 57.6%
*-lft-identity57.6%
*-commutative57.6%
+-commutative57.6%
*-commutative57.6%
fma-define57.6%
associate-*r*57.6%
neg-mul-157.6%
fma-define57.6%
distribute-neg-in57.6%
distribute-lft-neg-in57.6%
metadata-eval57.6%
metadata-eval57.6%
distribute-rgt-in57.5%
+-commutative57.5%
sub-neg57.5%
distribute-rgt-in57.5%
sub-neg57.5%
distribute-rgt-in57.6%
metadata-eval57.6%
distribute-lft-neg-in57.6%
associate-+r+57.6%
Simplified57.6%
Taylor expanded in z around 0 57.3%
*-commutative57.3%
Simplified57.3%
if -2.39999999999999996e-296 < z < 3.3000000000000001e-125Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in z around 0 99.9%
Taylor expanded in x around 0 65.1%
Final simplification59.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ -3.0 (* z 6.0)))) (t_1 (* -6.0 (* (- y x) z))))
(if (<= z -82000000.0)
t_1
(if (<= z -1.9e-295)
t_0
(if (<= z 2.05e-125) (* y 4.0) (if (<= z 15600.0) t_0 t_1))))))
double code(double x, double y, double z) {
double t_0 = x * (-3.0 + (z * 6.0));
double t_1 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -82000000.0) {
tmp = t_1;
} else if (z <= -1.9e-295) {
tmp = t_0;
} else if (z <= 2.05e-125) {
tmp = y * 4.0;
} else if (z <= 15600.0) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x * ((-3.0d0) + (z * 6.0d0))
t_1 = (-6.0d0) * ((y - x) * z)
if (z <= (-82000000.0d0)) then
tmp = t_1
else if (z <= (-1.9d-295)) then
tmp = t_0
else if (z <= 2.05d-125) then
tmp = y * 4.0d0
else if (z <= 15600.0d0) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (-3.0 + (z * 6.0));
double t_1 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -82000000.0) {
tmp = t_1;
} else if (z <= -1.9e-295) {
tmp = t_0;
} else if (z <= 2.05e-125) {
tmp = y * 4.0;
} else if (z <= 15600.0) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = x * (-3.0 + (z * 6.0)) t_1 = -6.0 * ((y - x) * z) tmp = 0 if z <= -82000000.0: tmp = t_1 elif z <= -1.9e-295: tmp = t_0 elif z <= 2.05e-125: tmp = y * 4.0 elif z <= 15600.0: tmp = t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(x * Float64(-3.0 + Float64(z * 6.0))) t_1 = Float64(-6.0 * Float64(Float64(y - x) * z)) tmp = 0.0 if (z <= -82000000.0) tmp = t_1; elseif (z <= -1.9e-295) tmp = t_0; elseif (z <= 2.05e-125) tmp = Float64(y * 4.0); elseif (z <= 15600.0) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (-3.0 + (z * 6.0)); t_1 = -6.0 * ((y - x) * z); tmp = 0.0; if (z <= -82000000.0) tmp = t_1; elseif (z <= -1.9e-295) tmp = t_0; elseif (z <= 2.05e-125) tmp = y * 4.0; elseif (z <= 15600.0) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(-3.0 + N[(z * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -82000000.0], t$95$1, If[LessEqual[z, -1.9e-295], t$95$0, If[LessEqual[z, 2.05e-125], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 15600.0], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(-3 + z \cdot 6\right)\\
t_1 := -6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{if}\;z \leq -82000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{-295}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 2.05 \cdot 10^{-125}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 15600:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -8.2e7 or 15600 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
add-sqr-sqrt52.6%
fma-define52.6%
associate-*l*52.5%
Applied egg-rr52.5%
Taylor expanded in z around inf 99.6%
if -8.2e7 < z < -1.90000000000000009e-295 or 2.0499999999999999e-125 < z < 15600Initial program 99.2%
+-commutative99.2%
associate-*l*99.7%
fma-define99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 57.2%
*-lft-identity57.2%
*-commutative57.2%
+-commutative57.2%
*-commutative57.2%
fma-define57.2%
associate-*r*57.2%
neg-mul-157.2%
fma-define57.2%
distribute-neg-in57.2%
distribute-lft-neg-in57.2%
metadata-eval57.2%
metadata-eval57.2%
distribute-rgt-in57.2%
+-commutative57.2%
sub-neg57.2%
distribute-rgt-in57.2%
sub-neg57.2%
distribute-rgt-in57.2%
metadata-eval57.2%
distribute-lft-neg-in57.2%
associate-+r+57.2%
Simplified57.2%
if -1.90000000000000009e-295 < z < 2.0499999999999999e-125Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in z around 0 99.9%
Taylor expanded in x around 0 65.1%
Final simplification79.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* (- y x) z))))
(if (<= z -0.011)
t_0
(if (<= z -7.8e-299)
(* x (* z (/ -3.0 z)))
(if (<= z 4.1e-125) (* y 4.0) (if (<= z 0.5) (* x -3.0) t_0))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -0.011) {
tmp = t_0;
} else if (z <= -7.8e-299) {
tmp = x * (z * (-3.0 / z));
} else if (z <= 4.1e-125) {
tmp = y * 4.0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (-6.0d0) * ((y - x) * z)
if (z <= (-0.011d0)) then
tmp = t_0
else if (z <= (-7.8d-299)) then
tmp = x * (z * ((-3.0d0) / z))
else if (z <= 4.1d-125) then
tmp = y * 4.0d0
else if (z <= 0.5d0) then
tmp = x * (-3.0d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -6.0 * ((y - x) * z);
double tmp;
if (z <= -0.011) {
tmp = t_0;
} else if (z <= -7.8e-299) {
tmp = x * (z * (-3.0 / z));
} else if (z <= 4.1e-125) {
tmp = y * 4.0;
} else if (z <= 0.5) {
tmp = x * -3.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = -6.0 * ((y - x) * z) tmp = 0 if z <= -0.011: tmp = t_0 elif z <= -7.8e-299: tmp = x * (z * (-3.0 / z)) elif z <= 4.1e-125: tmp = y * 4.0 elif z <= 0.5: tmp = x * -3.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(-6.0 * Float64(Float64(y - x) * z)) tmp = 0.0 if (z <= -0.011) tmp = t_0; elseif (z <= -7.8e-299) tmp = Float64(x * Float64(z * Float64(-3.0 / z))); elseif (z <= 4.1e-125) tmp = Float64(y * 4.0); elseif (z <= 0.5) tmp = Float64(x * -3.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -6.0 * ((y - x) * z); tmp = 0.0; if (z <= -0.011) tmp = t_0; elseif (z <= -7.8e-299) tmp = x * (z * (-3.0 / z)); elseif (z <= 4.1e-125) tmp = y * 4.0; elseif (z <= 0.5) tmp = x * -3.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.011], t$95$0, If[LessEqual[z, -7.8e-299], N[(x * N[(z * N[(-3.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.1e-125], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.5], N[(x * -3.0), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\mathbf{if}\;z \leq -0.011:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -7.8 \cdot 10^{-299}:\\
\;\;\;\;x \cdot \left(z \cdot \frac{-3}{z}\right)\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{-125}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -0.010999999999999999 or 0.5 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
add-sqr-sqrt52.9%
fma-define52.9%
associate-*l*52.9%
Applied egg-rr52.9%
Taylor expanded in z around inf 98.0%
if -0.010999999999999999 < z < -7.7999999999999997e-299Initial program 99.1%
+-commutative99.1%
associate-*l*99.7%
fma-define99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 53.9%
*-lft-identity53.9%
*-commutative53.9%
+-commutative53.9%
*-commutative53.9%
fma-define53.9%
associate-*r*53.9%
neg-mul-153.9%
fma-define53.9%
distribute-neg-in53.9%
distribute-lft-neg-in53.9%
metadata-eval53.9%
metadata-eval53.9%
distribute-rgt-in53.9%
+-commutative53.9%
sub-neg53.9%
distribute-rgt-in53.9%
sub-neg53.9%
distribute-rgt-in53.9%
metadata-eval53.9%
distribute-lft-neg-in53.9%
associate-+r+53.9%
Simplified53.9%
Taylor expanded in z around inf 53.7%
associate-*r/53.9%
metadata-eval53.9%
Simplified53.9%
Taylor expanded in z around 0 53.9%
if -7.7999999999999997e-299 < z < 4.0999999999999997e-125Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in z around 0 99.9%
Taylor expanded in x around 0 65.1%
if 4.0999999999999997e-125 < z < 0.5Initial program 99.2%
+-commutative99.2%
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 0 62.1%
*-lft-identity62.1%
*-commutative62.1%
+-commutative62.1%
*-commutative62.1%
fma-define62.1%
associate-*r*62.1%
neg-mul-162.1%
fma-define62.1%
distribute-neg-in62.1%
distribute-lft-neg-in62.1%
metadata-eval62.1%
metadata-eval62.1%
distribute-rgt-in62.0%
+-commutative62.0%
sub-neg62.0%
distribute-rgt-in62.0%
sub-neg62.0%
distribute-rgt-in62.1%
metadata-eval62.1%
distribute-lft-neg-in62.1%
associate-+r+62.1%
Simplified62.1%
Taylor expanded in z around 0 61.3%
*-commutative61.3%
Simplified61.3%
Final simplification79.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* (- y x) z))))
(if (<= z -0.018)
t_0
(if (<= z -3.8e-294)
(* x -3.0)
(if (<= z 6.2e-125) (* 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.018) {
tmp = t_0;
} else if (z <= -3.8e-294) {
tmp = x * -3.0;
} else if (z <= 6.2e-125) {
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.018d0)) then
tmp = t_0
else if (z <= (-3.8d-294)) then
tmp = x * (-3.0d0)
else if (z <= 6.2d-125) 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.018) {
tmp = t_0;
} else if (z <= -3.8e-294) {
tmp = x * -3.0;
} else if (z <= 6.2e-125) {
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.018: tmp = t_0 elif z <= -3.8e-294: tmp = x * -3.0 elif z <= 6.2e-125: 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.018) tmp = t_0; elseif (z <= -3.8e-294) tmp = Float64(x * -3.0); elseif (z <= 6.2e-125) 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.018) tmp = t_0; elseif (z <= -3.8e-294) tmp = x * -3.0; elseif (z <= 6.2e-125) 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.018], t$95$0, If[LessEqual[z, -3.8e-294], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 6.2e-125], 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.018:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-294}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-125}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -0.0179999999999999986 or 0.5 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
add-sqr-sqrt52.9%
fma-define52.9%
associate-*l*52.9%
Applied egg-rr52.9%
Taylor expanded in z around inf 98.0%
if -0.0179999999999999986 < z < -3.8e-294 or 6.20000000000000026e-125 < z < 0.5Initial program 99.2%
+-commutative99.2%
associate-*l*99.7%
fma-define99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 56.9%
*-lft-identity56.9%
*-commutative56.9%
+-commutative56.9%
*-commutative56.9%
fma-define56.9%
associate-*r*56.9%
neg-mul-156.9%
fma-define56.9%
distribute-neg-in56.9%
distribute-lft-neg-in56.9%
metadata-eval56.9%
metadata-eval56.9%
distribute-rgt-in56.9%
+-commutative56.9%
sub-neg56.9%
distribute-rgt-in56.9%
sub-neg56.9%
distribute-rgt-in56.9%
metadata-eval56.9%
distribute-lft-neg-in56.9%
associate-+r+56.9%
Simplified56.9%
Taylor expanded in z around 0 56.6%
*-commutative56.6%
Simplified56.6%
if -3.8e-294 < z < 6.20000000000000026e-125Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in z around 0 99.9%
Taylor expanded in x around 0 65.1%
Final simplification79.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* -6.0 (* y z))))
(if (<= z -0.5)
t_0
(if (<= z -3.8e-296)
(* x -3.0)
(if (<= z 4.3e-125) (* y 4.0) (if (<= z 0.52) (* x -3.0) t_0))))))
double code(double x, double y, double z) {
double t_0 = -6.0 * (y * z);
double tmp;
if (z <= -0.5) {
tmp = t_0;
} else if (z <= -3.8e-296) {
tmp = x * -3.0;
} else if (z <= 4.3e-125) {
tmp = y * 4.0;
} else if (z <= 0.52) {
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 <= (-0.5d0)) then
tmp = t_0
else if (z <= (-3.8d-296)) then
tmp = x * (-3.0d0)
else if (z <= 4.3d-125) then
tmp = y * 4.0d0
else if (z <= 0.52d0) 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 <= -0.5) {
tmp = t_0;
} else if (z <= -3.8e-296) {
tmp = x * -3.0;
} else if (z <= 4.3e-125) {
tmp = y * 4.0;
} else if (z <= 0.52) {
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 <= -0.5: tmp = t_0 elif z <= -3.8e-296: tmp = x * -3.0 elif z <= 4.3e-125: tmp = y * 4.0 elif z <= 0.52: 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 <= -0.5) tmp = t_0; elseif (z <= -3.8e-296) tmp = Float64(x * -3.0); elseif (z <= 4.3e-125) tmp = Float64(y * 4.0); elseif (z <= 0.52) 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 <= -0.5) tmp = t_0; elseif (z <= -3.8e-296) tmp = x * -3.0; elseif (z <= 4.3e-125) tmp = y * 4.0; elseif (z <= 0.52) 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, -0.5], t$95$0, If[LessEqual[z, -3.8e-296], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 4.3e-125], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 0.52], 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 -0.5:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-296}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{-125}:\\
\;\;\;\;y \cdot 4\\
\mathbf{elif}\;z \leq 0.52:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -0.5 or 0.52000000000000002 < z Initial program 99.7%
metadata-eval99.7%
Simplified99.7%
add-sqr-sqrt52.9%
fma-define52.9%
associate-*l*52.9%
Applied egg-rr52.9%
Taylor expanded in z around inf 98.0%
Taylor expanded in y around inf 52.1%
if -0.5 < z < -3.8000000000000002e-296 or 4.3000000000000002e-125 < z < 0.52000000000000002Initial program 99.2%
+-commutative99.2%
associate-*l*99.7%
fma-define99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 56.9%
*-lft-identity56.9%
*-commutative56.9%
+-commutative56.9%
*-commutative56.9%
fma-define56.9%
associate-*r*56.9%
neg-mul-156.9%
fma-define56.9%
distribute-neg-in56.9%
distribute-lft-neg-in56.9%
metadata-eval56.9%
metadata-eval56.9%
distribute-rgt-in56.9%
+-commutative56.9%
sub-neg56.9%
distribute-rgt-in56.9%
sub-neg56.9%
distribute-rgt-in56.9%
metadata-eval56.9%
distribute-lft-neg-in56.9%
associate-+r+56.9%
Simplified56.9%
Taylor expanded in z around 0 56.6%
*-commutative56.6%
Simplified56.6%
if -3.8000000000000002e-296 < z < 4.3000000000000002e-125Initial program 99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in z around 0 99.9%
Taylor expanded in x around 0 65.1%
Final simplification55.5%
(FPCore (x y z) :precision binary64 (if (or (<= x -8.5e-24) (not (<= x 9.5e+26))) (* x (+ -3.0 (* z 6.0))) (* y (+ 4.0 (* z -6.0)))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -8.5e-24) || !(x <= 9.5e+26)) {
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 <= (-8.5d-24)) .or. (.not. (x <= 9.5d+26))) 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 <= -8.5e-24) || !(x <= 9.5e+26)) {
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 <= -8.5e-24) or not (x <= 9.5e+26): 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 <= -8.5e-24) || !(x <= 9.5e+26)) 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 <= -8.5e-24) || ~((x <= 9.5e+26))) 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, -8.5e-24], N[Not[LessEqual[x, 9.5e+26]], $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 -8.5 \cdot 10^{-24} \lor \neg \left(x \leq 9.5 \cdot 10^{+26}\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 < -8.5000000000000002e-24 or 9.50000000000000054e26 < x Initial program 99.4%
+-commutative99.4%
associate-*l*99.7%
fma-define99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 79.5%
*-lft-identity79.5%
*-commutative79.5%
+-commutative79.5%
*-commutative79.5%
fma-define79.5%
associate-*r*79.5%
neg-mul-179.5%
fma-define79.5%
distribute-neg-in79.5%
distribute-lft-neg-in79.5%
metadata-eval79.5%
metadata-eval79.5%
distribute-rgt-in79.5%
+-commutative79.5%
sub-neg79.5%
distribute-rgt-in79.6%
sub-neg79.6%
distribute-rgt-in79.5%
metadata-eval79.5%
distribute-lft-neg-in79.5%
associate-+r+79.5%
Simplified79.5%
if -8.5000000000000002e-24 < x < 9.50000000000000054e26Initial 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%
Taylor expanded in y around inf 78.2%
Final simplification78.8%
(FPCore (x y z) :precision binary64 (if (<= z -0.6) (* z (* (- y x) -6.0)) (if (<= z 0.6) (+ (* y 4.0) (* x -3.0)) (* -6.0 (* (- y x) z)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.6) {
tmp = z * ((y - x) * -6.0);
} else if (z <= 0.6) {
tmp = (y * 4.0) + (x * -3.0);
} else {
tmp = -6.0 * ((y - x) * z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-0.6d0)) then
tmp = z * ((y - x) * (-6.0d0))
else if (z <= 0.6d0) then
tmp = (y * 4.0d0) + (x * (-3.0d0))
else
tmp = (-6.0d0) * ((y - x) * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.6) {
tmp = z * ((y - x) * -6.0);
} else if (z <= 0.6) {
tmp = (y * 4.0) + (x * -3.0);
} else {
tmp = -6.0 * ((y - x) * z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.6: tmp = z * ((y - x) * -6.0) elif z <= 0.6: tmp = (y * 4.0) + (x * -3.0) else: tmp = -6.0 * ((y - x) * z) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.6) tmp = Float64(z * Float64(Float64(y - x) * -6.0)); elseif (z <= 0.6) tmp = Float64(Float64(y * 4.0) + Float64(x * -3.0)); else tmp = Float64(-6.0 * Float64(Float64(y - x) * z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.6) tmp = z * ((y - x) * -6.0); elseif (z <= 0.6) tmp = (y * 4.0) + (x * -3.0); else tmp = -6.0 * ((y - x) * z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.6], N[(z * N[(N[(y - x), $MachinePrecision] * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.6], N[(N[(y * 4.0), $MachinePrecision] + N[(x * -3.0), $MachinePrecision]), $MachinePrecision], N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.6:\\
\;\;\;\;z \cdot \left(\left(y - x\right) \cdot -6\right)\\
\mathbf{elif}\;z \leq 0.6:\\
\;\;\;\;y \cdot 4 + x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\end{array}
\end{array}
if z < -0.599999999999999978Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
add-sqr-sqrt52.9%
fma-define52.9%
associate-*l*52.9%
Applied egg-rr52.9%
Taylor expanded in z around inf 98.9%
associate-*r*98.9%
*-commutative98.9%
associate-*r*99.0%
Simplified99.0%
if -0.599999999999999978 < z < 0.599999999999999978Initial program 99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in z around 0 97.9%
Taylor expanded in x around 0 97.9%
if 0.599999999999999978 < z Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
add-sqr-sqrt52.1%
fma-define52.1%
associate-*l*52.1%
Applied egg-rr52.1%
Taylor expanded in z around inf 98.3%
Final simplification98.3%
(FPCore (x y z) :precision binary64 (if (<= z -0.58) (* z (* (- y x) -6.0)) (if (<= z 0.58) (+ x (* (- y x) 4.0)) (* -6.0 (* (- y x) z)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.58) {
tmp = z * ((y - x) * -6.0);
} else if (z <= 0.58) {
tmp = x + ((y - x) * 4.0);
} else {
tmp = -6.0 * ((y - x) * z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-0.58d0)) then
tmp = z * ((y - x) * (-6.0d0))
else if (z <= 0.58d0) then
tmp = x + ((y - x) * 4.0d0)
else
tmp = (-6.0d0) * ((y - x) * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.58) {
tmp = z * ((y - x) * -6.0);
} else if (z <= 0.58) {
tmp = x + ((y - x) * 4.0);
} else {
tmp = -6.0 * ((y - x) * z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.58: tmp = z * ((y - x) * -6.0) elif z <= 0.58: tmp = x + ((y - x) * 4.0) else: tmp = -6.0 * ((y - x) * z) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.58) tmp = Float64(z * Float64(Float64(y - x) * -6.0)); elseif (z <= 0.58) tmp = Float64(x + Float64(Float64(y - x) * 4.0)); else tmp = Float64(-6.0 * Float64(Float64(y - x) * z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.58) tmp = z * ((y - x) * -6.0); elseif (z <= 0.58) tmp = x + ((y - x) * 4.0); else tmp = -6.0 * ((y - x) * z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.58], N[(z * N[(N[(y - x), $MachinePrecision] * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.58], N[(x + N[(N[(y - x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision], N[(-6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.58:\\
\;\;\;\;z \cdot \left(\left(y - x\right) \cdot -6\right)\\
\mathbf{elif}\;z \leq 0.58:\\
\;\;\;\;x + \left(y - x\right) \cdot 4\\
\mathbf{else}:\\
\;\;\;\;-6 \cdot \left(\left(y - x\right) \cdot z\right)\\
\end{array}
\end{array}
if z < -0.57999999999999996Initial program 99.8%
metadata-eval99.8%
Simplified99.8%
add-sqr-sqrt52.9%
fma-define52.9%
associate-*l*52.9%
Applied egg-rr52.9%
Taylor expanded in z around inf 98.9%
associate-*r*98.9%
*-commutative98.9%
associate-*r*99.0%
Simplified99.0%
if -0.57999999999999996 < z < 0.57999999999999996Initial program 99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in z around 0 97.9%
if 0.57999999999999996 < z Initial program 99.6%
metadata-eval99.6%
Simplified99.6%
add-sqr-sqrt52.1%
fma-define52.1%
associate-*l*52.1%
Applied egg-rr52.1%
Taylor expanded in z around inf 98.3%
Final simplification98.3%
(FPCore (x y z) :precision binary64 (if (or (<= x -3e+105) (not (<= x 4.8e-86))) (* x -3.0) (* y 4.0)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -3e+105) || !(x <= 4.8e-86)) {
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 ((x <= (-3d+105)) .or. (.not. (x <= 4.8d-86))) 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 ((x <= -3e+105) || !(x <= 4.8e-86)) {
tmp = x * -3.0;
} else {
tmp = y * 4.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -3e+105) or not (x <= 4.8e-86): tmp = x * -3.0 else: tmp = y * 4.0 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -3e+105) || !(x <= 4.8e-86)) 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 ((x <= -3e+105) || ~((x <= 4.8e-86))) tmp = x * -3.0; else tmp = y * 4.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -3e+105], N[Not[LessEqual[x, 4.8e-86]], $MachinePrecision]], N[(x * -3.0), $MachinePrecision], N[(y * 4.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3 \cdot 10^{+105} \lor \neg \left(x \leq 4.8 \cdot 10^{-86}\right):\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;y \cdot 4\\
\end{array}
\end{array}
if x < -3.0000000000000001e105 or 4.80000000000000026e-86 < x Initial program 99.4%
+-commutative99.4%
associate-*l*99.7%
fma-define99.7%
sub-neg99.7%
distribute-rgt-in99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-lft-neg-out99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 77.8%
*-lft-identity77.8%
*-commutative77.8%
+-commutative77.8%
*-commutative77.8%
fma-define77.8%
associate-*r*77.8%
neg-mul-177.8%
fma-define77.8%
distribute-neg-in77.8%
distribute-lft-neg-in77.8%
metadata-eval77.8%
metadata-eval77.8%
distribute-rgt-in77.8%
+-commutative77.8%
sub-neg77.8%
distribute-rgt-in77.9%
sub-neg77.9%
distribute-rgt-in77.9%
metadata-eval77.9%
distribute-lft-neg-in77.9%
associate-+r+77.9%
Simplified77.9%
Taylor expanded in z around 0 40.9%
*-commutative40.9%
Simplified40.9%
if -3.0000000000000001e105 < x < 4.80000000000000026e-86Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 49.1%
Taylor expanded in x around 0 40.4%
Final simplification40.7%
(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.5%
metadata-eval99.5%
Simplified99.5%
+-commutative99.5%
*-commutative99.5%
associate-*r*99.5%
fma-define99.5%
Applied egg-rr99.5%
Taylor expanded in z around 0 99.7%
+-commutative99.7%
associate-*r*99.7%
distribute-rgt-out99.7%
Simplified99.7%
Final simplification99.7%
(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.5%
metadata-eval99.5%
Simplified99.5%
(FPCore (x y z) :precision binary64 (* y 4.0))
double code(double x, double y, double z) {
return y * 4.0;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = y * 4.0d0
end function
public static double code(double x, double y, double z) {
return y * 4.0;
}
def code(x, y, z): return y * 4.0
function code(x, y, z) return Float64(y * 4.0) end
function tmp = code(x, y, z) tmp = y * 4.0; end
code[x_, y_, z_] := N[(y * 4.0), $MachinePrecision]
\begin{array}{l}
\\
y \cdot 4
\end{array}
Initial program 99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 49.5%
Taylor expanded in x around 0 25.5%
Final simplification25.5%
(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 50.9%
Taylor expanded in x around inf 2.7%
herbie shell --seed 2024150
(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))))