Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[1 + \frac{4 \cdot \left(\left(x + y \cdot 0.25\right) - z\right)}{y}
\]
↓
\[2 + \frac{\left(x - z\right) \cdot 4}{y}
\]
(FPCore (x y z)
:precision binary64
(+ 1.0 (/ (* 4.0 (- (+ x (* y 0.25)) z)) y))) ↓
(FPCore (x y z) :precision binary64 (+ 2.0 (/ (* (- x z) 4.0) y))) double code(double x, double y, double z) {
return 1.0 + ((4.0 * ((x + (y * 0.25)) - z)) / y);
}
↓
double code(double x, double y, double z) {
return 2.0 + (((x - z) * 4.0) / y);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 1.0d0 + ((4.0d0 * ((x + (y * 0.25d0)) - 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 = 2.0d0 + (((x - z) * 4.0d0) / y)
end function
public static double code(double x, double y, double z) {
return 1.0 + ((4.0 * ((x + (y * 0.25)) - z)) / y);
}
↓
public static double code(double x, double y, double z) {
return 2.0 + (((x - z) * 4.0) / y);
}
def code(x, y, z):
return 1.0 + ((4.0 * ((x + (y * 0.25)) - z)) / y)
↓
def code(x, y, z):
return 2.0 + (((x - z) * 4.0) / y)
function code(x, y, z)
return Float64(1.0 + Float64(Float64(4.0 * Float64(Float64(x + Float64(y * 0.25)) - z)) / y))
end
↓
function code(x, y, z)
return Float64(2.0 + Float64(Float64(Float64(x - z) * 4.0) / y))
end
function tmp = code(x, y, z)
tmp = 1.0 + ((4.0 * ((x + (y * 0.25)) - z)) / y);
end
↓
function tmp = code(x, y, z)
tmp = 2.0 + (((x - z) * 4.0) / y);
end
code[x_, y_, z_] := N[(1.0 + N[(N[(4.0 * N[(N[(x + N[(y * 0.25), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_] := N[(2.0 + N[(N[(N[(x - z), $MachinePrecision] * 4.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
1 + \frac{4 \cdot \left(\left(x + y \cdot 0.25\right) - z\right)}{y}
↓
2 + \frac{\left(x - z\right) \cdot 4}{y}
Alternatives Alternative 1 Error 31.0 Cost 1112
\[\begin{array}{l}
t_0 := \frac{-4 \cdot z}{y}\\
t_1 := \frac{4 \cdot x}{y}\\
\mathbf{if}\;x \leq -3.1 \cdot 10^{+97}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -2.6 \cdot 10^{+19}:\\
\;\;\;\;2\\
\mathbf{elif}\;x \leq -4.3 \cdot 10^{-19}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -3.95 \cdot 10^{-209}:\\
\;\;\;\;2\\
\mathbf{elif}\;x \leq 3.6 \cdot 10^{-308}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 1.5 \cdot 10^{+50}:\\
\;\;\;\;2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 2 Error 30.7 Cost 1112
\[\begin{array}{l}
t_0 := 1 + \frac{-4 \cdot z}{y}\\
t_1 := \frac{4 \cdot x}{y}\\
\mathbf{if}\;x \leq -5.5 \cdot 10^{+95}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -6 \cdot 10^{+44}:\\
\;\;\;\;2\\
\mathbf{elif}\;x \leq -7.8 \cdot 10^{-19}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -5.5 \cdot 10^{-209}:\\
\;\;\;\;2\\
\mathbf{elif}\;x \leq 4.7 \cdot 10^{-276}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 1.62 \cdot 10^{+50}:\\
\;\;\;\;2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 3 Error 29.6 Cost 976
\[\begin{array}{l}
t_0 := 1 + \frac{4 \cdot x}{y}\\
\mathbf{if}\;x \leq -1.1 \cdot 10^{+99}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -7.9 \cdot 10^{-209}:\\
\;\;\;\;2\\
\mathbf{elif}\;x \leq 1.4 \cdot 10^{-278}:\\
\;\;\;\;1 + \frac{-4 \cdot z}{y}\\
\mathbf{elif}\;x \leq 1.5 \cdot 10^{+50}:\\
\;\;\;\;2\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 4 Error 14.7 Cost 976
\[\begin{array}{l}
t_0 := 2 + \frac{-4 \cdot z}{y}\\
t_1 := 1 + \frac{4 \cdot x}{y}\\
\mathbf{if}\;x \leq -2.2 \cdot 10^{+98}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.16 \cdot 10^{+69}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{+102}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 4.4 \cdot 10^{+201}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 5 Error 11.0 Cost 840
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.6 \cdot 10^{+68}:\\
\;\;\;\;2 + \frac{4 \cdot x}{y}\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{+50}:\\
\;\;\;\;2 + \frac{-4 \cdot z}{y}\\
\mathbf{else}:\\
\;\;\;\;4 \cdot \left(\frac{x}{y} - \frac{z}{y}\right)\\
\end{array}
\]
Alternative 6 Error 9.5 Cost 712
\[\begin{array}{l}
t_0 := 2 + \frac{4 \cdot x}{y}\\
\mathbf{if}\;x \leq -7.6 \cdot 10^{+70}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{+67}:\\
\;\;\;\;2 + \frac{-4 \cdot z}{y}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 7 Error 11.0 Cost 712
\[\begin{array}{l}
\mathbf{if}\;x \leq -4.5 \cdot 10^{+68}:\\
\;\;\;\;2 + \frac{4 \cdot x}{y}\\
\mathbf{elif}\;x \leq 1.62 \cdot 10^{+50}:\\
\;\;\;\;2 + \frac{-4 \cdot z}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{4 \cdot \left(x - z\right)}{y}\\
\end{array}
\]
Alternative 8 Error 30.8 Cost 584
\[\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{-31}:\\
\;\;\;\;2\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{-44}:\\
\;\;\;\;\frac{-4 \cdot z}{y}\\
\mathbf{else}:\\
\;\;\;\;2\\
\end{array}
\]
Alternative 9 Error 57.8 Cost 64
\[1
\]
Alternative 10 Error 36.9 Cost 64
\[2
\]