\[x \cdot \log \left(\frac{x}{y}\right) - z
\]
↓
\[\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) \cdot \left(x \cdot 3\right) - z
\]
(FPCore (x y z) :precision binary64 (- (* x (log (/ x y))) z))
↓
(FPCore (x y z)
:precision binary64
(- (* (log (/ (cbrt x) (cbrt y))) (* x 3.0)) z))
double code(double x, double y, double z) {
return (x * log((x / y))) - z;
}
↓
double code(double x, double y, double z) {
return (log((cbrt(x) / cbrt(y))) * (x * 3.0)) - z;
}
public static double code(double x, double y, double z) {
return (x * Math.log((x / y))) - z;
}
↓
public static double code(double x, double y, double z) {
return (Math.log((Math.cbrt(x) / Math.cbrt(y))) * (x * 3.0)) - z;
}
function code(x, y, z)
return Float64(Float64(x * log(Float64(x / y))) - z)
end
↓
function code(x, y, z)
return Float64(Float64(log(Float64(cbrt(x) / cbrt(y))) * Float64(x * 3.0)) - z)
end
code[x_, y_, z_] := N[(N[(x * N[Log[N[(x / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]
↓
code[x_, y_, z_] := N[(N[(N[Log[N[(N[Power[x, 1/3], $MachinePrecision] / N[Power[y, 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(x * 3.0), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]
x \cdot \log \left(\frac{x}{y}\right) - z
↓
\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) \cdot \left(x \cdot 3\right) - z
Alternatives
| Alternative 1 |
|---|
| Error | 7.3 |
|---|
| Cost | 20425 |
|---|
\[\begin{array}{l}
t_0 := x \cdot \log \left(\frac{x}{y}\right)\\
\mathbf{if}\;t_0 \leq -\infty \lor \neg \left(t_0 \leq 2 \cdot 10^{+307}\right):\\
\;\;\;\;x \cdot \log \left(x \cdot y\right) - z\\
\mathbf{else}:\\
\;\;\;\;t_0 - z\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 7.8 |
|---|
| Cost | 20424 |
|---|
\[\begin{array}{l}
t_0 := x \cdot \log \left(\frac{x}{y}\right)\\
\mathbf{if}\;t_0 \leq -\infty:\\
\;\;\;\;-z\\
\mathbf{elif}\;t_0 \leq 2 \cdot 10^{+307}:\\
\;\;\;\;t_0 - z\\
\mathbf{else}:\\
\;\;\;\;-z\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 0.2 |
|---|
| Cost | 19776 |
|---|
\[x \cdot \left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) \cdot 3\right) - z
\]
| Alternative 4 |
|---|
| Error | 5.9 |
|---|
| Cost | 13512 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -6.5 \cdot 10^{-169}:\\
\;\;\;\;x \cdot \left(-\log \left(\frac{y}{x}\right)\right) - z\\
\mathbf{elif}\;x \leq -2 \cdot 10^{-309}:\\
\;\;\;\;-z\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x - \log y\right) - z\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 0.3 |
|---|
| Cost | 13508 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{-310}:\\
\;\;\;\;x \cdot \left(\log \left(-x\right) - \log \left(-y\right)\right) - z\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x - \log y\right) - z\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 32.0 |
|---|
| Cost | 128 |
|---|
\[-z
\]