
(FPCore (x y z) :precision binary64 (/ (+ x (* y (- z x))) z))
double code(double x, double y, double z) {
return (x + (y * (z - x))) / 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 - x))) / z
end function
public static double code(double x, double y, double z) {
return (x + (y * (z - x))) / z;
}
def code(x, y, z): return (x + (y * (z - x))) / z
function code(x, y, z) return Float64(Float64(x + Float64(y * Float64(z - x))) / z) end
function tmp = code(x, y, z) tmp = (x + (y * (z - x))) / z; end
code[x_, y_, z_] := N[(N[(x + N[(y * N[(z - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + y \cdot \left(z - x\right)}{z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (/ (+ x (* y (- z x))) z))
double code(double x, double y, double z) {
return (x + (y * (z - x))) / 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 - x))) / z
end function
public static double code(double x, double y, double z) {
return (x + (y * (z - x))) / z;
}
def code(x, y, z): return (x + (y * (z - x))) / z
function code(x, y, z) return Float64(Float64(x + Float64(y * Float64(z - x))) / z) end
function tmp = code(x, y, z) tmp = (x + (y * (z - x))) / z; end
code[x_, y_, z_] := N[(N[(x + N[(y * N[(z - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + y \cdot \left(z - x\right)}{z}
\end{array}
(FPCore (x y z) :precision binary64 (if (or (<= y -4.3e+14) (not (<= y 2e+35))) (/ y (/ z (- z x))) (/ (+ x (* y (- z x))) z)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -4.3e+14) || !(y <= 2e+35)) {
tmp = y / (z / (z - x));
} else {
tmp = (x + (y * (z - x))) / 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 ((y <= (-4.3d+14)) .or. (.not. (y <= 2d+35))) then
tmp = y / (z / (z - x))
else
tmp = (x + (y * (z - x))) / z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -4.3e+14) || !(y <= 2e+35)) {
tmp = y / (z / (z - x));
} else {
tmp = (x + (y * (z - x))) / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -4.3e+14) or not (y <= 2e+35): tmp = y / (z / (z - x)) else: tmp = (x + (y * (z - x))) / z return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -4.3e+14) || !(y <= 2e+35)) tmp = Float64(y / Float64(z / Float64(z - x))); else tmp = Float64(Float64(x + Float64(y * Float64(z - x))) / z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -4.3e+14) || ~((y <= 2e+35))) tmp = y / (z / (z - x)); else tmp = (x + (y * (z - x))) / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -4.3e+14], N[Not[LessEqual[y, 2e+35]], $MachinePrecision]], N[(y / N[(z / N[(z - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y * N[(z - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.3 \cdot 10^{+14} \lor \neg \left(y \leq 2 \cdot 10^{+35}\right):\\
\;\;\;\;\frac{y}{\frac{z}{z - x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \left(z - x\right)}{z}\\
\end{array}
\end{array}
(FPCore (x y z)
:precision binary64
(if (or (<= x -2.15e+27)
(and (not (<= x 7.5e-88)) (or (<= x 1.35e-31) (not (<= x 5.5e+60)))))
(* (- 1.0 y) (/ x z))
(+ y (/ x z))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -2.15e+27) || (!(x <= 7.5e-88) && ((x <= 1.35e-31) || !(x <= 5.5e+60)))) {
tmp = (1.0 - y) * (x / z);
} else {
tmp = y + (x / 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 ((x <= (-2.15d+27)) .or. (.not. (x <= 7.5d-88)) .and. (x <= 1.35d-31) .or. (.not. (x <= 5.5d+60))) then
tmp = (1.0d0 - y) * (x / z)
else
tmp = y + (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -2.15e+27) || (!(x <= 7.5e-88) && ((x <= 1.35e-31) || !(x <= 5.5e+60)))) {
tmp = (1.0 - y) * (x / z);
} else {
tmp = y + (x / z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -2.15e+27) or (not (x <= 7.5e-88) and ((x <= 1.35e-31) or not (x <= 5.5e+60))): tmp = (1.0 - y) * (x / z) else: tmp = y + (x / z) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -2.15e+27) || (!(x <= 7.5e-88) && ((x <= 1.35e-31) || !(x <= 5.5e+60)))) tmp = Float64(Float64(1.0 - y) * Float64(x / z)); else tmp = Float64(y + Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -2.15e+27) || (~((x <= 7.5e-88)) && ((x <= 1.35e-31) || ~((x <= 5.5e+60))))) tmp = (1.0 - y) * (x / z); else tmp = y + (x / z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -2.15e+27], And[N[Not[LessEqual[x, 7.5e-88]], $MachinePrecision], Or[LessEqual[x, 1.35e-31], N[Not[LessEqual[x, 5.5e+60]], $MachinePrecision]]]], N[(N[(1.0 - y), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(y + N[(x / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.15 \cdot 10^{+27} \lor \neg \left(x \leq 7.5 \cdot 10^{-88}\right) \land \left(x \leq 1.35 \cdot 10^{-31} \lor \neg \left(x \leq 5.5 \cdot 10^{+60}\right)\right):\\
\;\;\;\;\left(1 - y\right) \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;y + \frac{x}{z}\\
\end{array}
\end{array}
(FPCore (x y z) :precision binary64 (if (<= z 5e-106) (+ y (/ (* x (- 1.0 y)) z)) (+ (/ x z) (* y (- 1.0 (/ x z))))))
double code(double x, double y, double z) {
double tmp;
if (z <= 5e-106) {
tmp = y + ((x * (1.0 - y)) / z);
} else {
tmp = (x / z) + (y * (1.0 - (x / 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 <= 5d-106) then
tmp = y + ((x * (1.0d0 - y)) / z)
else
tmp = (x / z) + (y * (1.0d0 - (x / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= 5e-106) {
tmp = y + ((x * (1.0 - y)) / z);
} else {
tmp = (x / z) + (y * (1.0 - (x / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= 5e-106: tmp = y + ((x * (1.0 - y)) / z) else: tmp = (x / z) + (y * (1.0 - (x / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= 5e-106) tmp = Float64(y + Float64(Float64(x * Float64(1.0 - y)) / z)); else tmp = Float64(Float64(x / z) + Float64(y * Float64(1.0 - Float64(x / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= 5e-106) tmp = y + ((x * (1.0 - y)) / z); else tmp = (x / z) + (y * (1.0 - (x / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, 5e-106], N[(y + N[(N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] + N[(y * N[(1.0 - N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 5 \cdot 10^{-106}:\\
\;\;\;\;y + \frac{x \cdot \left(1 - y\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} + y \cdot \left(1 - \frac{x}{z}\right)\\
\end{array}
\end{array}
(FPCore (x y z) :precision binary64 (if (<= y 7.6e+105) (+ y (/ x z)) (if (or (<= y 1.35e+201) (not (<= y 1.6e+236))) (* y (/ (- x) z)) y)))
double code(double x, double y, double z) {
double tmp;
if (y <= 7.6e+105) {
tmp = y + (x / z);
} else if ((y <= 1.35e+201) || !(y <= 1.6e+236)) {
tmp = y * (-x / z);
} else {
tmp = 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 (y <= 7.6d+105) then
tmp = y + (x / z)
else if ((y <= 1.35d+201) .or. (.not. (y <= 1.6d+236))) then
tmp = y * (-x / z)
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= 7.6e+105) {
tmp = y + (x / z);
} else if ((y <= 1.35e+201) || !(y <= 1.6e+236)) {
tmp = y * (-x / z);
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= 7.6e+105: tmp = y + (x / z) elif (y <= 1.35e+201) or not (y <= 1.6e+236): tmp = y * (-x / z) else: tmp = y return tmp
function code(x, y, z) tmp = 0.0 if (y <= 7.6e+105) tmp = Float64(y + Float64(x / z)); elseif ((y <= 1.35e+201) || !(y <= 1.6e+236)) tmp = Float64(y * Float64(Float64(-x) / z)); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= 7.6e+105) tmp = y + (x / z); elseif ((y <= 1.35e+201) || ~((y <= 1.6e+236))) tmp = y * (-x / z); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, 7.6e+105], N[(y + N[(x / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 1.35e+201], N[Not[LessEqual[y, 1.6e+236]], $MachinePrecision]], N[(y * N[((-x) / z), $MachinePrecision]), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 7.6 \cdot 10^{+105}:\\
\;\;\;\;y + \frac{x}{z}\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{+201} \lor \neg \left(y \leq 1.6 \cdot 10^{+236}\right):\\
\;\;\;\;y \cdot \frac{-x}{z}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
(FPCore (x y z) :precision binary64 (if (or (<= y -1.0) (not (<= y 6.2e-14))) (* (- z x) (/ y z)) (+ y (/ x z))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -1.0) || !(y <= 6.2e-14)) {
tmp = (z - x) * (y / z);
} else {
tmp = y + (x / 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 ((y <= (-1.0d0)) .or. (.not. (y <= 6.2d-14))) then
tmp = (z - x) * (y / z)
else
tmp = y + (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -1.0) || !(y <= 6.2e-14)) {
tmp = (z - x) * (y / z);
} else {
tmp = y + (x / z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -1.0) or not (y <= 6.2e-14): tmp = (z - x) * (y / z) else: tmp = y + (x / z) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -1.0) || !(y <= 6.2e-14)) tmp = Float64(Float64(z - x) * Float64(y / z)); else tmp = Float64(y + Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -1.0) || ~((y <= 6.2e-14))) tmp = (z - x) * (y / z); else tmp = y + (x / z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -1.0], N[Not[LessEqual[y, 6.2e-14]], $MachinePrecision]], N[(N[(z - x), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(y + N[(x / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \lor \neg \left(y \leq 6.2 \cdot 10^{-14}\right):\\
\;\;\;\;\left(z - x\right) \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;y + \frac{x}{z}\\
\end{array}
\end{array}
(FPCore (x y z) :precision binary64 (if (or (<= y -1.0) (not (<= y 6.2e-14))) (/ y (/ z (- z x))) (+ y (/ x z))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -1.0) || !(y <= 6.2e-14)) {
tmp = y / (z / (z - x));
} else {
tmp = y + (x / 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 ((y <= (-1.0d0)) .or. (.not. (y <= 6.2d-14))) then
tmp = y / (z / (z - x))
else
tmp = y + (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -1.0) || !(y <= 6.2e-14)) {
tmp = y / (z / (z - x));
} else {
tmp = y + (x / z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -1.0) or not (y <= 6.2e-14): tmp = y / (z / (z - x)) else: tmp = y + (x / z) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -1.0) || !(y <= 6.2e-14)) tmp = Float64(y / Float64(z / Float64(z - x))); else tmp = Float64(y + Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -1.0) || ~((y <= 6.2e-14))) tmp = y / (z / (z - x)); else tmp = y + (x / z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -1.0], N[Not[LessEqual[y, 6.2e-14]], $MachinePrecision]], N[(y / N[(z / N[(z - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(x / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \lor \neg \left(y \leq 6.2 \cdot 10^{-14}\right):\\
\;\;\;\;\frac{y}{\frac{z}{z - x}}\\
\mathbf{else}:\\
\;\;\;\;y + \frac{x}{z}\\
\end{array}
\end{array}
(FPCore (x y z) :precision binary64 (if (<= y 5e+53) (+ y (/ (* x (- 1.0 y)) z)) (/ y (/ z (- z x)))))
double code(double x, double y, double z) {
double tmp;
if (y <= 5e+53) {
tmp = y + ((x * (1.0 - y)) / z);
} else {
tmp = y / (z / (z - 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 (y <= 5d+53) then
tmp = y + ((x * (1.0d0 - y)) / z)
else
tmp = y / (z / (z - x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= 5e+53) {
tmp = y + ((x * (1.0 - y)) / z);
} else {
tmp = y / (z / (z - x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= 5e+53: tmp = y + ((x * (1.0 - y)) / z) else: tmp = y / (z / (z - x)) return tmp
function code(x, y, z) tmp = 0.0 if (y <= 5e+53) tmp = Float64(y + Float64(Float64(x * Float64(1.0 - y)) / z)); else tmp = Float64(y / Float64(z / Float64(z - x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= 5e+53) tmp = y + ((x * (1.0 - y)) / z); else tmp = y / (z / (z - x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, 5e+53], N[(y + N[(N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(y / N[(z / N[(z - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5 \cdot 10^{+53}:\\
\;\;\;\;y + \frac{x \cdot \left(1 - y\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{z}{z - x}}\\
\end{array}
\end{array}
(FPCore (x y z) :precision binary64 (if (or (<= y -1.4e-15) (not (<= y 3e-14))) (* z (/ y z)) (/ x z)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -1.4e-15) || !(y <= 3e-14)) {
tmp = z * (y / z);
} else {
tmp = x / 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 ((y <= (-1.4d-15)) .or. (.not. (y <= 3d-14))) then
tmp = z * (y / z)
else
tmp = x / z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -1.4e-15) || !(y <= 3e-14)) {
tmp = z * (y / z);
} else {
tmp = x / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -1.4e-15) or not (y <= 3e-14): tmp = z * (y / z) else: tmp = x / z return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -1.4e-15) || !(y <= 3e-14)) tmp = Float64(z * Float64(y / z)); else tmp = Float64(x / z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -1.4e-15) || ~((y <= 3e-14))) tmp = z * (y / z); else tmp = x / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -1.4e-15], N[Not[LessEqual[y, 3e-14]], $MachinePrecision]], N[(z * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(x / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{-15} \lor \neg \left(y \leq 3 \cdot 10^{-14}\right):\\
\;\;\;\;z \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z}\\
\end{array}
\end{array}
(FPCore (x y z) :precision binary64 (if (<= y -3.6e-19) y (if (<= y 6e-14) (/ x z) y)))
double code(double x, double y, double z) {
double tmp;
if (y <= -3.6e-19) {
tmp = y;
} else if (y <= 6e-14) {
tmp = x / z;
} else {
tmp = 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 (y <= (-3.6d-19)) then
tmp = y
else if (y <= 6d-14) then
tmp = x / z
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -3.6e-19) {
tmp = y;
} else if (y <= 6e-14) {
tmp = x / z;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -3.6e-19: tmp = y elif y <= 6e-14: tmp = x / z else: tmp = y return tmp
function code(x, y, z) tmp = 0.0 if (y <= -3.6e-19) tmp = y; elseif (y <= 6e-14) tmp = Float64(x / z); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -3.6e-19) tmp = y; elseif (y <= 6e-14) tmp = x / z; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -3.6e-19], y, If[LessEqual[y, 6e-14], N[(x / z), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.6 \cdot 10^{-19}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 6 \cdot 10^{-14}:\\
\;\;\;\;\frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
(FPCore (x y z) :precision binary64 (+ y (/ x z)))
double code(double x, double y, double z) {
return y + (x / z);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = y + (x / z)
end function
public static double code(double x, double y, double z) {
return y + (x / z);
}
def code(x, y, z): return y + (x / z)
function code(x, y, z) return Float64(y + Float64(x / z)) end
function tmp = code(x, y, z) tmp = y + (x / z); end
code[x_, y_, z_] := N[(y + N[(x / z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y + \frac{x}{z}
\end{array}
(FPCore (x y z) :precision binary64 y)
double code(double x, double y, double z) {
return y;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = y
end function
public static double code(double x, double y, double z) {
return y;
}
def code(x, y, z): return y
function code(x, y, z) return y end
function tmp = code(x, y, z) tmp = y; end
code[x_, y_, z_] := y
\begin{array}{l}
\\
y
\end{array}
(FPCore (x y z) :precision binary64 (- (+ y (/ x z)) (/ y (/ z x))))
double code(double x, double y, double z) {
return (y + (x / z)) - (y / (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 + (x / z)) - (y / (z / x))
end function
public static double code(double x, double y, double z) {
return (y + (x / z)) - (y / (z / x));
}
def code(x, y, z): return (y + (x / z)) - (y / (z / x))
function code(x, y, z) return Float64(Float64(y + Float64(x / z)) - Float64(y / Float64(z / x))) end
function tmp = code(x, y, z) tmp = (y + (x / z)) - (y / (z / x)); end
code[x_, y_, z_] := N[(N[(y + N[(x / z), $MachinePrecision]), $MachinePrecision] - N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(y + \frac{x}{z}\right) - \frac{y}{\frac{z}{x}}
\end{array}
herbie shell --seed 2023350
(FPCore (x y z)
:name "Diagrams.Backend.Rasterific:rasterificRadialGradient from diagrams-rasterific-1.3.1.3"
:precision binary64
:herbie-target
(- (+ y (/ x z)) (/ y (/ z x)))
(/ (+ x (* y (- z x))) z))