Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[\frac{x + y \cdot \left(z - x\right)}{z}
\]
↓
\[\frac{x}{z} + \left(1 - \frac{x}{z}\right) \cdot y
\]
(FPCore (x y z) :precision binary64 (/ (+ x (* y (- z x))) z)) ↓
(FPCore (x y z) :precision binary64 (+ (/ x z) (* (- 1.0 (/ x z)) y))) double code(double x, double y, double z) {
return (x + (y * (z - x))) / z;
}
↓
double code(double x, double y, double z) {
return (x / z) + ((1.0 - (x / z)) * y);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x + (y * (z - x))) / z
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 = (x / z) + ((1.0d0 - (x / z)) * y)
end function
public static double code(double x, double y, double z) {
return (x + (y * (z - x))) / z;
}
↓
public static double code(double x, double y, double z) {
return (x / z) + ((1.0 - (x / z)) * y);
}
def code(x, y, z):
return (x + (y * (z - x))) / z
↓
def code(x, y, z):
return (x / z) + ((1.0 - (x / z)) * y)
function code(x, y, z)
return Float64(Float64(x + Float64(y * Float64(z - x))) / z)
end
↓
function code(x, y, z)
return Float64(Float64(x / z) + Float64(Float64(1.0 - Float64(x / z)) * y))
end
function tmp = code(x, y, z)
tmp = (x + (y * (z - x))) / z;
end
↓
function tmp = code(x, y, z)
tmp = (x / z) + ((1.0 - (x / z)) * y);
end
code[x_, y_, z_] := N[(N[(x + N[(y * N[(z - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]
↓
code[x_, y_, z_] := N[(N[(x / z), $MachinePrecision] + N[(N[(1.0 - N[(x / z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]
\frac{x + y \cdot \left(z - x\right)}{z}
↓
\frac{x}{z} + \left(1 - \frac{x}{z}\right) \cdot y
Alternatives Alternative 1 Error 0.3 Cost 840
\[\begin{array}{l}
t_0 := y - \frac{x}{z} \cdot y\\
\mathbf{if}\;y \leq -2.5972522390269273 \cdot 10^{+46}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 1698052925.6168976:\\
\;\;\;\;\frac{x + y \cdot \left(z - x\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 2 Error 8.2 Cost 712
\[\begin{array}{l}
t_0 := x \cdot \frac{1 - y}{z}\\
\mathbf{if}\;x \leq -3.4 \cdot 10^{+85}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 4.3 \cdot 10^{+103}:\\
\;\;\;\;\frac{x}{z} + y\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 3 Error 0.8 Cost 712
\[\begin{array}{l}
t_0 := y - \frac{x}{z} \cdot y\\
\mathbf{if}\;y \leq -311.8396536530809:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 3.0507767244179422 \cdot 10^{-9}:\\
\;\;\;\;\frac{x}{z} + y\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 4 Error 9.3 Cost 648
\[\begin{array}{l}
\mathbf{if}\;x \leq -5.4 \cdot 10^{+276}:\\
\;\;\;\;\frac{x}{z}\\
\mathbf{elif}\;x \leq -1.42 \cdot 10^{+249}:\\
\;\;\;\;\frac{-y}{\frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} + y\\
\end{array}
\]
Alternative 5 Error 9.3 Cost 648
\[\begin{array}{l}
\mathbf{if}\;x \leq -5.4 \cdot 10^{+276}:\\
\;\;\;\;\frac{x}{z}\\
\mathbf{elif}\;x \leq -1.42 \cdot 10^{+249}:\\
\;\;\;\;\frac{-x}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} + y\\
\end{array}
\]
Alternative 6 Error 19.8 Cost 456
\[\begin{array}{l}
\mathbf{if}\;y \leq -4.069162676670636 \cdot 10^{-16}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 3.322231104509677 \cdot 10^{-18}:\\
\;\;\;\;\frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\]
Alternative 7 Error 8.9 Cost 320
\[\frac{x}{z} + y
\]
Alternative 8 Error 31.5 Cost 64
\[y
\]