
(FPCore (x y z) :precision binary64 (/ (- (+ (* x x) (* y y)) (* z z)) (* y 2.0)))
double code(double x, double y, double z) {
return (((x * x) + (y * y)) - (z * z)) / (y * 2.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 * x) + (y * y)) - (z * z)) / (y * 2.0d0)
end function
public static double code(double x, double y, double z) {
return (((x * x) + (y * y)) - (z * z)) / (y * 2.0);
}
def code(x, y, z): return (((x * x) + (y * y)) - (z * z)) / (y * 2.0)
function code(x, y, z) return Float64(Float64(Float64(Float64(x * x) + Float64(y * y)) - Float64(z * z)) / Float64(y * 2.0)) end
function tmp = code(x, y, z) tmp = (((x * x) + (y * y)) - (z * z)) / (y * 2.0); end
code[x_, y_, z_] := N[(N[(N[(N[(x * x), $MachinePrecision] + N[(y * y), $MachinePrecision]), $MachinePrecision] - N[(z * z), $MachinePrecision]), $MachinePrecision] / N[(y * 2.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(x \cdot x + y \cdot y\right) - z \cdot z}{y \cdot 2}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 9 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (/ (- (+ (* x x) (* y y)) (* z z)) (* y 2.0)))
double code(double x, double y, double z) {
return (((x * x) + (y * y)) - (z * z)) / (y * 2.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 * x) + (y * y)) - (z * z)) / (y * 2.0d0)
end function
public static double code(double x, double y, double z) {
return (((x * x) + (y * y)) - (z * z)) / (y * 2.0);
}
def code(x, y, z): return (((x * x) + (y * y)) - (z * z)) / (y * 2.0)
function code(x, y, z) return Float64(Float64(Float64(Float64(x * x) + Float64(y * y)) - Float64(z * z)) / Float64(y * 2.0)) end
function tmp = code(x, y, z) tmp = (((x * x) + (y * y)) - (z * z)) / (y * 2.0); end
code[x_, y_, z_] := N[(N[(N[(N[(x * x), $MachinePrecision] + N[(y * y), $MachinePrecision]), $MachinePrecision] - N[(z * z), $MachinePrecision]), $MachinePrecision] / N[(y * 2.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(x \cdot x + y \cdot y\right) - z \cdot z}{y \cdot 2}
\end{array}
(FPCore (x y z) :precision binary64 (* (- (* (+ x z) (/ (- z x) y)) y) -0.5))
double code(double x, double y, double z) {
return (((x + z) * ((z - x) / y)) - y) * -0.5;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (((x + z) * ((z - x) / y)) - y) * (-0.5d0)
end function
public static double code(double x, double y, double z) {
return (((x + z) * ((z - x) / y)) - y) * -0.5;
}
def code(x, y, z): return (((x + z) * ((z - x) / y)) - y) * -0.5
function code(x, y, z) return Float64(Float64(Float64(Float64(x + z) * Float64(Float64(z - x) / y)) - y) * -0.5) end
function tmp = code(x, y, z) tmp = (((x + z) * ((z - x) / y)) - y) * -0.5; end
code[x_, y_, z_] := N[(N[(N[(N[(x + z), $MachinePrecision] * N[(N[(z - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision] * -0.5), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + z\right) \cdot \frac{z - x}{y} - y\right) \cdot -0.5
\end{array}
Initial program 69.6%
sub-neg69.6%
+-commutative69.6%
neg-sub069.6%
associate-+l-69.6%
sub0-neg69.6%
neg-mul-169.6%
*-commutative69.6%
times-frac69.6%
associate--r+69.6%
div-sub69.6%
difference-of-squares74.7%
+-commutative74.7%
associate-*r/76.6%
associate-/l*99.9%
*-inverses99.9%
/-rgt-identity99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 0.5 (/ x (/ y x)))))
(if (<= z 2.15e-277)
t_0
(if (<= z 6.5e-240)
(* y 0.5)
(if (<= z 8.3e-227)
t_0
(if (<= z 3.8e-139)
(* y 0.5)
(if (<= z 7.2e-112)
t_0
(if (<= z 3.3e-68)
(* y 0.5)
(if (<= z 3.6e-41)
t_0
(if (or (<= z 1.62e+35)
(and (not (<= z 3.6e+56)) (<= z 4.2e+80)))
(* y 0.5)
(* -0.5 (/ z (/ y z)))))))))))))
double code(double x, double y, double z) {
double t_0 = 0.5 * (x / (y / x));
double tmp;
if (z <= 2.15e-277) {
tmp = t_0;
} else if (z <= 6.5e-240) {
tmp = y * 0.5;
} else if (z <= 8.3e-227) {
tmp = t_0;
} else if (z <= 3.8e-139) {
tmp = y * 0.5;
} else if (z <= 7.2e-112) {
tmp = t_0;
} else if (z <= 3.3e-68) {
tmp = y * 0.5;
} else if (z <= 3.6e-41) {
tmp = t_0;
} else if ((z <= 1.62e+35) || (!(z <= 3.6e+56) && (z <= 4.2e+80))) {
tmp = y * 0.5;
} else {
tmp = -0.5 * (z / (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 = 0.5d0 * (x / (y / x))
if (z <= 2.15d-277) then
tmp = t_0
else if (z <= 6.5d-240) then
tmp = y * 0.5d0
else if (z <= 8.3d-227) then
tmp = t_0
else if (z <= 3.8d-139) then
tmp = y * 0.5d0
else if (z <= 7.2d-112) then
tmp = t_0
else if (z <= 3.3d-68) then
tmp = y * 0.5d0
else if (z <= 3.6d-41) then
tmp = t_0
else if ((z <= 1.62d+35) .or. (.not. (z <= 3.6d+56)) .and. (z <= 4.2d+80)) then
tmp = y * 0.5d0
else
tmp = (-0.5d0) * (z / (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 0.5 * (x / (y / x));
double tmp;
if (z <= 2.15e-277) {
tmp = t_0;
} else if (z <= 6.5e-240) {
tmp = y * 0.5;
} else if (z <= 8.3e-227) {
tmp = t_0;
} else if (z <= 3.8e-139) {
tmp = y * 0.5;
} else if (z <= 7.2e-112) {
tmp = t_0;
} else if (z <= 3.3e-68) {
tmp = y * 0.5;
} else if (z <= 3.6e-41) {
tmp = t_0;
} else if ((z <= 1.62e+35) || (!(z <= 3.6e+56) && (z <= 4.2e+80))) {
tmp = y * 0.5;
} else {
tmp = -0.5 * (z / (y / z));
}
return tmp;
}
def code(x, y, z): t_0 = 0.5 * (x / (y / x)) tmp = 0 if z <= 2.15e-277: tmp = t_0 elif z <= 6.5e-240: tmp = y * 0.5 elif z <= 8.3e-227: tmp = t_0 elif z <= 3.8e-139: tmp = y * 0.5 elif z <= 7.2e-112: tmp = t_0 elif z <= 3.3e-68: tmp = y * 0.5 elif z <= 3.6e-41: tmp = t_0 elif (z <= 1.62e+35) or (not (z <= 3.6e+56) and (z <= 4.2e+80)): tmp = y * 0.5 else: tmp = -0.5 * (z / (y / z)) return tmp
function code(x, y, z) t_0 = Float64(0.5 * Float64(x / Float64(y / x))) tmp = 0.0 if (z <= 2.15e-277) tmp = t_0; elseif (z <= 6.5e-240) tmp = Float64(y * 0.5); elseif (z <= 8.3e-227) tmp = t_0; elseif (z <= 3.8e-139) tmp = Float64(y * 0.5); elseif (z <= 7.2e-112) tmp = t_0; elseif (z <= 3.3e-68) tmp = Float64(y * 0.5); elseif (z <= 3.6e-41) tmp = t_0; elseif ((z <= 1.62e+35) || (!(z <= 3.6e+56) && (z <= 4.2e+80))) tmp = Float64(y * 0.5); else tmp = Float64(-0.5 * Float64(z / Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 0.5 * (x / (y / x)); tmp = 0.0; if (z <= 2.15e-277) tmp = t_0; elseif (z <= 6.5e-240) tmp = y * 0.5; elseif (z <= 8.3e-227) tmp = t_0; elseif (z <= 3.8e-139) tmp = y * 0.5; elseif (z <= 7.2e-112) tmp = t_0; elseif (z <= 3.3e-68) tmp = y * 0.5; elseif (z <= 3.6e-41) tmp = t_0; elseif ((z <= 1.62e+35) || (~((z <= 3.6e+56)) && (z <= 4.2e+80))) tmp = y * 0.5; else tmp = -0.5 * (z / (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(0.5 * N[(x / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, 2.15e-277], t$95$0, If[LessEqual[z, 6.5e-240], N[(y * 0.5), $MachinePrecision], If[LessEqual[z, 8.3e-227], t$95$0, If[LessEqual[z, 3.8e-139], N[(y * 0.5), $MachinePrecision], If[LessEqual[z, 7.2e-112], t$95$0, If[LessEqual[z, 3.3e-68], N[(y * 0.5), $MachinePrecision], If[LessEqual[z, 3.6e-41], t$95$0, If[Or[LessEqual[z, 1.62e+35], And[N[Not[LessEqual[z, 3.6e+56]], $MachinePrecision], LessEqual[z, 4.2e+80]]], N[(y * 0.5), $MachinePrecision], N[(-0.5 * N[(z / N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.5 \cdot \frac{x}{\frac{y}{x}}\\
\mathbf{if}\;z \leq 2.15 \cdot 10^{-277}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-240}:\\
\;\;\;\;y \cdot 0.5\\
\mathbf{elif}\;z \leq 8.3 \cdot 10^{-227}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-139}:\\
\;\;\;\;y \cdot 0.5\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{-112}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{-68}:\\
\;\;\;\;y \cdot 0.5\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{-41}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 1.62 \cdot 10^{+35} \lor \neg \left(z \leq 3.6 \cdot 10^{+56}\right) \land z \leq 4.2 \cdot 10^{+80}:\\
\;\;\;\;y \cdot 0.5\\
\mathbf{else}:\\
\;\;\;\;-0.5 \cdot \frac{z}{\frac{y}{z}}\\
\end{array}
\end{array}
if z < 2.14999999999999995e-277 or 6.50000000000000007e-240 < z < 8.2999999999999996e-227 or 3.80000000000000008e-139 < z < 7.2000000000000002e-112 or 3.2999999999999998e-68 < z < 3.6e-41Initial program 69.2%
Taylor expanded in y around 0 57.2%
unpow257.2%
unpow257.2%
difference-of-squares61.5%
associate-/l*65.6%
+-commutative65.6%
Simplified65.6%
div-inv65.6%
Applied egg-rr65.6%
Taylor expanded in z around 0 39.2%
unpow239.2%
associate-/l*40.7%
Simplified40.7%
if 2.14999999999999995e-277 < z < 6.50000000000000007e-240 or 8.2999999999999996e-227 < z < 3.80000000000000008e-139 or 7.2000000000000002e-112 < z < 3.2999999999999998e-68 or 3.6e-41 < z < 1.62e35 or 3.59999999999999998e56 < z < 4.20000000000000003e80Initial program 68.4%
Taylor expanded in y around inf 63.4%
*-commutative63.4%
Simplified63.4%
if 1.62e35 < z < 3.59999999999999998e56 or 4.20000000000000003e80 < z Initial program 71.5%
Taylor expanded in z around inf 63.2%
unpow263.2%
associate-*r/63.2%
Simplified63.2%
frac-2neg63.2%
div-inv63.2%
*-commutative63.2%
distribute-rgt-neg-in63.2%
metadata-eval63.2%
Applied egg-rr63.2%
associate-*r/63.2%
*-rgt-identity63.2%
metadata-eval63.2%
distribute-rgt-neg-in63.2%
associate-*r*63.2%
distribute-neg-frac63.2%
associate-/l*67.6%
distribute-neg-frac67.6%
neg-mul-167.6%
*-commutative67.6%
times-frac67.6%
metadata-eval67.6%
Simplified67.6%
neg-mul-167.6%
times-frac67.6%
metadata-eval67.6%
Applied egg-rr67.6%
Final simplification52.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 0.5 (/ x (/ y x)))))
(if (<= z 1e-275)
t_0
(if (<= z 1.4e-238)
(* y 0.5)
(if (<= z 7.6e-227)
t_0
(if (<= z 1.32e-138)
(* y 0.5)
(if (<= z 2.6e-112)
t_0
(if (<= z 8.8e-68)
(* y 0.5)
(if (<= z 2.6e-41)
t_0
(if (<= z 9.2e+34)
(* y 0.5)
(if (<= z 6e+56)
(* (* z -0.5) (/ z y))
(if (<= z 3.8e+80)
(* y 0.5)
(* -0.5 (/ z (/ y z)))))))))))))))
double code(double x, double y, double z) {
double t_0 = 0.5 * (x / (y / x));
double tmp;
if (z <= 1e-275) {
tmp = t_0;
} else if (z <= 1.4e-238) {
tmp = y * 0.5;
} else if (z <= 7.6e-227) {
tmp = t_0;
} else if (z <= 1.32e-138) {
tmp = y * 0.5;
} else if (z <= 2.6e-112) {
tmp = t_0;
} else if (z <= 8.8e-68) {
tmp = y * 0.5;
} else if (z <= 2.6e-41) {
tmp = t_0;
} else if (z <= 9.2e+34) {
tmp = y * 0.5;
} else if (z <= 6e+56) {
tmp = (z * -0.5) * (z / y);
} else if (z <= 3.8e+80) {
tmp = y * 0.5;
} else {
tmp = -0.5 * (z / (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 = 0.5d0 * (x / (y / x))
if (z <= 1d-275) then
tmp = t_0
else if (z <= 1.4d-238) then
tmp = y * 0.5d0
else if (z <= 7.6d-227) then
tmp = t_0
else if (z <= 1.32d-138) then
tmp = y * 0.5d0
else if (z <= 2.6d-112) then
tmp = t_0
else if (z <= 8.8d-68) then
tmp = y * 0.5d0
else if (z <= 2.6d-41) then
tmp = t_0
else if (z <= 9.2d+34) then
tmp = y * 0.5d0
else if (z <= 6d+56) then
tmp = (z * (-0.5d0)) * (z / y)
else if (z <= 3.8d+80) then
tmp = y * 0.5d0
else
tmp = (-0.5d0) * (z / (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 0.5 * (x / (y / x));
double tmp;
if (z <= 1e-275) {
tmp = t_0;
} else if (z <= 1.4e-238) {
tmp = y * 0.5;
} else if (z <= 7.6e-227) {
tmp = t_0;
} else if (z <= 1.32e-138) {
tmp = y * 0.5;
} else if (z <= 2.6e-112) {
tmp = t_0;
} else if (z <= 8.8e-68) {
tmp = y * 0.5;
} else if (z <= 2.6e-41) {
tmp = t_0;
} else if (z <= 9.2e+34) {
tmp = y * 0.5;
} else if (z <= 6e+56) {
tmp = (z * -0.5) * (z / y);
} else if (z <= 3.8e+80) {
tmp = y * 0.5;
} else {
tmp = -0.5 * (z / (y / z));
}
return tmp;
}
def code(x, y, z): t_0 = 0.5 * (x / (y / x)) tmp = 0 if z <= 1e-275: tmp = t_0 elif z <= 1.4e-238: tmp = y * 0.5 elif z <= 7.6e-227: tmp = t_0 elif z <= 1.32e-138: tmp = y * 0.5 elif z <= 2.6e-112: tmp = t_0 elif z <= 8.8e-68: tmp = y * 0.5 elif z <= 2.6e-41: tmp = t_0 elif z <= 9.2e+34: tmp = y * 0.5 elif z <= 6e+56: tmp = (z * -0.5) * (z / y) elif z <= 3.8e+80: tmp = y * 0.5 else: tmp = -0.5 * (z / (y / z)) return tmp
function code(x, y, z) t_0 = Float64(0.5 * Float64(x / Float64(y / x))) tmp = 0.0 if (z <= 1e-275) tmp = t_0; elseif (z <= 1.4e-238) tmp = Float64(y * 0.5); elseif (z <= 7.6e-227) tmp = t_0; elseif (z <= 1.32e-138) tmp = Float64(y * 0.5); elseif (z <= 2.6e-112) tmp = t_0; elseif (z <= 8.8e-68) tmp = Float64(y * 0.5); elseif (z <= 2.6e-41) tmp = t_0; elseif (z <= 9.2e+34) tmp = Float64(y * 0.5); elseif (z <= 6e+56) tmp = Float64(Float64(z * -0.5) * Float64(z / y)); elseif (z <= 3.8e+80) tmp = Float64(y * 0.5); else tmp = Float64(-0.5 * Float64(z / Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 0.5 * (x / (y / x)); tmp = 0.0; if (z <= 1e-275) tmp = t_0; elseif (z <= 1.4e-238) tmp = y * 0.5; elseif (z <= 7.6e-227) tmp = t_0; elseif (z <= 1.32e-138) tmp = y * 0.5; elseif (z <= 2.6e-112) tmp = t_0; elseif (z <= 8.8e-68) tmp = y * 0.5; elseif (z <= 2.6e-41) tmp = t_0; elseif (z <= 9.2e+34) tmp = y * 0.5; elseif (z <= 6e+56) tmp = (z * -0.5) * (z / y); elseif (z <= 3.8e+80) tmp = y * 0.5; else tmp = -0.5 * (z / (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(0.5 * N[(x / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, 1e-275], t$95$0, If[LessEqual[z, 1.4e-238], N[(y * 0.5), $MachinePrecision], If[LessEqual[z, 7.6e-227], t$95$0, If[LessEqual[z, 1.32e-138], N[(y * 0.5), $MachinePrecision], If[LessEqual[z, 2.6e-112], t$95$0, If[LessEqual[z, 8.8e-68], N[(y * 0.5), $MachinePrecision], If[LessEqual[z, 2.6e-41], t$95$0, If[LessEqual[z, 9.2e+34], N[(y * 0.5), $MachinePrecision], If[LessEqual[z, 6e+56], N[(N[(z * -0.5), $MachinePrecision] * N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.8e+80], N[(y * 0.5), $MachinePrecision], N[(-0.5 * N[(z / N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.5 \cdot \frac{x}{\frac{y}{x}}\\
\mathbf{if}\;z \leq 10^{-275}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-238}:\\
\;\;\;\;y \cdot 0.5\\
\mathbf{elif}\;z \leq 7.6 \cdot 10^{-227}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 1.32 \cdot 10^{-138}:\\
\;\;\;\;y \cdot 0.5\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-112}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{-68}:\\
\;\;\;\;y \cdot 0.5\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-41}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{+34}:\\
\;\;\;\;y \cdot 0.5\\
\mathbf{elif}\;z \leq 6 \cdot 10^{+56}:\\
\;\;\;\;\left(z \cdot -0.5\right) \cdot \frac{z}{y}\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{+80}:\\
\;\;\;\;y \cdot 0.5\\
\mathbf{else}:\\
\;\;\;\;-0.5 \cdot \frac{z}{\frac{y}{z}}\\
\end{array}
\end{array}
if z < 9.99999999999999934e-276 or 1.40000000000000002e-238 < z < 7.60000000000000019e-227 or 1.32e-138 < z < 2.59999999999999992e-112 or 8.80000000000000009e-68 < z < 2.5999999999999999e-41Initial program 69.2%
Taylor expanded in y around 0 57.2%
unpow257.2%
unpow257.2%
difference-of-squares61.5%
associate-/l*65.6%
+-commutative65.6%
Simplified65.6%
div-inv65.6%
Applied egg-rr65.6%
Taylor expanded in z around 0 39.2%
unpow239.2%
associate-/l*40.7%
Simplified40.7%
if 9.99999999999999934e-276 < z < 1.40000000000000002e-238 or 7.60000000000000019e-227 < z < 1.32e-138 or 2.59999999999999992e-112 < z < 8.80000000000000009e-68 or 2.5999999999999999e-41 < z < 9.1999999999999993e34 or 6.00000000000000012e56 < z < 3.79999999999999997e80Initial program 68.4%
Taylor expanded in y around inf 63.4%
*-commutative63.4%
Simplified63.4%
if 9.1999999999999993e34 < z < 6.00000000000000012e56Initial program 77.2%
Taylor expanded in z around inf 32.2%
unpow232.2%
associate-*r/32.2%
Simplified32.2%
div-inv32.2%
associate-*r*32.2%
associate-*l*32.2%
div-inv32.2%
Applied egg-rr32.2%
if 3.79999999999999997e80 < z Initial program 71.1%
Taylor expanded in z around inf 65.3%
unpow265.3%
associate-*r/65.3%
Simplified65.3%
frac-2neg65.3%
div-inv65.3%
*-commutative65.3%
distribute-rgt-neg-in65.3%
metadata-eval65.3%
Applied egg-rr65.3%
associate-*r/65.3%
*-rgt-identity65.3%
metadata-eval65.3%
distribute-rgt-neg-in65.3%
associate-*r*65.3%
distribute-neg-frac65.3%
associate-/l*70.1%
distribute-neg-frac70.1%
neg-mul-170.1%
*-commutative70.1%
times-frac70.1%
metadata-eval70.1%
Simplified70.1%
neg-mul-170.1%
times-frac70.1%
metadata-eval70.1%
Applied egg-rr70.1%
Final simplification52.2%
(FPCore (x y z)
:precision binary64
(if (or (<= (* x x) 5e+260)
(and (not (<= (* x x) 2e+288)) (<= (* x x) 2e+304)))
(* -0.5 (- (/ z (/ y z)) y))
(* 0.5 (/ x (/ y x)))))
double code(double x, double y, double z) {
double tmp;
if (((x * x) <= 5e+260) || (!((x * x) <= 2e+288) && ((x * x) <= 2e+304))) {
tmp = -0.5 * ((z / (y / z)) - y);
} else {
tmp = 0.5 * (x / (y / x));
}
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 * x) <= 5d+260) .or. (.not. ((x * x) <= 2d+288)) .and. ((x * x) <= 2d+304)) then
tmp = (-0.5d0) * ((z / (y / z)) - y)
else
tmp = 0.5d0 * (x / (y / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (((x * x) <= 5e+260) || (!((x * x) <= 2e+288) && ((x * x) <= 2e+304))) {
tmp = -0.5 * ((z / (y / z)) - y);
} else {
tmp = 0.5 * (x / (y / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if ((x * x) <= 5e+260) or (not ((x * x) <= 2e+288) and ((x * x) <= 2e+304)): tmp = -0.5 * ((z / (y / z)) - y) else: tmp = 0.5 * (x / (y / x)) return tmp
function code(x, y, z) tmp = 0.0 if ((Float64(x * x) <= 5e+260) || (!(Float64(x * x) <= 2e+288) && (Float64(x * x) <= 2e+304))) tmp = Float64(-0.5 * Float64(Float64(z / Float64(y / z)) - y)); else tmp = Float64(0.5 * Float64(x / Float64(y / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (((x * x) <= 5e+260) || (~(((x * x) <= 2e+288)) && ((x * x) <= 2e+304))) tmp = -0.5 * ((z / (y / z)) - y); else tmp = 0.5 * (x / (y / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[N[(x * x), $MachinePrecision], 5e+260], And[N[Not[LessEqual[N[(x * x), $MachinePrecision], 2e+288]], $MachinePrecision], LessEqual[N[(x * x), $MachinePrecision], 2e+304]]], N[(-0.5 * N[(N[(z / N[(y / z), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(x / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot x \leq 5 \cdot 10^{+260} \lor \neg \left(x \cdot x \leq 2 \cdot 10^{+288}\right) \land x \cdot x \leq 2 \cdot 10^{+304}:\\
\;\;\;\;-0.5 \cdot \left(\frac{z}{\frac{y}{z}} - y\right)\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \frac{x}{\frac{y}{x}}\\
\end{array}
\end{array}
if (*.f64 x x) < 4.9999999999999996e260 or 2e288 < (*.f64 x x) < 1.9999999999999999e304Initial program 71.0%
sub-neg71.0%
+-commutative71.0%
neg-sub071.0%
associate-+l-71.0%
sub0-neg71.0%
neg-mul-171.0%
*-commutative71.0%
times-frac71.0%
associate--r+71.0%
div-sub71.0%
difference-of-squares71.0%
+-commutative71.0%
associate-*r/73.2%
associate-/l*99.9%
*-inverses99.9%
/-rgt-identity99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 82.8%
unpow282.8%
associate-/l*88.4%
Simplified88.4%
if 4.9999999999999996e260 < (*.f64 x x) < 2e288 or 1.9999999999999999e304 < (*.f64 x x) Initial program 66.0%
Taylor expanded in y around 0 66.0%
unpow266.0%
unpow266.0%
difference-of-squares83.6%
associate-/l*87.5%
+-commutative87.5%
Simplified87.5%
div-inv87.5%
Applied egg-rr87.5%
Taylor expanded in z around 0 76.9%
unpow276.9%
associate-/l*80.4%
Simplified80.4%
Final simplification86.1%
(FPCore (x y z)
:precision binary64
(if (<= (* z z) 2e-7)
(* (+ y (* x (/ x y))) (- -0.5))
(if (<= (* z z) 5e+300)
(* -0.5 (- (/ z (/ y z)) y))
(* 0.5 (* (+ x z) (/ (- x z) y))))))
double code(double x, double y, double z) {
double tmp;
if ((z * z) <= 2e-7) {
tmp = (y + (x * (x / y))) * -(-0.5);
} else if ((z * z) <= 5e+300) {
tmp = -0.5 * ((z / (y / z)) - y);
} else {
tmp = 0.5 * ((x + z) * ((x - z) / 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) :: tmp
if ((z * z) <= 2d-7) then
tmp = (y + (x * (x / y))) * -(-0.5d0)
else if ((z * z) <= 5d+300) then
tmp = (-0.5d0) * ((z / (y / z)) - y)
else
tmp = 0.5d0 * ((x + z) * ((x - z) / y))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z * z) <= 2e-7) {
tmp = (y + (x * (x / y))) * -(-0.5);
} else if ((z * z) <= 5e+300) {
tmp = -0.5 * ((z / (y / z)) - y);
} else {
tmp = 0.5 * ((x + z) * ((x - z) / y));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z * z) <= 2e-7: tmp = (y + (x * (x / y))) * -(-0.5) elif (z * z) <= 5e+300: tmp = -0.5 * ((z / (y / z)) - y) else: tmp = 0.5 * ((x + z) * ((x - z) / y)) return tmp
function code(x, y, z) tmp = 0.0 if (Float64(z * z) <= 2e-7) tmp = Float64(Float64(y + Float64(x * Float64(x / y))) * Float64(-(-0.5))); elseif (Float64(z * z) <= 5e+300) tmp = Float64(-0.5 * Float64(Float64(z / Float64(y / z)) - y)); else tmp = Float64(0.5 * Float64(Float64(x + z) * Float64(Float64(x - z) / y))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z * z) <= 2e-7) tmp = (y + (x * (x / y))) * -(-0.5); elseif ((z * z) <= 5e+300) tmp = -0.5 * ((z / (y / z)) - y); else tmp = 0.5 * ((x + z) * ((x - z) / y)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[N[(z * z), $MachinePrecision], 2e-7], N[(N[(y + N[(x * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * (--0.5)), $MachinePrecision], If[LessEqual[N[(z * z), $MachinePrecision], 5e+300], N[(-0.5 * N[(N[(z / N[(y / z), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(N[(x + z), $MachinePrecision] * N[(N[(x - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 2 \cdot 10^{-7}:\\
\;\;\;\;\left(y + x \cdot \frac{x}{y}\right) \cdot \left(--0.5\right)\\
\mathbf{elif}\;z \cdot z \leq 5 \cdot 10^{+300}:\\
\;\;\;\;-0.5 \cdot \left(\frac{z}{\frac{y}{z}} - y\right)\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(\left(x + z\right) \cdot \frac{x - z}{y}\right)\\
\end{array}
\end{array}
if (*.f64 z z) < 1.9999999999999999e-7Initial program 74.6%
sub-neg74.6%
+-commutative74.6%
neg-sub074.6%
associate-+l-74.6%
sub0-neg74.6%
neg-mul-174.6%
*-commutative74.6%
times-frac74.6%
associate--r+74.6%
div-sub74.6%
difference-of-squares74.6%
+-commutative74.6%
associate-*r/76.0%
associate-/l*99.9%
*-inverses99.9%
/-rgt-identity99.9%
metadata-eval99.9%
Simplified99.9%
clear-num99.9%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 88.7%
mul-1-neg88.7%
unpow288.7%
associate-*l/94.6%
distribute-rgt-neg-in94.6%
Simplified94.6%
if 1.9999999999999999e-7 < (*.f64 z z) < 5.00000000000000026e300Initial program 69.9%
sub-neg69.9%
+-commutative69.9%
neg-sub069.9%
associate-+l-69.9%
sub0-neg69.9%
neg-mul-169.9%
*-commutative69.9%
times-frac69.9%
associate--r+69.9%
div-sub69.9%
difference-of-squares69.9%
+-commutative69.9%
associate-*r/69.9%
associate-/l*99.8%
*-inverses99.8%
/-rgt-identity99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 78.4%
unpow278.4%
associate-/l*78.3%
Simplified78.3%
if 5.00000000000000026e300 < (*.f64 z z) Initial program 59.6%
Taylor expanded in y around 0 63.1%
unpow263.1%
unpow263.1%
difference-of-squares83.0%
associate-/l*93.9%
+-commutative93.9%
Simplified93.9%
Taylor expanded in y around 0 83.0%
*-commutative83.0%
associate-*r/93.9%
Simplified93.9%
Final simplification90.5%
(FPCore (x y z) :precision binary64 (if (<= (* x x) 4e-107) (* y 0.5) (if (<= (* x x) 4e+92) (* (* z z) (/ -0.5 y)) (* 0.5 (/ x (/ y x))))))
double code(double x, double y, double z) {
double tmp;
if ((x * x) <= 4e-107) {
tmp = y * 0.5;
} else if ((x * x) <= 4e+92) {
tmp = (z * z) * (-0.5 / y);
} else {
tmp = 0.5 * (x / (y / x));
}
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 * x) <= 4d-107) then
tmp = y * 0.5d0
else if ((x * x) <= 4d+92) then
tmp = (z * z) * ((-0.5d0) / y)
else
tmp = 0.5d0 * (x / (y / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x * x) <= 4e-107) {
tmp = y * 0.5;
} else if ((x * x) <= 4e+92) {
tmp = (z * z) * (-0.5 / y);
} else {
tmp = 0.5 * (x / (y / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x * x) <= 4e-107: tmp = y * 0.5 elif (x * x) <= 4e+92: tmp = (z * z) * (-0.5 / y) else: tmp = 0.5 * (x / (y / x)) return tmp
function code(x, y, z) tmp = 0.0 if (Float64(x * x) <= 4e-107) tmp = Float64(y * 0.5); elseif (Float64(x * x) <= 4e+92) tmp = Float64(Float64(z * z) * Float64(-0.5 / y)); else tmp = Float64(0.5 * Float64(x / Float64(y / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x * x) <= 4e-107) tmp = y * 0.5; elseif ((x * x) <= 4e+92) tmp = (z * z) * (-0.5 / y); else tmp = 0.5 * (x / (y / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[N[(x * x), $MachinePrecision], 4e-107], N[(y * 0.5), $MachinePrecision], If[LessEqual[N[(x * x), $MachinePrecision], 4e+92], N[(N[(z * z), $MachinePrecision] * N[(-0.5 / y), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(x / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot x \leq 4 \cdot 10^{-107}:\\
\;\;\;\;y \cdot 0.5\\
\mathbf{elif}\;x \cdot x \leq 4 \cdot 10^{+92}:\\
\;\;\;\;\left(z \cdot z\right) \cdot \frac{-0.5}{y}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \frac{x}{\frac{y}{x}}\\
\end{array}
\end{array}
if (*.f64 x x) < 4e-107Initial program 72.9%
Taylor expanded in y around inf 50.7%
*-commutative50.7%
Simplified50.7%
if 4e-107 < (*.f64 x x) < 4.0000000000000002e92Initial program 73.0%
Taylor expanded in z around inf 53.3%
unpow253.3%
associate-*r/53.3%
Simplified53.3%
Taylor expanded in z around 0 53.3%
unpow253.3%
associate-*r/53.3%
*-commutative53.3%
associate-*r/53.3%
Simplified53.3%
if 4.0000000000000002e92 < (*.f64 x x) Initial program 64.6%
Taylor expanded in y around 0 62.6%
unpow262.6%
unpow262.6%
difference-of-squares75.3%
associate-/l*80.8%
+-commutative80.8%
Simplified80.8%
div-inv80.7%
Applied egg-rr80.7%
Taylor expanded in z around 0 63.5%
unpow263.5%
associate-/l*66.0%
Simplified66.0%
Final simplification57.3%
(FPCore (x y z) :precision binary64 (if (<= (* x x) 1e+240) (* -0.5 (- (/ z (/ y z)) y)) (* (+ y (* x (/ x y))) (- -0.5))))
double code(double x, double y, double z) {
double tmp;
if ((x * x) <= 1e+240) {
tmp = -0.5 * ((z / (y / z)) - y);
} else {
tmp = (y + (x * (x / y))) * -(-0.5);
}
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 * x) <= 1d+240) then
tmp = (-0.5d0) * ((z / (y / z)) - y)
else
tmp = (y + (x * (x / y))) * -(-0.5d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x * x) <= 1e+240) {
tmp = -0.5 * ((z / (y / z)) - y);
} else {
tmp = (y + (x * (x / y))) * -(-0.5);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x * x) <= 1e+240: tmp = -0.5 * ((z / (y / z)) - y) else: tmp = (y + (x * (x / y))) * -(-0.5) return tmp
function code(x, y, z) tmp = 0.0 if (Float64(x * x) <= 1e+240) tmp = Float64(-0.5 * Float64(Float64(z / Float64(y / z)) - y)); else tmp = Float64(Float64(y + Float64(x * Float64(x / y))) * Float64(-(-0.5))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x * x) <= 1e+240) tmp = -0.5 * ((z / (y / z)) - y); else tmp = (y + (x * (x / y))) * -(-0.5); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[N[(x * x), $MachinePrecision], 1e+240], N[(-0.5 * N[(N[(z / N[(y / z), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], N[(N[(y + N[(x * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * (--0.5)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot x \leq 10^{+240}:\\
\;\;\;\;-0.5 \cdot \left(\frac{z}{\frac{y}{z}} - y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y + x \cdot \frac{x}{y}\right) \cdot \left(--0.5\right)\\
\end{array}
\end{array}
if (*.f64 x x) < 1.00000000000000001e240Initial program 72.4%
sub-neg72.4%
+-commutative72.4%
neg-sub072.4%
associate-+l-72.4%
sub0-neg72.4%
neg-mul-172.4%
*-commutative72.4%
times-frac72.4%
associate--r+72.4%
div-sub72.4%
difference-of-squares72.4%
+-commutative72.4%
associate-*r/73.7%
associate-/l*99.9%
*-inverses99.9%
/-rgt-identity99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 83.9%
unpow283.9%
associate-/l*88.8%
Simplified88.8%
if 1.00000000000000001e240 < (*.f64 x x) Initial program 63.8%
sub-neg63.8%
+-commutative63.8%
neg-sub063.8%
associate-+l-63.8%
sub0-neg63.8%
neg-mul-163.8%
*-commutative63.8%
times-frac63.8%
associate--r+63.8%
div-sub63.8%
difference-of-squares79.2%
+-commutative79.2%
associate-*r/82.5%
associate-/l*100.0%
*-inverses100.0%
/-rgt-identity100.0%
metadata-eval100.0%
Simplified100.0%
clear-num99.9%
associate-/r/99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 75.2%
mul-1-neg75.2%
unpow275.2%
associate-*l/89.0%
distribute-rgt-neg-in89.0%
Simplified89.0%
Final simplification88.9%
(FPCore (x y z) :precision binary64 (if (or (<= z 2.35e+36) (and (not (<= z 7.5e+56)) (<= z 7.4e+81))) (* y 0.5) (* -0.5 (/ z (/ y z)))))
double code(double x, double y, double z) {
double tmp;
if ((z <= 2.35e+36) || (!(z <= 7.5e+56) && (z <= 7.4e+81))) {
tmp = y * 0.5;
} else {
tmp = -0.5 * (z / (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 <= 2.35d+36) .or. (.not. (z <= 7.5d+56)) .and. (z <= 7.4d+81)) then
tmp = y * 0.5d0
else
tmp = (-0.5d0) * (z / (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= 2.35e+36) || (!(z <= 7.5e+56) && (z <= 7.4e+81))) {
tmp = y * 0.5;
} else {
tmp = -0.5 * (z / (y / z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= 2.35e+36) or (not (z <= 7.5e+56) and (z <= 7.4e+81)): tmp = y * 0.5 else: tmp = -0.5 * (z / (y / z)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= 2.35e+36) || (!(z <= 7.5e+56) && (z <= 7.4e+81))) tmp = Float64(y * 0.5); else tmp = Float64(-0.5 * Float64(z / Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= 2.35e+36) || (~((z <= 7.5e+56)) && (z <= 7.4e+81))) tmp = y * 0.5; else tmp = -0.5 * (z / (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, 2.35e+36], And[N[Not[LessEqual[z, 7.5e+56]], $MachinePrecision], LessEqual[z, 7.4e+81]]], N[(y * 0.5), $MachinePrecision], N[(-0.5 * N[(z / N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 2.35 \cdot 10^{+36} \lor \neg \left(z \leq 7.5 \cdot 10^{+56}\right) \land z \leq 7.4 \cdot 10^{+81}:\\
\;\;\;\;y \cdot 0.5\\
\mathbf{else}:\\
\;\;\;\;-0.5 \cdot \frac{z}{\frac{y}{z}}\\
\end{array}
\end{array}
if z < 2.34999999999999994e36 or 7.4999999999999999e56 < z < 7.4000000000000001e81Initial program 68.9%
Taylor expanded in y around inf 44.0%
*-commutative44.0%
Simplified44.0%
if 2.34999999999999994e36 < z < 7.4999999999999999e56 or 7.4000000000000001e81 < z Initial program 71.5%
Taylor expanded in z around inf 63.2%
unpow263.2%
associate-*r/63.2%
Simplified63.2%
frac-2neg63.2%
div-inv63.2%
*-commutative63.2%
distribute-rgt-neg-in63.2%
metadata-eval63.2%
Applied egg-rr63.2%
associate-*r/63.2%
*-rgt-identity63.2%
metadata-eval63.2%
distribute-rgt-neg-in63.2%
associate-*r*63.2%
distribute-neg-frac63.2%
associate-/l*67.6%
distribute-neg-frac67.6%
neg-mul-167.6%
*-commutative67.6%
times-frac67.6%
metadata-eval67.6%
Simplified67.6%
neg-mul-167.6%
times-frac67.6%
metadata-eval67.6%
Applied egg-rr67.6%
Final simplification49.7%
(FPCore (x y z) :precision binary64 (* y 0.5))
double code(double x, double y, double z) {
return y * 0.5;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = y * 0.5d0
end function
public static double code(double x, double y, double z) {
return y * 0.5;
}
def code(x, y, z): return y * 0.5
function code(x, y, z) return Float64(y * 0.5) end
function tmp = code(x, y, z) tmp = y * 0.5; end
code[x_, y_, z_] := N[(y * 0.5), $MachinePrecision]
\begin{array}{l}
\\
y \cdot 0.5
\end{array}
Initial program 69.6%
Taylor expanded in y around inf 36.4%
*-commutative36.4%
Simplified36.4%
Final simplification36.4%
(FPCore (x y z) :precision binary64 (- (* y 0.5) (* (* (/ 0.5 y) (+ z x)) (- z x))))
double code(double x, double y, double z) {
return (y * 0.5) - (((0.5 / y) * (z + x)) * (z - x));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (y * 0.5d0) - (((0.5d0 / y) * (z + x)) * (z - x))
end function
public static double code(double x, double y, double z) {
return (y * 0.5) - (((0.5 / y) * (z + x)) * (z - x));
}
def code(x, y, z): return (y * 0.5) - (((0.5 / y) * (z + x)) * (z - x))
function code(x, y, z) return Float64(Float64(y * 0.5) - Float64(Float64(Float64(0.5 / y) * Float64(z + x)) * Float64(z - x))) end
function tmp = code(x, y, z) tmp = (y * 0.5) - (((0.5 / y) * (z + x)) * (z - x)); end
code[x_, y_, z_] := N[(N[(y * 0.5), $MachinePrecision] - N[(N[(N[(0.5 / y), $MachinePrecision] * N[(z + x), $MachinePrecision]), $MachinePrecision] * N[(z - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot 0.5 - \left(\frac{0.5}{y} \cdot \left(z + x\right)\right) \cdot \left(z - x\right)
\end{array}
herbie shell --seed 2023230
(FPCore (x y z)
:name "Diagrams.TwoD.Apollonian:initialConfig from diagrams-contrib-1.3.0.5, A"
:precision binary64
:herbie-target
(- (* y 0.5) (* (* (/ 0.5 y) (+ z x)) (- z x)))
(/ (- (+ (* x x) (* y y)) (* z z)) (* y 2.0)))