
(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 13 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}
Initial program 96.4%
Final simplification96.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ (- x y) z))) (t_2 (* t (- 1.0 (/ x y)))))
(if (<= y -8.2e+29)
t_2
(if (<= y -4e-63)
t_1
(if (<= y -1.8e-67)
t
(if (<= y 2.6e-166)
(* x (/ t (- z y)))
(if (<= y 4.9e-60)
t_1
(if (<= y 3200000000000.0) (* t (/ x (- z y))) t_2))))))))
double code(double x, double y, double z, double t) {
double t_1 = t * ((x - y) / z);
double t_2 = t * (1.0 - (x / y));
double tmp;
if (y <= -8.2e+29) {
tmp = t_2;
} else if (y <= -4e-63) {
tmp = t_1;
} else if (y <= -1.8e-67) {
tmp = t;
} else if (y <= 2.6e-166) {
tmp = x * (t / (z - y));
} else if (y <= 4.9e-60) {
tmp = t_1;
} else if (y <= 3200000000000.0) {
tmp = t * (x / (z - y));
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = t * ((x - y) / z)
t_2 = t * (1.0d0 - (x / y))
if (y <= (-8.2d+29)) then
tmp = t_2
else if (y <= (-4d-63)) then
tmp = t_1
else if (y <= (-1.8d-67)) then
tmp = t
else if (y <= 2.6d-166) then
tmp = x * (t / (z - y))
else if (y <= 4.9d-60) then
tmp = t_1
else if (y <= 3200000000000.0d0) then
tmp = t * (x / (z - y))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t * ((x - y) / z);
double t_2 = t * (1.0 - (x / y));
double tmp;
if (y <= -8.2e+29) {
tmp = t_2;
} else if (y <= -4e-63) {
tmp = t_1;
} else if (y <= -1.8e-67) {
tmp = t;
} else if (y <= 2.6e-166) {
tmp = x * (t / (z - y));
} else if (y <= 4.9e-60) {
tmp = t_1;
} else if (y <= 3200000000000.0) {
tmp = t * (x / (z - y));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * ((x - y) / z) t_2 = t * (1.0 - (x / y)) tmp = 0 if y <= -8.2e+29: tmp = t_2 elif y <= -4e-63: tmp = t_1 elif y <= -1.8e-67: tmp = t elif y <= 2.6e-166: tmp = x * (t / (z - y)) elif y <= 4.9e-60: tmp = t_1 elif y <= 3200000000000.0: tmp = t * (x / (z - y)) else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(Float64(x - y) / z)) t_2 = Float64(t * Float64(1.0 - Float64(x / y))) tmp = 0.0 if (y <= -8.2e+29) tmp = t_2; elseif (y <= -4e-63) tmp = t_1; elseif (y <= -1.8e-67) tmp = t; elseif (y <= 2.6e-166) tmp = Float64(x * Float64(t / Float64(z - y))); elseif (y <= 4.9e-60) tmp = t_1; elseif (y <= 3200000000000.0) tmp = Float64(t * Float64(x / Float64(z - y))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * ((x - y) / z); t_2 = t * (1.0 - (x / y)); tmp = 0.0; if (y <= -8.2e+29) tmp = t_2; elseif (y <= -4e-63) tmp = t_1; elseif (y <= -1.8e-67) tmp = t; elseif (y <= 2.6e-166) tmp = x * (t / (z - y)); elseif (y <= 4.9e-60) tmp = t_1; elseif (y <= 3200000000000.0) tmp = t * (x / (z - y)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8.2e+29], t$95$2, If[LessEqual[y, -4e-63], t$95$1, If[LessEqual[y, -1.8e-67], t, If[LessEqual[y, 2.6e-166], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.9e-60], t$95$1, If[LessEqual[y, 3200000000000.0], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{x - y}{z}\\
t_2 := t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -8.2 \cdot 10^{+29}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -4 \cdot 10^{-63}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.8 \cdot 10^{-67}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{-166}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{elif}\;y \leq 4.9 \cdot 10^{-60}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3200000000000:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -8.2000000000000007e29 or 3.2e12 < y Initial program 99.8%
Taylor expanded in z around 0 80.4%
associate-*r/80.4%
neg-mul-180.4%
neg-sub080.4%
associate--r-80.4%
neg-sub080.4%
Simplified80.4%
Taylor expanded in x around 0 80.4%
mul-1-neg80.4%
unsub-neg80.4%
Simplified80.4%
if -8.2000000000000007e29 < y < -4.00000000000000027e-63 or 2.59999999999999989e-166 < y < 4.89999999999999988e-60Initial program 99.8%
Taylor expanded in z around inf 76.1%
if -4.00000000000000027e-63 < y < -1.8e-67Initial program 100.0%
associate-*l/100.0%
associate-*r/100.0%
Simplified100.0%
Taylor expanded in y around inf 100.0%
if -1.8e-67 < y < 2.59999999999999989e-166Initial program 87.9%
associate-*l/95.2%
associate-*r/90.8%
Simplified90.8%
Taylor expanded in x around inf 84.7%
associate-*l/84.1%
*-commutative84.1%
Simplified84.1%
if 4.89999999999999988e-60 < y < 3.2e12Initial program 99.8%
Taylor expanded in x around inf 68.2%
Final simplification80.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ (- x y) z))) (t_2 (* t (- 1.0 (/ x y)))))
(if (<= y -3.8e+33)
t_2
(if (<= y -2.1e-147)
t_1
(if (<= y 1.25e-166)
(/ (* x t) (- z y))
(if (<= y 0.0046)
t_1
(if (<= y 9.5e+17) (* t (/ x (- z y))) t_2)))))))
double code(double x, double y, double z, double t) {
double t_1 = t * ((x - y) / z);
double t_2 = t * (1.0 - (x / y));
double tmp;
if (y <= -3.8e+33) {
tmp = t_2;
} else if (y <= -2.1e-147) {
tmp = t_1;
} else if (y <= 1.25e-166) {
tmp = (x * t) / (z - y);
} else if (y <= 0.0046) {
tmp = t_1;
} else if (y <= 9.5e+17) {
tmp = t * (x / (z - y));
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = t * ((x - y) / z)
t_2 = t * (1.0d0 - (x / y))
if (y <= (-3.8d+33)) then
tmp = t_2
else if (y <= (-2.1d-147)) then
tmp = t_1
else if (y <= 1.25d-166) then
tmp = (x * t) / (z - y)
else if (y <= 0.0046d0) then
tmp = t_1
else if (y <= 9.5d+17) then
tmp = t * (x / (z - y))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t * ((x - y) / z);
double t_2 = t * (1.0 - (x / y));
double tmp;
if (y <= -3.8e+33) {
tmp = t_2;
} else if (y <= -2.1e-147) {
tmp = t_1;
} else if (y <= 1.25e-166) {
tmp = (x * t) / (z - y);
} else if (y <= 0.0046) {
tmp = t_1;
} else if (y <= 9.5e+17) {
tmp = t * (x / (z - y));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * ((x - y) / z) t_2 = t * (1.0 - (x / y)) tmp = 0 if y <= -3.8e+33: tmp = t_2 elif y <= -2.1e-147: tmp = t_1 elif y <= 1.25e-166: tmp = (x * t) / (z - y) elif y <= 0.0046: tmp = t_1 elif y <= 9.5e+17: tmp = t * (x / (z - y)) else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(Float64(x - y) / z)) t_2 = Float64(t * Float64(1.0 - Float64(x / y))) tmp = 0.0 if (y <= -3.8e+33) tmp = t_2; elseif (y <= -2.1e-147) tmp = t_1; elseif (y <= 1.25e-166) tmp = Float64(Float64(x * t) / Float64(z - y)); elseif (y <= 0.0046) tmp = t_1; elseif (y <= 9.5e+17) tmp = Float64(t * Float64(x / Float64(z - y))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * ((x - y) / z); t_2 = t * (1.0 - (x / y)); tmp = 0.0; if (y <= -3.8e+33) tmp = t_2; elseif (y <= -2.1e-147) tmp = t_1; elseif (y <= 1.25e-166) tmp = (x * t) / (z - y); elseif (y <= 0.0046) tmp = t_1; elseif (y <= 9.5e+17) tmp = t * (x / (z - y)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.8e+33], t$95$2, If[LessEqual[y, -2.1e-147], t$95$1, If[LessEqual[y, 1.25e-166], N[(N[(x * t), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.0046], t$95$1, If[LessEqual[y, 9.5e+17], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{x - y}{z}\\
t_2 := t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -3.8 \cdot 10^{+33}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -2.1 \cdot 10^{-147}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{-166}:\\
\;\;\;\;\frac{x \cdot t}{z - y}\\
\mathbf{elif}\;y \leq 0.0046:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{+17}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -3.80000000000000002e33 or 9.5e17 < y Initial program 99.8%
Taylor expanded in z around 0 80.4%
associate-*r/80.4%
neg-mul-180.4%
neg-sub080.4%
associate--r-80.4%
neg-sub080.4%
Simplified80.4%
Taylor expanded in x around 0 80.4%
mul-1-neg80.4%
unsub-neg80.4%
Simplified80.4%
if -3.80000000000000002e33 < y < -2.1e-147 or 1.25e-166 < y < 0.0045999999999999999Initial program 99.8%
Taylor expanded in z around inf 72.0%
if -2.1e-147 < y < 1.25e-166Initial program 85.1%
associate-*l/97.3%
associate-*r/91.8%
Simplified91.8%
Taylor expanded in x around inf 89.1%
if 0.0045999999999999999 < y < 9.5e17Initial program 100.0%
Taylor expanded in x around inf 100.0%
Final simplification80.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ x y)))))
(if (<= y -9.5e+30)
t_1
(if (<= y -2.1e-147)
(* t (/ (- x y) z))
(if (<= y 2.9e-37)
(/ (* x t) (- z y))
(if (<= y 1.2e+61) (/ (- y) (/ (- z y) t)) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (1.0 - (x / y));
double tmp;
if (y <= -9.5e+30) {
tmp = t_1;
} else if (y <= -2.1e-147) {
tmp = t * ((x - y) / z);
} else if (y <= 2.9e-37) {
tmp = (x * t) / (z - y);
} else if (y <= 1.2e+61) {
tmp = -y / ((z - y) / t);
} 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 <= (-9.5d+30)) then
tmp = t_1
else if (y <= (-2.1d-147)) then
tmp = t * ((x - y) / z)
else if (y <= 2.9d-37) then
tmp = (x * t) / (z - y)
else if (y <= 1.2d+61) then
tmp = -y / ((z - y) / t)
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 <= -9.5e+30) {
tmp = t_1;
} else if (y <= -2.1e-147) {
tmp = t * ((x - y) / z);
} else if (y <= 2.9e-37) {
tmp = (x * t) / (z - y);
} else if (y <= 1.2e+61) {
tmp = -y / ((z - y) / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (1.0 - (x / y)) tmp = 0 if y <= -9.5e+30: tmp = t_1 elif y <= -2.1e-147: tmp = t * ((x - y) / z) elif y <= 2.9e-37: tmp = (x * t) / (z - y) elif y <= 1.2e+61: tmp = -y / ((z - y) / t) 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 <= -9.5e+30) tmp = t_1; elseif (y <= -2.1e-147) tmp = Float64(t * Float64(Float64(x - y) / z)); elseif (y <= 2.9e-37) tmp = Float64(Float64(x * t) / Float64(z - y)); elseif (y <= 1.2e+61) tmp = Float64(Float64(-y) / Float64(Float64(z - y) / t)); 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 <= -9.5e+30) tmp = t_1; elseif (y <= -2.1e-147) tmp = t * ((x - y) / z); elseif (y <= 2.9e-37) tmp = (x * t) / (z - y); elseif (y <= 1.2e+61) tmp = -y / ((z - y) / t); 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, -9.5e+30], t$95$1, If[LessEqual[y, -2.1e-147], N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.9e-37], N[(N[(x * t), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.2e+61], N[((-y) / N[(N[(z - y), $MachinePrecision] / t), $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 -9.5 \cdot 10^{+30}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2.1 \cdot 10^{-147}:\\
\;\;\;\;t \cdot \frac{x - y}{z}\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{-37}:\\
\;\;\;\;\frac{x \cdot t}{z - y}\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{+61}:\\
\;\;\;\;\frac{-y}{\frac{z - y}{t}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -9.5000000000000003e30 or 1.1999999999999999e61 < y Initial program 99.8%
Taylor expanded in z around 0 83.9%
associate-*r/83.9%
neg-mul-183.9%
neg-sub083.9%
associate--r-83.9%
neg-sub083.9%
Simplified83.9%
Taylor expanded in x around 0 83.9%
mul-1-neg83.9%
unsub-neg83.9%
Simplified83.9%
if -9.5000000000000003e30 < y < -2.1e-147Initial program 99.8%
Taylor expanded in z around inf 72.7%
if -2.1e-147 < y < 2.90000000000000005e-37Initial program 90.0%
associate-*l/95.0%
associate-*r/92.3%
Simplified92.3%
Taylor expanded in x around inf 81.6%
if 2.90000000000000005e-37 < y < 1.1999999999999999e61Initial program 99.9%
associate-*l/96.2%
associate-*r/91.9%
Simplified91.9%
Taylor expanded in x around 0 76.8%
mul-1-neg76.8%
associate-/l*73.3%
Simplified73.3%
Final simplification80.7%
(FPCore (x y z t)
:precision binary64
(if (<= y -8e-36)
t
(if (<= y 1.45e+22)
(* x (/ t (- z y)))
(if (<= y 4.4e+56) t (if (<= y 2.3e+124) (* t (/ (- y) z)) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8e-36) {
tmp = t;
} else if (y <= 1.45e+22) {
tmp = x * (t / (z - y));
} else if (y <= 4.4e+56) {
tmp = t;
} else if (y <= 2.3e+124) {
tmp = t * (-y / 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 <= (-8d-36)) then
tmp = t
else if (y <= 1.45d+22) then
tmp = x * (t / (z - y))
else if (y <= 4.4d+56) then
tmp = t
else if (y <= 2.3d+124) then
tmp = t * (-y / 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 <= -8e-36) {
tmp = t;
} else if (y <= 1.45e+22) {
tmp = x * (t / (z - y));
} else if (y <= 4.4e+56) {
tmp = t;
} else if (y <= 2.3e+124) {
tmp = t * (-y / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -8e-36: tmp = t elif y <= 1.45e+22: tmp = x * (t / (z - y)) elif y <= 4.4e+56: tmp = t elif y <= 2.3e+124: tmp = t * (-y / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -8e-36) tmp = t; elseif (y <= 1.45e+22) tmp = Float64(x * Float64(t / Float64(z - y))); elseif (y <= 4.4e+56) tmp = t; elseif (y <= 2.3e+124) tmp = Float64(t * Float64(Float64(-y) / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -8e-36) tmp = t; elseif (y <= 1.45e+22) tmp = x * (t / (z - y)); elseif (y <= 4.4e+56) tmp = t; elseif (y <= 2.3e+124) tmp = t * (-y / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -8e-36], t, If[LessEqual[y, 1.45e+22], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.4e+56], t, If[LessEqual[y, 2.3e+124], N[(t * N[((-y) / z), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{-36}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{+22}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{+56}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{+124}:\\
\;\;\;\;t \cdot \frac{-y}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -7.9999999999999995e-36 or 1.45e22 < y < 4.40000000000000032e56 or 2.29999999999999985e124 < y Initial program 99.8%
associate-*l/75.2%
associate-*r/72.2%
Simplified72.2%
Taylor expanded in y around inf 67.9%
if -7.9999999999999995e-36 < y < 1.45e22Initial program 92.5%
associate-*l/94.6%
associate-*r/91.8%
Simplified91.8%
Taylor expanded in x around inf 76.6%
associate-*l/76.2%
*-commutative76.2%
Simplified76.2%
if 4.40000000000000032e56 < y < 2.29999999999999985e124Initial program 99.6%
Taylor expanded in x around 0 63.7%
neg-mul-163.7%
distribute-neg-frac63.7%
Simplified63.7%
Taylor expanded in y around 0 43.7%
neg-mul-143.7%
distribute-neg-frac43.7%
Simplified43.7%
Final simplification69.9%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.9e+83) (not (<= y 2.3e+124))) (* t (- 1.0 (/ x y))) (* (- x y) (/ t (- z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.9e+83) || !(y <= 2.3e+124)) {
tmp = t * (1.0 - (x / y));
} else {
tmp = (x - y) * (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.9d+83)) .or. (.not. (y <= 2.3d+124))) then
tmp = t * (1.0d0 - (x / y))
else
tmp = (x - y) * (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.9e+83) || !(y <= 2.3e+124)) {
tmp = t * (1.0 - (x / y));
} else {
tmp = (x - y) * (t / (z - y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.9e+83) or not (y <= 2.3e+124): tmp = t * (1.0 - (x / y)) else: tmp = (x - y) * (t / (z - y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.9e+83) || !(y <= 2.3e+124)) tmp = Float64(t * Float64(1.0 - Float64(x / y))); else tmp = Float64(Float64(x - y) * Float64(t / Float64(z - y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.9e+83) || ~((y <= 2.3e+124))) tmp = t * (1.0 - (x / y)); else tmp = (x - y) * (t / (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.9e+83], N[Not[LessEqual[y, 2.3e+124]], $MachinePrecision]], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{+83} \lor \neg \left(y \leq 2.3 \cdot 10^{+124}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\
\end{array}
\end{array}
if y < -2.89999999999999999e83 or 2.29999999999999985e124 < y Initial program 99.9%
Taylor expanded in z around 0 89.9%
associate-*r/89.9%
neg-mul-189.9%
neg-sub089.9%
associate--r-89.9%
neg-sub089.9%
Simplified89.9%
Taylor expanded in x around 0 89.9%
mul-1-neg89.9%
unsub-neg89.9%
Simplified89.9%
if -2.89999999999999999e83 < y < 2.29999999999999985e124Initial program 94.7%
associate-*l/94.1%
associate-*r/91.5%
Simplified91.5%
Final simplification91.0%
(FPCore (x y z t) :precision binary64 (if (<= x -9.5e+68) (* x (/ t (- z y))) (if (<= x 3.2e-30) (* t (/ (- y) (- z y))) (* t (/ x (- z y))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -9.5e+68) {
tmp = x * (t / (z - y));
} else if (x <= 3.2e-30) {
tmp = t * (-y / (z - y));
} else {
tmp = t * (x / (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 (x <= (-9.5d+68)) then
tmp = x * (t / (z - y))
else if (x <= 3.2d-30) then
tmp = t * (-y / (z - y))
else
tmp = t * (x / (z - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -9.5e+68) {
tmp = x * (t / (z - y));
} else if (x <= 3.2e-30) {
tmp = t * (-y / (z - y));
} else {
tmp = t * (x / (z - y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -9.5e+68: tmp = x * (t / (z - y)) elif x <= 3.2e-30: tmp = t * (-y / (z - y)) else: tmp = t * (x / (z - y)) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -9.5e+68) tmp = Float64(x * Float64(t / Float64(z - y))); elseif (x <= 3.2e-30) tmp = Float64(t * Float64(Float64(-y) / Float64(z - y))); else tmp = Float64(t * Float64(x / Float64(z - y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -9.5e+68) tmp = x * (t / (z - y)); elseif (x <= 3.2e-30) tmp = t * (-y / (z - y)); else tmp = t * (x / (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -9.5e+68], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.2e-30], N[(t * N[((-y) / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{+68}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{-30}:\\
\;\;\;\;t \cdot \frac{-y}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\end{array}
\end{array}
if x < -9.50000000000000069e68Initial program 91.7%
associate-*l/84.1%
associate-*r/81.8%
Simplified81.8%
Taylor expanded in x around inf 69.5%
associate-*l/75.1%
*-commutative75.1%
Simplified75.1%
if -9.50000000000000069e68 < x < 3.2e-30Initial program 96.4%
Taylor expanded in x around 0 83.4%
neg-mul-183.4%
distribute-neg-frac83.4%
Simplified83.4%
if 3.2e-30 < x Initial program 98.6%
Taylor expanded in x around inf 76.4%
Final simplification80.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.9e-38) (not (<= y 1.75e-37))) (* t (- 1.0 (/ x y))) (* x (/ t (- z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.9e-38) || !(y <= 1.75e-37)) {
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.9d-38)) .or. (.not. (y <= 1.75d-37))) 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.9e-38) || !(y <= 1.75e-37)) {
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.9e-38) or not (y <= 1.75e-37): 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.9e-38) || !(y <= 1.75e-37)) 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.9e-38) || ~((y <= 1.75e-37))) 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.9e-38], N[Not[LessEqual[y, 1.75e-37]], $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.9 \cdot 10^{-38} \lor \neg \left(y \leq 1.75 \cdot 10^{-37}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\end{array}
\end{array}
if y < -2.89999999999999994e-38 or 1.7500000000000001e-37 < y Initial program 99.8%
Taylor expanded in z around 0 75.0%
associate-*r/75.0%
neg-mul-175.0%
neg-sub075.0%
associate--r-75.0%
neg-sub075.0%
Simplified75.0%
Taylor expanded in x around 0 75.0%
mul-1-neg75.0%
unsub-neg75.0%
Simplified75.0%
if -2.89999999999999994e-38 < y < 1.7500000000000001e-37Initial program 91.8%
associate-*l/94.1%
associate-*r/91.9%
Simplified91.9%
Taylor expanded in x around inf 78.7%
associate-*l/79.0%
*-commutative79.0%
Simplified79.0%
Final simplification76.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -9.5e+29) (not (<= y 5.4e+20))) (* t (- 1.0 (/ x y))) (* t (/ x (- z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9.5e+29) || !(y <= 5.4e+20)) {
tmp = t * (1.0 - (x / y));
} else {
tmp = t * (x / (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 <= (-9.5d+29)) .or. (.not. (y <= 5.4d+20))) then
tmp = t * (1.0d0 - (x / y))
else
tmp = t * (x / (z - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9.5e+29) || !(y <= 5.4e+20)) {
tmp = t * (1.0 - (x / y));
} else {
tmp = t * (x / (z - y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -9.5e+29) or not (y <= 5.4e+20): tmp = t * (1.0 - (x / y)) else: tmp = t * (x / (z - y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -9.5e+29) || !(y <= 5.4e+20)) tmp = Float64(t * Float64(1.0 - Float64(x / y))); else tmp = Float64(t * Float64(x / Float64(z - y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -9.5e+29) || ~((y <= 5.4e+20))) tmp = t * (1.0 - (x / y)); else tmp = t * (x / (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -9.5e+29], N[Not[LessEqual[y, 5.4e+20]], $MachinePrecision]], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{+29} \lor \neg \left(y \leq 5.4 \cdot 10^{+20}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\end{array}
\end{array}
if y < -9.5000000000000003e29 or 5.4e20 < y Initial program 99.8%
Taylor expanded in z around 0 80.4%
associate-*r/80.4%
neg-mul-180.4%
neg-sub080.4%
associate--r-80.4%
neg-sub080.4%
Simplified80.4%
Taylor expanded in x around 0 80.4%
mul-1-neg80.4%
unsub-neg80.4%
Simplified80.4%
if -9.5000000000000003e29 < y < 5.4e20Initial program 93.2%
Taylor expanded in x around inf 73.3%
Final simplification76.8%
(FPCore (x y z t) :precision binary64 (if (<= y -8e-36) t (if (<= y 2100000000.0) (* x (/ t z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8e-36) {
tmp = t;
} else if (y <= 2100000000.0) {
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 <= (-8d-36)) then
tmp = t
else if (y <= 2100000000.0d0) 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 <= -8e-36) {
tmp = t;
} else if (y <= 2100000000.0) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -8e-36: tmp = t elif y <= 2100000000.0: tmp = x * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -8e-36) tmp = t; elseif (y <= 2100000000.0) 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 <= -8e-36) tmp = t; elseif (y <= 2100000000.0) tmp = x * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -8e-36], t, If[LessEqual[y, 2100000000.0], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{-36}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 2100000000:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -7.9999999999999995e-36 or 2.1e9 < y Initial program 99.8%
associate-*l/77.3%
associate-*r/75.4%
Simplified75.4%
Taylor expanded in y around inf 61.3%
if -7.9999999999999995e-36 < y < 2.1e9Initial program 92.5%
associate-*l/94.6%
associate-*r/91.8%
Simplified91.8%
Taylor expanded in x around inf 76.6%
associate-*l/76.2%
*-commutative76.2%
Simplified76.2%
Taylor expanded in z around inf 64.0%
Final simplification62.5%
(FPCore (x y z t) :precision binary64 (if (<= y -0.45) t (if (<= y 2.05e+15) (* t (/ x z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -0.45) {
tmp = t;
} else if (y <= 2.05e+15) {
tmp = t * (x / 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 <= (-0.45d0)) then
tmp = t
else if (y <= 2.05d+15) then
tmp = t * (x / 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 <= -0.45) {
tmp = t;
} else if (y <= 2.05e+15) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -0.45: tmp = t elif y <= 2.05e+15: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -0.45) tmp = t; elseif (y <= 2.05e+15) tmp = Float64(t * Float64(x / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -0.45) tmp = t; elseif (y <= 2.05e+15) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -0.45], t, If[LessEqual[y, 2.05e+15], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.45:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 2.05 \cdot 10^{+15}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -0.450000000000000011 or 2.05e15 < y Initial program 99.8%
associate-*l/76.5%
associate-*r/75.2%
Simplified75.2%
Taylor expanded in y around inf 62.0%
if -0.450000000000000011 < y < 2.05e15Initial program 92.8%
Taylor expanded in y around 0 64.6%
Final simplification63.2%
(FPCore (x y z t) :precision binary64 (if (<= y -2.4e-8) t (if (<= y 3.8e+14) (/ t (/ z x)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.4e-8) {
tmp = t;
} else if (y <= 3.8e+14) {
tmp = t / (z / x);
} 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 <= (-2.4d-8)) then
tmp = t
else if (y <= 3.8d+14) then
tmp = t / (z / x)
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 <= -2.4e-8) {
tmp = t;
} else if (y <= 3.8e+14) {
tmp = t / (z / x);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.4e-8: tmp = t elif y <= 3.8e+14: tmp = t / (z / x) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.4e-8) tmp = t; elseif (y <= 3.8e+14) tmp = Float64(t / Float64(z / x)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.4e-8) tmp = t; elseif (y <= 3.8e+14) tmp = t / (z / x); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.4e-8], t, If[LessEqual[y, 3.8e+14], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{-8}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+14}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -2.39999999999999998e-8 or 3.8e14 < y Initial program 99.8%
associate-*l/76.5%
associate-*r/75.2%
Simplified75.2%
Taylor expanded in y around inf 62.0%
if -2.39999999999999998e-8 < y < 3.8e14Initial program 92.8%
associate-*l/94.9%
associate-*r/91.4%
Simplified91.4%
Taylor expanded in y around 0 62.9%
associate-/l*64.8%
Simplified64.8%
Final simplification63.4%
(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}
Initial program 96.4%
associate-*l/85.4%
associate-*r/83.1%
Simplified83.1%
Taylor expanded in y around inf 38.2%
Final simplification38.2%
(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 2023242
(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))