
(FPCore (x y z) :precision binary64 (+ (+ x (sin y)) (* z (cos y))))
double code(double x, double y, double z) {
return (x + sin(y)) + (z * cos(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 + sin(y)) + (z * cos(y))
end function
public static double code(double x, double y, double z) {
return (x + Math.sin(y)) + (z * Math.cos(y));
}
def code(x, y, z): return (x + math.sin(y)) + (z * math.cos(y))
function code(x, y, z) return Float64(Float64(x + sin(y)) + Float64(z * cos(y))) end
function tmp = code(x, y, z) tmp = (x + sin(y)) + (z * cos(y)); end
code[x_, y_, z_] := N[(N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision] + N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + \sin y\right) + z \cdot \cos y
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (+ (+ x (sin y)) (* z (cos y))))
double code(double x, double y, double z) {
return (x + sin(y)) + (z * cos(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 + sin(y)) + (z * cos(y))
end function
public static double code(double x, double y, double z) {
return (x + Math.sin(y)) + (z * Math.cos(y));
}
def code(x, y, z): return (x + math.sin(y)) + (z * math.cos(y))
function code(x, y, z) return Float64(Float64(x + sin(y)) + Float64(z * cos(y))) end
function tmp = code(x, y, z) tmp = (x + sin(y)) + (z * cos(y)); end
code[x_, y_, z_] := N[(N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision] + N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + \sin y\right) + z \cdot \cos y
\end{array}
(FPCore (x y z) :precision binary64 (+ (+ x (sin y)) (* z (cos y))))
double code(double x, double y, double z) {
return (x + sin(y)) + (z * cos(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 + sin(y)) + (z * cos(y))
end function
public static double code(double x, double y, double z) {
return (x + Math.sin(y)) + (z * Math.cos(y));
}
def code(x, y, z): return (x + math.sin(y)) + (z * math.cos(y))
function code(x, y, z) return Float64(Float64(x + sin(y)) + Float64(z * cos(y))) end
function tmp = code(x, y, z) tmp = (x + sin(y)) + (z * cos(y)); end
code[x_, y_, z_] := N[(N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision] + N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + \sin y\right) + z \cdot \cos y
\end{array}
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (cos y))))
(if (<= z -3.5e+195)
t_0
(if (<= z -1.05e-136)
(+ x z)
(if (<= z -9e-191)
(sin y)
(if (<= z 2.4e-67)
(+ x z)
(if (<= z 1.25e-31) (sin y) (if (<= z 2.35e+92) (+ x z) t_0))))))))
double code(double x, double y, double z) {
double t_0 = z * cos(y);
double tmp;
if (z <= -3.5e+195) {
tmp = t_0;
} else if (z <= -1.05e-136) {
tmp = x + z;
} else if (z <= -9e-191) {
tmp = sin(y);
} else if (z <= 2.4e-67) {
tmp = x + z;
} else if (z <= 1.25e-31) {
tmp = sin(y);
} else if (z <= 2.35e+92) {
tmp = x + z;
} else {
tmp = t_0;
}
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) :: t_0
real(8) :: tmp
t_0 = z * cos(y)
if (z <= (-3.5d+195)) then
tmp = t_0
else if (z <= (-1.05d-136)) then
tmp = x + z
else if (z <= (-9d-191)) then
tmp = sin(y)
else if (z <= 2.4d-67) then
tmp = x + z
else if (z <= 1.25d-31) then
tmp = sin(y)
else if (z <= 2.35d+92) then
tmp = x + z
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * Math.cos(y);
double tmp;
if (z <= -3.5e+195) {
tmp = t_0;
} else if (z <= -1.05e-136) {
tmp = x + z;
} else if (z <= -9e-191) {
tmp = Math.sin(y);
} else if (z <= 2.4e-67) {
tmp = x + z;
} else if (z <= 1.25e-31) {
tmp = Math.sin(y);
} else if (z <= 2.35e+92) {
tmp = x + z;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = z * math.cos(y) tmp = 0 if z <= -3.5e+195: tmp = t_0 elif z <= -1.05e-136: tmp = x + z elif z <= -9e-191: tmp = math.sin(y) elif z <= 2.4e-67: tmp = x + z elif z <= 1.25e-31: tmp = math.sin(y) elif z <= 2.35e+92: tmp = x + z else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(z * cos(y)) tmp = 0.0 if (z <= -3.5e+195) tmp = t_0; elseif (z <= -1.05e-136) tmp = Float64(x + z); elseif (z <= -9e-191) tmp = sin(y); elseif (z <= 2.4e-67) tmp = Float64(x + z); elseif (z <= 1.25e-31) tmp = sin(y); elseif (z <= 2.35e+92) tmp = Float64(x + z); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * cos(y); tmp = 0.0; if (z <= -3.5e+195) tmp = t_0; elseif (z <= -1.05e-136) tmp = x + z; elseif (z <= -9e-191) tmp = sin(y); elseif (z <= 2.4e-67) tmp = x + z; elseif (z <= 1.25e-31) tmp = sin(y); elseif (z <= 2.35e+92) tmp = x + z; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.5e+195], t$95$0, If[LessEqual[z, -1.05e-136], N[(x + z), $MachinePrecision], If[LessEqual[z, -9e-191], N[Sin[y], $MachinePrecision], If[LessEqual[z, 2.4e-67], N[(x + z), $MachinePrecision], If[LessEqual[z, 1.25e-31], N[Sin[y], $MachinePrecision], If[LessEqual[z, 2.35e+92], N[(x + z), $MachinePrecision], t$95$0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \cos y\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{+195}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{-136}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;z \leq -9 \cdot 10^{-191}:\\
\;\;\;\;\sin y\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-67}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-31}:\\
\;\;\;\;\sin y\\
\mathbf{elif}\;z \leq 2.35 \cdot 10^{+92}:\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (cos y))))
(if (<= z -3.5e+194)
t_0
(if (<= z -8e-62) (+ x z) (if (<= z 6.2e+28) (+ x (sin y)) t_0)))))
double code(double x, double y, double z) {
double t_0 = z * cos(y);
double tmp;
if (z <= -3.5e+194) {
tmp = t_0;
} else if (z <= -8e-62) {
tmp = x + z;
} else if (z <= 6.2e+28) {
tmp = x + sin(y);
} else {
tmp = t_0;
}
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) :: t_0
real(8) :: tmp
t_0 = z * cos(y)
if (z <= (-3.5d+194)) then
tmp = t_0
else if (z <= (-8d-62)) then
tmp = x + z
else if (z <= 6.2d+28) then
tmp = x + sin(y)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * Math.cos(y);
double tmp;
if (z <= -3.5e+194) {
tmp = t_0;
} else if (z <= -8e-62) {
tmp = x + z;
} else if (z <= 6.2e+28) {
tmp = x + Math.sin(y);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = z * math.cos(y) tmp = 0 if z <= -3.5e+194: tmp = t_0 elif z <= -8e-62: tmp = x + z elif z <= 6.2e+28: tmp = x + math.sin(y) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(z * cos(y)) tmp = 0.0 if (z <= -3.5e+194) tmp = t_0; elseif (z <= -8e-62) tmp = Float64(x + z); elseif (z <= 6.2e+28) tmp = Float64(x + sin(y)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * cos(y); tmp = 0.0; if (z <= -3.5e+194) tmp = t_0; elseif (z <= -8e-62) tmp = x + z; elseif (z <= 6.2e+28) tmp = x + sin(y); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.5e+194], t$95$0, If[LessEqual[z, -8e-62], N[(x + z), $MachinePrecision], If[LessEqual[z, 6.2e+28], N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \cos y\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{+194}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-62}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+28}:\\
\;\;\;\;x + \sin y\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
(FPCore (x y z) :precision binary64 (if (or (<= z -7e-64) (not (<= z 6.8e-31))) (+ x (* z (cos y))) (+ x (sin y))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -7e-64) || !(z <= 6.8e-31)) {
tmp = x + (z * cos(y));
} else {
tmp = x + sin(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 ((z <= (-7d-64)) .or. (.not. (z <= 6.8d-31))) then
tmp = x + (z * cos(y))
else
tmp = x + sin(y)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -7e-64) || !(z <= 6.8e-31)) {
tmp = x + (z * Math.cos(y));
} else {
tmp = x + Math.sin(y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -7e-64) or not (z <= 6.8e-31): tmp = x + (z * math.cos(y)) else: tmp = x + math.sin(y) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -7e-64) || !(z <= 6.8e-31)) tmp = Float64(x + Float64(z * cos(y))); else tmp = Float64(x + sin(y)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -7e-64) || ~((z <= 6.8e-31))) tmp = x + (z * cos(y)); else tmp = x + sin(y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -7e-64], N[Not[LessEqual[z, 6.8e-31]], $MachinePrecision]], N[(x + N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{-64} \lor \neg \left(z \leq 6.8 \cdot 10^{-31}\right):\\
\;\;\;\;x + z \cdot \cos y\\
\mathbf{else}:\\
\;\;\;\;x + \sin y\\
\end{array}
\end{array}
(FPCore (x y z) :precision binary64 (if (or (<= z -1.6) (not (<= z 0.0245))) (+ x (* z (cos y))) (+ (+ x (sin y)) z)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.6) || !(z <= 0.0245)) {
tmp = x + (z * cos(y));
} else {
tmp = (x + sin(y)) + 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 <= (-1.6d0)) .or. (.not. (z <= 0.0245d0))) then
tmp = x + (z * cos(y))
else
tmp = (x + sin(y)) + z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -1.6) || !(z <= 0.0245)) {
tmp = x + (z * Math.cos(y));
} else {
tmp = (x + Math.sin(y)) + z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.6) or not (z <= 0.0245): tmp = x + (z * math.cos(y)) else: tmp = (x + math.sin(y)) + z return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.6) || !(z <= 0.0245)) tmp = Float64(x + Float64(z * cos(y))); else tmp = Float64(Float64(x + sin(y)) + z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -1.6) || ~((z <= 0.0245))) tmp = x + (z * cos(y)); else tmp = (x + sin(y)) + z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1.6], N[Not[LessEqual[z, 0.0245]], $MachinePrecision]], N[(x + N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \lor \neg \left(z \leq 0.0245\right):\\
\;\;\;\;x + z \cdot \cos y\\
\mathbf{else}:\\
\;\;\;\;\left(x + \sin y\right) + z\\
\end{array}
\end{array}
(FPCore (x y z) :precision binary64 (if (<= y -2.35e+157) (sin y) (if (<= y 1.8e+16) (+ z (+ x y)) (+ x z))))
double code(double x, double y, double z) {
double tmp;
if (y <= -2.35e+157) {
tmp = sin(y);
} else if (y <= 1.8e+16) {
tmp = z + (x + y);
} 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 <= (-2.35d+157)) then
tmp = sin(y)
else if (y <= 1.8d+16) then
tmp = z + (x + y)
else
tmp = x + z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -2.35e+157) {
tmp = Math.sin(y);
} else if (y <= 1.8e+16) {
tmp = z + (x + y);
} else {
tmp = x + z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -2.35e+157: tmp = math.sin(y) elif y <= 1.8e+16: tmp = z + (x + y) else: tmp = x + z return tmp
function code(x, y, z) tmp = 0.0 if (y <= -2.35e+157) tmp = sin(y); elseif (y <= 1.8e+16) tmp = Float64(z + Float64(x + y)); else tmp = Float64(x + z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -2.35e+157) tmp = sin(y); elseif (y <= 1.8e+16) tmp = z + (x + y); else tmp = x + z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -2.35e+157], N[Sin[y], $MachinePrecision], If[LessEqual[y, 1.8e+16], N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision], N[(x + z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.35 \cdot 10^{+157}:\\
\;\;\;\;\sin y\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{+16}:\\
\;\;\;\;z + \left(x + y\right)\\
\mathbf{else}:\\
\;\;\;\;x + z\\
\end{array}
\end{array}
(FPCore (x y z) :precision binary64 (if (or (<= y -2.45e+61) (not (<= y 2e+16))) (+ x z) (+ z (+ x y))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -2.45e+61) || !(y <= 2e+16)) {
tmp = x + z;
} else {
tmp = z + (x + 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 <= (-2.45d+61)) .or. (.not. (y <= 2d+16))) then
tmp = x + z
else
tmp = z + (x + y)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -2.45e+61) || !(y <= 2e+16)) {
tmp = x + z;
} else {
tmp = z + (x + y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -2.45e+61) or not (y <= 2e+16): tmp = x + z else: tmp = z + (x + y) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -2.45e+61) || !(y <= 2e+16)) tmp = Float64(x + z); else tmp = Float64(z + Float64(x + y)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -2.45e+61) || ~((y <= 2e+16))) tmp = x + z; else tmp = z + (x + y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -2.45e+61], N[Not[LessEqual[y, 2e+16]], $MachinePrecision]], N[(x + z), $MachinePrecision], N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.45 \cdot 10^{+61} \lor \neg \left(y \leq 2 \cdot 10^{+16}\right):\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;z + \left(x + y\right)\\
\end{array}
\end{array}
(FPCore (x y z) :precision binary64 (if (or (<= x -1.52e-106) (not (<= x 1.1e-156))) (+ x z) (+ y z)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1.52e-106) || !(x <= 1.1e-156)) {
tmp = x + z;
} else {
tmp = y + 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 <= (-1.52d-106)) .or. (.not. (x <= 1.1d-156))) then
tmp = x + z
else
tmp = y + z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -1.52e-106) || !(x <= 1.1e-156)) {
tmp = x + z;
} else {
tmp = y + z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1.52e-106) or not (x <= 1.1e-156): tmp = x + z else: tmp = y + z return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1.52e-106) || !(x <= 1.1e-156)) tmp = Float64(x + z); else tmp = Float64(y + z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -1.52e-106) || ~((x <= 1.1e-156))) tmp = x + z; else tmp = y + z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1.52e-106], N[Not[LessEqual[x, 1.1e-156]], $MachinePrecision]], N[(x + z), $MachinePrecision], N[(y + z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.52 \cdot 10^{-106} \lor \neg \left(x \leq 1.1 \cdot 10^{-156}\right):\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;y + z\\
\end{array}
\end{array}
(FPCore (x y z) :precision binary64 (if (<= x -62000.0) x (if (<= x 1.3e-5) (+ y z) x)))
double code(double x, double y, double z) {
double tmp;
if (x <= -62000.0) {
tmp = x;
} else if (x <= 1.3e-5) {
tmp = y + z;
} else {
tmp = 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 (x <= (-62000.0d0)) then
tmp = x
else if (x <= 1.3d-5) then
tmp = y + z
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -62000.0) {
tmp = x;
} else if (x <= 1.3e-5) {
tmp = y + z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -62000.0: tmp = x elif x <= 1.3e-5: tmp = y + z else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -62000.0) tmp = x; elseif (x <= 1.3e-5) tmp = Float64(y + z); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -62000.0) tmp = x; elseif (x <= 1.3e-5) tmp = y + z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -62000.0], x, If[LessEqual[x, 1.3e-5], N[(y + z), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -62000:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.3 \cdot 10^{-5}:\\
\;\;\;\;y + z\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
(FPCore (x y z) :precision binary64 (if (<= x -80000.0) x (if (<= x 7.6e-6) z x)))
double code(double x, double y, double z) {
double tmp;
if (x <= -80000.0) {
tmp = x;
} else if (x <= 7.6e-6) {
tmp = z;
} else {
tmp = 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 (x <= (-80000.0d0)) then
tmp = x
else if (x <= 7.6d-6) then
tmp = z
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -80000.0) {
tmp = x;
} else if (x <= 7.6e-6) {
tmp = z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -80000.0: tmp = x elif x <= 7.6e-6: tmp = z else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -80000.0) tmp = x; elseif (x <= 7.6e-6) tmp = z; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -80000.0) tmp = x; elseif (x <= 7.6e-6) tmp = z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -80000.0], x, If[LessEqual[x, 7.6e-6], z, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -80000:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 7.6 \cdot 10^{-6}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
(FPCore (x y z) :precision binary64 x)
double code(double x, double y, double z) {
return x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x
end function
public static double code(double x, double y, double z) {
return x;
}
def code(x, y, z): return x
function code(x, y, z) return x end
function tmp = code(x, y, z) tmp = x; end
code[x_, y_, z_] := x
\begin{array}{l}
\\
x
\end{array}
herbie shell --seed 2024010
(FPCore (x y z)
:name "Graphics.Rasterific.Svg.PathConverter:segmentToBezier from rasterific-svg-0.2.3.1, C"
:precision binary64
(+ (+ x (sin y)) (* z (cos y))))