
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((x - y) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t): return ((x - y) / (z - y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x - y) / Float64(z - y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x - y) / (z - y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y} \cdot t
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 10 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((x - y) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t): return ((x - y) / (z - y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x - y) / Float64(z - y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x - y) / (z - y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y} \cdot t
\end{array}
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((x - y) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t): return ((x - y) / (z - y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x - y) / Float64(z - y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x - y) / (z - y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y} \cdot t
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ x y)))))
(if (<= y -2.3e-21)
t_1
(if (<= y -1.65e-181)
(* t (/ (- x y) z))
(if (<= y 5e+59) (* x (/ t (- z y))) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = t * (1.0 - (x / y));
double tmp;
if (y <= -2.3e-21) {
tmp = t_1;
} else if (y <= -1.65e-181) {
tmp = t * ((x - y) / z);
} else if (y <= 5e+59) {
tmp = x * (t / (z - y));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = t * (1.0d0 - (x / y))
if (y <= (-2.3d-21)) then
tmp = t_1
else if (y <= (-1.65d-181)) then
tmp = t * ((x - y) / z)
else if (y <= 5d+59) then
tmp = x * (t / (z - y))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t * (1.0 - (x / y));
double tmp;
if (y <= -2.3e-21) {
tmp = t_1;
} else if (y <= -1.65e-181) {
tmp = t * ((x - y) / z);
} else if (y <= 5e+59) {
tmp = x * (t / (z - y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (1.0 - (x / y)) tmp = 0 if y <= -2.3e-21: tmp = t_1 elif y <= -1.65e-181: tmp = t * ((x - y) / z) elif y <= 5e+59: tmp = x * (t / (z - y)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(1.0 - Float64(x / y))) tmp = 0.0 if (y <= -2.3e-21) tmp = t_1; elseif (y <= -1.65e-181) tmp = Float64(t * Float64(Float64(x - y) / z)); elseif (y <= 5e+59) tmp = Float64(x * Float64(t / Float64(z - y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (1.0 - (x / y)); tmp = 0.0; if (y <= -2.3e-21) tmp = t_1; elseif (y <= -1.65e-181) tmp = t * ((x - y) / z); elseif (y <= 5e+59) tmp = x * (t / (z - y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.3e-21], t$95$1, If[LessEqual[y, -1.65e-181], N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5e+59], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -2.3 \cdot 10^{-21}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.65 \cdot 10^{-181}:\\
\;\;\;\;t \cdot \frac{x - y}{z}\\
\mathbf{elif}\;y \leq 5 \cdot 10^{+59}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ x y)))))
(if (<= y -2.15e-21)
t_1
(if (<= y -1.65e-181)
(/ (- x y) (/ z t))
(if (<= y 1.85e-19) (/ (* x t) (- z y)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = t * (1.0 - (x / y));
double tmp;
if (y <= -2.15e-21) {
tmp = t_1;
} else if (y <= -1.65e-181) {
tmp = (x - y) / (z / t);
} else if (y <= 1.85e-19) {
tmp = (x * t) / (z - y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = t * (1.0d0 - (x / y))
if (y <= (-2.15d-21)) then
tmp = t_1
else if (y <= (-1.65d-181)) then
tmp = (x - y) / (z / t)
else if (y <= 1.85d-19) then
tmp = (x * t) / (z - y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t * (1.0 - (x / y));
double tmp;
if (y <= -2.15e-21) {
tmp = t_1;
} else if (y <= -1.65e-181) {
tmp = (x - y) / (z / t);
} else if (y <= 1.85e-19) {
tmp = (x * t) / (z - y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (1.0 - (x / y)) tmp = 0 if y <= -2.15e-21: tmp = t_1 elif y <= -1.65e-181: tmp = (x - y) / (z / t) elif y <= 1.85e-19: tmp = (x * t) / (z - y) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(1.0 - Float64(x / y))) tmp = 0.0 if (y <= -2.15e-21) tmp = t_1; elseif (y <= -1.65e-181) tmp = Float64(Float64(x - y) / Float64(z / t)); elseif (y <= 1.85e-19) tmp = Float64(Float64(x * t) / Float64(z - y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (1.0 - (x / y)); tmp = 0.0; if (y <= -2.15e-21) tmp = t_1; elseif (y <= -1.65e-181) tmp = (x - y) / (z / t); elseif (y <= 1.85e-19) tmp = (x * t) / (z - y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.15e-21], t$95$1, If[LessEqual[y, -1.65e-181], N[(N[(x - y), $MachinePrecision] / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.85e-19], N[(N[(x * t), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -2.15 \cdot 10^{-21}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.65 \cdot 10^{-181}:\\
\;\;\;\;\frac{x - y}{\frac{z}{t}}\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{-19}:\\
\;\;\;\;\frac{x \cdot t}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
(FPCore (x y z t)
:precision binary64
(if (<= y -2.25e-21)
(* t (/ (- y x) y))
(if (<= y -1.65e-181)
(/ (- x y) (/ z t))
(if (<= y 5.5e-20) (/ (* x t) (- z y)) (* t (- 1.0 (/ x y)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.25e-21) {
tmp = t * ((y - x) / y);
} else if (y <= -1.65e-181) {
tmp = (x - y) / (z / t);
} else if (y <= 5.5e-20) {
tmp = (x * t) / (z - y);
} else {
tmp = t * (1.0 - (x / y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-2.25d-21)) then
tmp = t * ((y - x) / y)
else if (y <= (-1.65d-181)) then
tmp = (x - y) / (z / t)
else if (y <= 5.5d-20) then
tmp = (x * t) / (z - y)
else
tmp = t * (1.0d0 - (x / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.25e-21) {
tmp = t * ((y - x) / y);
} else if (y <= -1.65e-181) {
tmp = (x - y) / (z / t);
} else if (y <= 5.5e-20) {
tmp = (x * t) / (z - y);
} else {
tmp = t * (1.0 - (x / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.25e-21: tmp = t * ((y - x) / y) elif y <= -1.65e-181: tmp = (x - y) / (z / t) elif y <= 5.5e-20: tmp = (x * t) / (z - y) else: tmp = t * (1.0 - (x / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.25e-21) tmp = Float64(t * Float64(Float64(y - x) / y)); elseif (y <= -1.65e-181) tmp = Float64(Float64(x - y) / Float64(z / t)); elseif (y <= 5.5e-20) tmp = Float64(Float64(x * t) / Float64(z - y)); else tmp = Float64(t * Float64(1.0 - Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.25e-21) tmp = t * ((y - x) / y); elseif (y <= -1.65e-181) tmp = (x - y) / (z / t); elseif (y <= 5.5e-20) tmp = (x * t) / (z - y); else tmp = t * (1.0 - (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.25e-21], N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.65e-181], N[(N[(x - y), $MachinePrecision] / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.5e-20], N[(N[(x * t), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.25 \cdot 10^{-21}:\\
\;\;\;\;t \cdot \frac{y - x}{y}\\
\mathbf{elif}\;y \leq -1.65 \cdot 10^{-181}:\\
\;\;\;\;\frac{x - y}{\frac{z}{t}}\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{-20}:\\
\;\;\;\;\frac{x \cdot t}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.1e-21) (not (<= y 2.3e-88))) (* t (- 1.0 (/ x y))) (/ (* x t) z)))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.1e-21) || !(y <= 2.3e-88)) {
tmp = t * (1.0 - (x / y));
} else {
tmp = (x * t) / z;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-2.1d-21)) .or. (.not. (y <= 2.3d-88))) then
tmp = t * (1.0d0 - (x / y))
else
tmp = (x * t) / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.1e-21) || !(y <= 2.3e-88)) {
tmp = t * (1.0 - (x / y));
} else {
tmp = (x * t) / z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.1e-21) or not (y <= 2.3e-88): tmp = t * (1.0 - (x / y)) else: tmp = (x * t) / z return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.1e-21) || !(y <= 2.3e-88)) tmp = Float64(t * Float64(1.0 - Float64(x / y))); else tmp = Float64(Float64(x * t) / z); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.1e-21) || ~((y <= 2.3e-88))) tmp = t * (1.0 - (x / y)); else tmp = (x * t) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.1e-21], N[Not[LessEqual[y, 2.3e-88]], $MachinePrecision]], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.1 \cdot 10^{-21} \lor \neg \left(y \leq 2.3 \cdot 10^{-88}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot t}{z}\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.65e-21) (not (<= y 9e+60))) (* t (- 1.0 (/ x y))) (* x (/ t (- z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.65e-21) || !(y <= 9e+60)) {
tmp = t * (1.0 - (x / y));
} else {
tmp = x * (t / (z - y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-2.65d-21)) .or. (.not. (y <= 9d+60))) then
tmp = t * (1.0d0 - (x / y))
else
tmp = x * (t / (z - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.65e-21) || !(y <= 9e+60)) {
tmp = t * (1.0 - (x / y));
} else {
tmp = x * (t / (z - y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.65e-21) or not (y <= 9e+60): tmp = t * (1.0 - (x / y)) else: tmp = x * (t / (z - y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.65e-21) || !(y <= 9e+60)) tmp = Float64(t * Float64(1.0 - Float64(x / y))); else tmp = Float64(x * Float64(t / Float64(z - y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.65e-21) || ~((y <= 9e+60))) tmp = t * (1.0 - (x / y)); else tmp = x * (t / (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.65e-21], N[Not[LessEqual[y, 9e+60]], $MachinePrecision]], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.65 \cdot 10^{-21} \lor \neg \left(y \leq 9 \cdot 10^{+60}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.6e-21) (not (<= y 1.2e-19))) (* t (- 1.0 (/ x y))) (/ (* x t) (- z y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.6e-21) || !(y <= 1.2e-19)) {
tmp = t * (1.0 - (x / y));
} else {
tmp = (x * t) / (z - y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-2.6d-21)) .or. (.not. (y <= 1.2d-19))) then
tmp = t * (1.0d0 - (x / y))
else
tmp = (x * t) / (z - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.6e-21) || !(y <= 1.2e-19)) {
tmp = t * (1.0 - (x / y));
} else {
tmp = (x * t) / (z - y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.6e-21) or not (y <= 1.2e-19): tmp = t * (1.0 - (x / y)) else: tmp = (x * t) / (z - y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.6e-21) || !(y <= 1.2e-19)) tmp = Float64(t * Float64(1.0 - Float64(x / y))); else tmp = Float64(Float64(x * t) / Float64(z - y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.6e-21) || ~((y <= 1.2e-19))) tmp = t * (1.0 - (x / y)); else tmp = (x * t) / (z - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.6e-21], N[Not[LessEqual[y, 1.2e-19]], $MachinePrecision]], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * t), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{-21} \lor \neg \left(y \leq 1.2 \cdot 10^{-19}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot t}{z - y}\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (<= y -3e+23) t (if (<= y 6.8e+59) (* x (/ t z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3e+23) {
tmp = t;
} else if (y <= 6.8e+59) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-3d+23)) then
tmp = t
else if (y <= 6.8d+59) then
tmp = x * (t / z)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3e+23) {
tmp = t;
} else if (y <= 6.8e+59) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3e+23: tmp = t elif y <= 6.8e+59: tmp = x * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3e+23) tmp = t; elseif (y <= 6.8e+59) tmp = Float64(x * Float64(t / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3e+23) tmp = t; elseif (y <= 6.8e+59) tmp = x * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3e+23], t, If[LessEqual[y, 6.8e+59], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3 \cdot 10^{+23}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{+59}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (<= y -8.6e+22) t (if (<= y 5.2e+59) (/ (* x t) z) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8.6e+22) {
tmp = t;
} else if (y <= 5.2e+59) {
tmp = (x * t) / z;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-8.6d+22)) then
tmp = t
else if (y <= 5.2d+59) then
tmp = (x * t) / z
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8.6e+22) {
tmp = t;
} else if (y <= 5.2e+59) {
tmp = (x * t) / z;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -8.6e+22: tmp = t elif y <= 5.2e+59: tmp = (x * t) / z else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -8.6e+22) tmp = t; elseif (y <= 5.2e+59) tmp = Float64(Float64(x * t) / z); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -8.6e+22) tmp = t; elseif (y <= 5.2e+59) tmp = (x * t) / z; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -8.6e+22], t, If[LessEqual[y, 5.2e+59], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.6 \cdot 10^{+22}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{+59}:\\
\;\;\;\;\frac{x \cdot t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 t)
double code(double x, double y, double z, double t) {
return t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = t
end function
public static double code(double x, double y, double z, double t) {
return t;
}
def code(x, y, z, t): return t
function code(x, y, z, t) return t end
function tmp = code(x, y, z, t) tmp = t; end
code[x_, y_, z_, t_] := t
\begin{array}{l}
\\
t
\end{array}
(FPCore (x y z t) :precision binary64 (/ t (/ (- z y) (- x y))))
double code(double x, double y, double z, double t) {
return t / ((z - y) / (x - y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = t / ((z - y) / (x - y))
end function
public static double code(double x, double y, double z, double t) {
return t / ((z - y) / (x - y));
}
def code(x, y, z, t): return t / ((z - y) / (x - y))
function code(x, y, z, t) return Float64(t / Float64(Float64(z - y) / Float64(x - y))) end
function tmp = code(x, y, z, t) tmp = t / ((z - y) / (x - y)); end
code[x_, y_, z_, t_] := N[(t / N[(N[(z - y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t}{\frac{z - y}{x - y}}
\end{array}
herbie shell --seed 2023343
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
:precision binary64
:herbie-target
(/ t (/ (- z y) (- x y)))
(* (/ (- x y) (- z y)) t))