Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[\frac{x - y}{z - y}
\]
↓
\[\frac{y}{y - z} - \frac{x}{y - z}
\]
(FPCore (x y z) :precision binary64 (/ (- x y) (- z y))) ↓
(FPCore (x y z) :precision binary64 (- (/ y (- y z)) (/ x (- y z)))) double code(double x, double y, double z) {
return (x - y) / (z - y);
}
↓
double code(double x, double y, double z) {
return (y / (y - z)) - (x / (y - 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) / (z - y)
end function
↓
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (y / (y - z)) - (x / (y - z))
end function
public static double code(double x, double y, double z) {
return (x - y) / (z - y);
}
↓
public static double code(double x, double y, double z) {
return (y / (y - z)) - (x / (y - z));
}
def code(x, y, z):
return (x - y) / (z - y)
↓
def code(x, y, z):
return (y / (y - z)) - (x / (y - z))
function code(x, y, z)
return Float64(Float64(x - y) / Float64(z - y))
end
↓
function code(x, y, z)
return Float64(Float64(y / Float64(y - z)) - Float64(x / Float64(y - z)))
end
function tmp = code(x, y, z)
tmp = (x - y) / (z - y);
end
↓
function tmp = code(x, y, z)
tmp = (y / (y - z)) - (x / (y - z));
end
code[x_, y_, z_] := N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_] := N[(N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision] - N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{x - y}{z - y}
↓
\frac{y}{y - z} - \frac{x}{y - z}
Alternatives Alternative 1 Error 25.4 Cost 588
\[\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{+45}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq -1.5 \cdot 10^{-37}:\\
\;\;\;\;\frac{-x}{y}\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{-47}:\\
\;\;\;\;\frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\]
Alternative 2 Error 19.2 Cost 585
\[\begin{array}{l}
\mathbf{if}\;y \leq -2.85 \cdot 10^{-117} \lor \neg \left(y \leq 2.6 \cdot 10^{-47}\right):\\
\;\;\;\;1 - \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z}\\
\end{array}
\]
Alternative 3 Error 15.8 Cost 585
\[\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+22} \lor \neg \left(y \leq 5.1 \cdot 10^{-47}\right):\\
\;\;\;\;1 - \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z - y}\\
\end{array}
\]
Alternative 4 Error 15.1 Cost 584
\[\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+23}:\\
\;\;\;\;1 - \frac{x}{y}\\
\mathbf{elif}\;y \leq 6.6:\\
\;\;\;\;\frac{x}{z - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{y - z}\\
\end{array}
\]
Alternative 5 Error 25.3 Cost 456
\[\begin{array}{l}
\mathbf{if}\;y \leq -8.8 \cdot 10^{+21}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{-47}:\\
\;\;\;\;\frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\]
Alternative 6 Error 0.0 Cost 448
\[\frac{x - y}{z - y}
\]
Alternative 7 Error 40.3 Cost 64
\[1
\]