
(FPCore (x y z t) :precision binary64 (+ (* (/ x y) (- z t)) t))
double code(double x, double y, double z, double t) {
return ((x / y) * (z - t)) + 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 - t)) + t
end function
public static double code(double x, double y, double z, double t) {
return ((x / y) * (z - t)) + t;
}
def code(x, y, z, t): return ((x / y) * (z - t)) + t
function code(x, y, z, t) return Float64(Float64(Float64(x / y) * Float64(z - t)) + t) end
function tmp = code(x, y, z, t) tmp = ((x / y) * (z - t)) + t; end
code[x_, y_, z_, t_] := N[(N[(N[(x / y), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y} \cdot \left(z - t\right) + t
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (* (/ x y) (- z t)) t))
double code(double x, double y, double z, double t) {
return ((x / y) * (z - t)) + 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 - t)) + t
end function
public static double code(double x, double y, double z, double t) {
return ((x / y) * (z - t)) + t;
}
def code(x, y, z, t): return ((x / y) * (z - t)) + t
function code(x, y, z, t) return Float64(Float64(Float64(x / y) * Float64(z - t)) + t) end
function tmp = code(x, y, z, t) tmp = ((x / y) * (z - t)) + t; end
code[x_, y_, z_, t_] := N[(N[(N[(x / y), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y} \cdot \left(z - t\right) + t
\end{array}
(FPCore (x y z t) :precision binary64 (fma (/ x y) (- z t) t))
double code(double x, double y, double z, double t) {
return fma((x / y), (z - t), t);
}
function code(x, y, z, t) return fma(Float64(x / y), Float64(z - t), t) end
code[x_, y_, z_, t_] := N[(N[(x / y), $MachinePrecision] * N[(z - t), $MachinePrecision] + t), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\frac{x}{y}, z - t, t\right)
\end{array}
Initial program 97.0%
fma-define97.0%
Simplified97.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ t (/ y (- x)))) (t_2 (* (/ x y) z)))
(if (<= (/ x y) -5e+193)
t_1
(if (<= (/ x y) -2e+103)
(* x (/ z y))
(if (<= (/ x y) -100.0)
t_1
(if (<= (/ x y) 2e-99)
t
(if (<= (/ x y) 5e+84)
t_2
(if (<= (/ x y) 5e+169)
(* (/ x y) (- t))
(if (<= (/ x y) 2e+243) t_2 (* (/ t y) (- x)))))))))))
double code(double x, double y, double z, double t) {
double t_1 = t / (y / -x);
double t_2 = (x / y) * z;
double tmp;
if ((x / y) <= -5e+193) {
tmp = t_1;
} else if ((x / y) <= -2e+103) {
tmp = x * (z / y);
} else if ((x / y) <= -100.0) {
tmp = t_1;
} else if ((x / y) <= 2e-99) {
tmp = t;
} else if ((x / y) <= 5e+84) {
tmp = t_2;
} else if ((x / y) <= 5e+169) {
tmp = (x / y) * -t;
} else if ((x / y) <= 2e+243) {
tmp = t_2;
} else {
tmp = (t / y) * -x;
}
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 / (y / -x)
t_2 = (x / y) * z
if ((x / y) <= (-5d+193)) then
tmp = t_1
else if ((x / y) <= (-2d+103)) then
tmp = x * (z / y)
else if ((x / y) <= (-100.0d0)) then
tmp = t_1
else if ((x / y) <= 2d-99) then
tmp = t
else if ((x / y) <= 5d+84) then
tmp = t_2
else if ((x / y) <= 5d+169) then
tmp = (x / y) * -t
else if ((x / y) <= 2d+243) then
tmp = t_2
else
tmp = (t / y) * -x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t / (y / -x);
double t_2 = (x / y) * z;
double tmp;
if ((x / y) <= -5e+193) {
tmp = t_1;
} else if ((x / y) <= -2e+103) {
tmp = x * (z / y);
} else if ((x / y) <= -100.0) {
tmp = t_1;
} else if ((x / y) <= 2e-99) {
tmp = t;
} else if ((x / y) <= 5e+84) {
tmp = t_2;
} else if ((x / y) <= 5e+169) {
tmp = (x / y) * -t;
} else if ((x / y) <= 2e+243) {
tmp = t_2;
} else {
tmp = (t / y) * -x;
}
return tmp;
}
def code(x, y, z, t): t_1 = t / (y / -x) t_2 = (x / y) * z tmp = 0 if (x / y) <= -5e+193: tmp = t_1 elif (x / y) <= -2e+103: tmp = x * (z / y) elif (x / y) <= -100.0: tmp = t_1 elif (x / y) <= 2e-99: tmp = t elif (x / y) <= 5e+84: tmp = t_2 elif (x / y) <= 5e+169: tmp = (x / y) * -t elif (x / y) <= 2e+243: tmp = t_2 else: tmp = (t / y) * -x return tmp
function code(x, y, z, t) t_1 = Float64(t / Float64(y / Float64(-x))) t_2 = Float64(Float64(x / y) * z) tmp = 0.0 if (Float64(x / y) <= -5e+193) tmp = t_1; elseif (Float64(x / y) <= -2e+103) tmp = Float64(x * Float64(z / y)); elseif (Float64(x / y) <= -100.0) tmp = t_1; elseif (Float64(x / y) <= 2e-99) tmp = t; elseif (Float64(x / y) <= 5e+84) tmp = t_2; elseif (Float64(x / y) <= 5e+169) tmp = Float64(Float64(x / y) * Float64(-t)); elseif (Float64(x / y) <= 2e+243) tmp = t_2; else tmp = Float64(Float64(t / y) * Float64(-x)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t / (y / -x); t_2 = (x / y) * z; tmp = 0.0; if ((x / y) <= -5e+193) tmp = t_1; elseif ((x / y) <= -2e+103) tmp = x * (z / y); elseif ((x / y) <= -100.0) tmp = t_1; elseif ((x / y) <= 2e-99) tmp = t; elseif ((x / y) <= 5e+84) tmp = t_2; elseif ((x / y) <= 5e+169) tmp = (x / y) * -t; elseif ((x / y) <= 2e+243) tmp = t_2; else tmp = (t / y) * -x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t / N[(y / (-x)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / y), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[N[(x / y), $MachinePrecision], -5e+193], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], -2e+103], N[(x * N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], -100.0], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], 2e-99], t, If[LessEqual[N[(x / y), $MachinePrecision], 5e+84], t$95$2, If[LessEqual[N[(x / y), $MachinePrecision], 5e+169], N[(N[(x / y), $MachinePrecision] * (-t)), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 2e+243], t$95$2, N[(N[(t / y), $MachinePrecision] * (-x)), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{\frac{y}{-x}}\\
t_2 := \frac{x}{y} \cdot z\\
\mathbf{if}\;\frac{x}{y} \leq -5 \cdot 10^{+193}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\frac{x}{y} \leq -2 \cdot 10^{+103}:\\
\;\;\;\;x \cdot \frac{z}{y}\\
\mathbf{elif}\;\frac{x}{y} \leq -100:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\frac{x}{y} \leq 2 \cdot 10^{-99}:\\
\;\;\;\;t\\
\mathbf{elif}\;\frac{x}{y} \leq 5 \cdot 10^{+84}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;\frac{x}{y} \leq 5 \cdot 10^{+169}:\\
\;\;\;\;\frac{x}{y} \cdot \left(-t\right)\\
\mathbf{elif}\;\frac{x}{y} \leq 2 \cdot 10^{+243}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{y} \cdot \left(-x\right)\\
\end{array}
\end{array}
if (/.f64 x y) < -4.99999999999999972e193 or -2e103 < (/.f64 x y) < -100Initial program 99.7%
Taylor expanded in z around 0 63.5%
mul-1-neg63.5%
unsub-neg63.5%
*-rgt-identity63.5%
associate-/l*73.0%
distribute-lft-out--73.0%
Simplified73.0%
Taylor expanded in x around inf 61.4%
mul-1-neg61.4%
associate-*l/58.7%
associate-/r/70.9%
distribute-neg-frac270.9%
distribute-frac-neg70.9%
Simplified70.9%
if -4.99999999999999972e193 < (/.f64 x y) < -2e103Initial program 99.9%
Taylor expanded in x around inf 99.6%
Taylor expanded in z around inf 63.0%
associate-*r/63.0%
Simplified63.0%
if -100 < (/.f64 x y) < 2e-99Initial program 95.7%
Taylor expanded in x around 0 72.8%
if 2e-99 < (/.f64 x y) < 5.0000000000000001e84 or 5.00000000000000017e169 < (/.f64 x y) < 2.0000000000000001e243Initial program 99.8%
Taylor expanded in x around inf 74.4%
Taylor expanded in z around inf 63.3%
associate-*l/71.9%
*-commutative71.9%
Simplified71.9%
if 5.0000000000000001e84 < (/.f64 x y) < 5.00000000000000017e169Initial program 99.8%
Taylor expanded in x around inf 99.8%
Taylor expanded in z around 0 64.3%
mul-1-neg64.3%
associate-*r/70.2%
distribute-rgt-neg-in70.2%
Simplified70.2%
if 2.0000000000000001e243 < (/.f64 x y) Initial program 85.7%
Taylor expanded in z around 0 68.1%
mul-1-neg68.1%
unsub-neg68.1%
*-rgt-identity68.1%
associate-/l*66.7%
distribute-lft-out--66.7%
Simplified66.7%
Taylor expanded in x around inf 68.1%
mul-1-neg68.1%
associate-*l/68.1%
distribute-rgt-neg-out68.1%
Simplified68.1%
Final simplification71.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (/ x y) (- t))) (t_2 (* (/ x y) z)))
(if (<= (/ x y) -5e+193)
t_1
(if (<= (/ x y) -2e+103)
(* x (/ z y))
(if (<= (/ x y) -100.0)
t_1
(if (<= (/ x y) 2e-99)
t
(if (<= (/ x y) 5e+84)
t_2
(if (<= (/ x y) 5e+169)
t_1
(if (<= (/ x y) 2e+243) t_2 (* (/ t y) (- x)))))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x / y) * -t;
double t_2 = (x / y) * z;
double tmp;
if ((x / y) <= -5e+193) {
tmp = t_1;
} else if ((x / y) <= -2e+103) {
tmp = x * (z / y);
} else if ((x / y) <= -100.0) {
tmp = t_1;
} else if ((x / y) <= 2e-99) {
tmp = t;
} else if ((x / y) <= 5e+84) {
tmp = t_2;
} else if ((x / y) <= 5e+169) {
tmp = t_1;
} else if ((x / y) <= 2e+243) {
tmp = t_2;
} else {
tmp = (t / y) * -x;
}
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 = (x / y) * -t
t_2 = (x / y) * z
if ((x / y) <= (-5d+193)) then
tmp = t_1
else if ((x / y) <= (-2d+103)) then
tmp = x * (z / y)
else if ((x / y) <= (-100.0d0)) then
tmp = t_1
else if ((x / y) <= 2d-99) then
tmp = t
else if ((x / y) <= 5d+84) then
tmp = t_2
else if ((x / y) <= 5d+169) then
tmp = t_1
else if ((x / y) <= 2d+243) then
tmp = t_2
else
tmp = (t / y) * -x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x / y) * -t;
double t_2 = (x / y) * z;
double tmp;
if ((x / y) <= -5e+193) {
tmp = t_1;
} else if ((x / y) <= -2e+103) {
tmp = x * (z / y);
} else if ((x / y) <= -100.0) {
tmp = t_1;
} else if ((x / y) <= 2e-99) {
tmp = t;
} else if ((x / y) <= 5e+84) {
tmp = t_2;
} else if ((x / y) <= 5e+169) {
tmp = t_1;
} else if ((x / y) <= 2e+243) {
tmp = t_2;
} else {
tmp = (t / y) * -x;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) * -t t_2 = (x / y) * z tmp = 0 if (x / y) <= -5e+193: tmp = t_1 elif (x / y) <= -2e+103: tmp = x * (z / y) elif (x / y) <= -100.0: tmp = t_1 elif (x / y) <= 2e-99: tmp = t elif (x / y) <= 5e+84: tmp = t_2 elif (x / y) <= 5e+169: tmp = t_1 elif (x / y) <= 2e+243: tmp = t_2 else: tmp = (t / y) * -x return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / y) * Float64(-t)) t_2 = Float64(Float64(x / y) * z) tmp = 0.0 if (Float64(x / y) <= -5e+193) tmp = t_1; elseif (Float64(x / y) <= -2e+103) tmp = Float64(x * Float64(z / y)); elseif (Float64(x / y) <= -100.0) tmp = t_1; elseif (Float64(x / y) <= 2e-99) tmp = t; elseif (Float64(x / y) <= 5e+84) tmp = t_2; elseif (Float64(x / y) <= 5e+169) tmp = t_1; elseif (Float64(x / y) <= 2e+243) tmp = t_2; else tmp = Float64(Float64(t / y) * Float64(-x)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / y) * -t; t_2 = (x / y) * z; tmp = 0.0; if ((x / y) <= -5e+193) tmp = t_1; elseif ((x / y) <= -2e+103) tmp = x * (z / y); elseif ((x / y) <= -100.0) tmp = t_1; elseif ((x / y) <= 2e-99) tmp = t; elseif ((x / y) <= 5e+84) tmp = t_2; elseif ((x / y) <= 5e+169) tmp = t_1; elseif ((x / y) <= 2e+243) tmp = t_2; else tmp = (t / y) * -x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] * (-t)), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / y), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[N[(x / y), $MachinePrecision], -5e+193], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], -2e+103], N[(x * N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], -100.0], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], 2e-99], t, If[LessEqual[N[(x / y), $MachinePrecision], 5e+84], t$95$2, If[LessEqual[N[(x / y), $MachinePrecision], 5e+169], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], 2e+243], t$95$2, N[(N[(t / y), $MachinePrecision] * (-x)), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} \cdot \left(-t\right)\\
t_2 := \frac{x}{y} \cdot z\\
\mathbf{if}\;\frac{x}{y} \leq -5 \cdot 10^{+193}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\frac{x}{y} \leq -2 \cdot 10^{+103}:\\
\;\;\;\;x \cdot \frac{z}{y}\\
\mathbf{elif}\;\frac{x}{y} \leq -100:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\frac{x}{y} \leq 2 \cdot 10^{-99}:\\
\;\;\;\;t\\
\mathbf{elif}\;\frac{x}{y} \leq 5 \cdot 10^{+84}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;\frac{x}{y} \leq 5 \cdot 10^{+169}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\frac{x}{y} \leq 2 \cdot 10^{+243}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{y} \cdot \left(-x\right)\\
\end{array}
\end{array}
if (/.f64 x y) < -4.99999999999999972e193 or -2e103 < (/.f64 x y) < -100 or 5.0000000000000001e84 < (/.f64 x y) < 5.00000000000000017e169Initial program 99.7%
Taylor expanded in x around inf 89.3%
Taylor expanded in z around 0 62.1%
mul-1-neg62.1%
associate-*r/70.7%
distribute-rgt-neg-in70.7%
Simplified70.7%
if -4.99999999999999972e193 < (/.f64 x y) < -2e103Initial program 99.9%
Taylor expanded in x around inf 99.6%
Taylor expanded in z around inf 63.0%
associate-*r/63.0%
Simplified63.0%
if -100 < (/.f64 x y) < 2e-99Initial program 95.7%
Taylor expanded in x around 0 72.8%
if 2e-99 < (/.f64 x y) < 5.0000000000000001e84 or 5.00000000000000017e169 < (/.f64 x y) < 2.0000000000000001e243Initial program 99.8%
Taylor expanded in x around inf 74.4%
Taylor expanded in z around inf 63.3%
associate-*l/71.9%
*-commutative71.9%
Simplified71.9%
if 2.0000000000000001e243 < (/.f64 x y) Initial program 85.7%
Taylor expanded in z around 0 68.1%
mul-1-neg68.1%
unsub-neg68.1%
*-rgt-identity68.1%
associate-/l*66.7%
distribute-lft-out--66.7%
Simplified66.7%
Taylor expanded in x around inf 68.1%
mul-1-neg68.1%
associate-*l/68.1%
distribute-rgt-neg-out68.1%
Simplified68.1%
Final simplification71.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (/ x y) (- t))))
(if (<= (/ x y) -5e+193)
t_1
(if (<= (/ x y) -2e+103)
(* x (/ z y))
(if (<= (/ x y) -100.0)
t_1
(if (<= (/ x y) 2e-99)
t
(if (or (<= (/ x y) 5e+84) (not (<= (/ x y) 5e+169)))
(* (/ x y) z)
t_1)))))))
double code(double x, double y, double z, double t) {
double t_1 = (x / y) * -t;
double tmp;
if ((x / y) <= -5e+193) {
tmp = t_1;
} else if ((x / y) <= -2e+103) {
tmp = x * (z / y);
} else if ((x / y) <= -100.0) {
tmp = t_1;
} else if ((x / y) <= 2e-99) {
tmp = t;
} else if (((x / y) <= 5e+84) || !((x / y) <= 5e+169)) {
tmp = (x / y) * z;
} 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 = (x / y) * -t
if ((x / y) <= (-5d+193)) then
tmp = t_1
else if ((x / y) <= (-2d+103)) then
tmp = x * (z / y)
else if ((x / y) <= (-100.0d0)) then
tmp = t_1
else if ((x / y) <= 2d-99) then
tmp = t
else if (((x / y) <= 5d+84) .or. (.not. ((x / y) <= 5d+169))) then
tmp = (x / y) * z
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 = (x / y) * -t;
double tmp;
if ((x / y) <= -5e+193) {
tmp = t_1;
} else if ((x / y) <= -2e+103) {
tmp = x * (z / y);
} else if ((x / y) <= -100.0) {
tmp = t_1;
} else if ((x / y) <= 2e-99) {
tmp = t;
} else if (((x / y) <= 5e+84) || !((x / y) <= 5e+169)) {
tmp = (x / y) * z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) * -t tmp = 0 if (x / y) <= -5e+193: tmp = t_1 elif (x / y) <= -2e+103: tmp = x * (z / y) elif (x / y) <= -100.0: tmp = t_1 elif (x / y) <= 2e-99: tmp = t elif ((x / y) <= 5e+84) or not ((x / y) <= 5e+169): tmp = (x / y) * z else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / y) * Float64(-t)) tmp = 0.0 if (Float64(x / y) <= -5e+193) tmp = t_1; elseif (Float64(x / y) <= -2e+103) tmp = Float64(x * Float64(z / y)); elseif (Float64(x / y) <= -100.0) tmp = t_1; elseif (Float64(x / y) <= 2e-99) tmp = t; elseif ((Float64(x / y) <= 5e+84) || !(Float64(x / y) <= 5e+169)) tmp = Float64(Float64(x / y) * z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / y) * -t; tmp = 0.0; if ((x / y) <= -5e+193) tmp = t_1; elseif ((x / y) <= -2e+103) tmp = x * (z / y); elseif ((x / y) <= -100.0) tmp = t_1; elseif ((x / y) <= 2e-99) tmp = t; elseif (((x / y) <= 5e+84) || ~(((x / y) <= 5e+169))) tmp = (x / y) * z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] * (-t)), $MachinePrecision]}, If[LessEqual[N[(x / y), $MachinePrecision], -5e+193], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], -2e+103], N[(x * N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], -100.0], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], 2e-99], t, If[Or[LessEqual[N[(x / y), $MachinePrecision], 5e+84], N[Not[LessEqual[N[(x / y), $MachinePrecision], 5e+169]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] * z), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} \cdot \left(-t\right)\\
\mathbf{if}\;\frac{x}{y} \leq -5 \cdot 10^{+193}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\frac{x}{y} \leq -2 \cdot 10^{+103}:\\
\;\;\;\;x \cdot \frac{z}{y}\\
\mathbf{elif}\;\frac{x}{y} \leq -100:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\frac{x}{y} \leq 2 \cdot 10^{-99}:\\
\;\;\;\;t\\
\mathbf{elif}\;\frac{x}{y} \leq 5 \cdot 10^{+84} \lor \neg \left(\frac{x}{y} \leq 5 \cdot 10^{+169}\right):\\
\;\;\;\;\frac{x}{y} \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 x y) < -4.99999999999999972e193 or -2e103 < (/.f64 x y) < -100 or 5.0000000000000001e84 < (/.f64 x y) < 5.00000000000000017e169Initial program 99.7%
Taylor expanded in x around inf 89.3%
Taylor expanded in z around 0 62.1%
mul-1-neg62.1%
associate-*r/70.7%
distribute-rgt-neg-in70.7%
Simplified70.7%
if -4.99999999999999972e193 < (/.f64 x y) < -2e103Initial program 99.9%
Taylor expanded in x around inf 99.6%
Taylor expanded in z around inf 63.0%
associate-*r/63.0%
Simplified63.0%
if -100 < (/.f64 x y) < 2e-99Initial program 95.7%
Taylor expanded in x around 0 72.8%
if 2e-99 < (/.f64 x y) < 5.0000000000000001e84 or 5.00000000000000017e169 < (/.f64 x y) Initial program 95.5%
Taylor expanded in x around inf 82.2%
Taylor expanded in z around inf 55.4%
associate-*l/64.3%
*-commutative64.3%
Simplified64.3%
Final simplification69.4%
(FPCore (x y z t) :precision binary64 (if (or (<= (/ x y) -100000000000.0) (not (<= (/ x y) 2e-6))) (* x (/ (- z t) y)) (+ t (* x (/ z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -100000000000.0) || !((x / y) <= 2e-6)) {
tmp = x * ((z - t) / 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 / y) <= (-100000000000.0d0)) .or. (.not. ((x / y) <= 2d-6))) then
tmp = x * ((z - t) / 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 / y) <= -100000000000.0) || !((x / y) <= 2e-6)) {
tmp = x * ((z - t) / y);
} else {
tmp = t + (x * (z / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x / y) <= -100000000000.0) or not ((x / y) <= 2e-6): tmp = x * ((z - t) / y) else: tmp = t + (x * (z / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(x / y) <= -100000000000.0) || !(Float64(x / y) <= 2e-6)) tmp = Float64(x * Float64(Float64(z - t) / 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 / y) <= -100000000000.0) || ~(((x / y) <= 2e-6))) tmp = x * ((z - t) / y); else tmp = t + (x * (z / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x / y), $MachinePrecision], -100000000000.0], N[Not[LessEqual[N[(x / y), $MachinePrecision], 2e-6]], $MachinePrecision]], N[(x * N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(t + N[(x * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -100000000000 \lor \neg \left(\frac{x}{y} \leq 2 \cdot 10^{-6}\right):\\
\;\;\;\;x \cdot \frac{z - t}{y}\\
\mathbf{else}:\\
\;\;\;\;t + x \cdot \frac{z}{y}\\
\end{array}
\end{array}
if (/.f64 x y) < -1e11 or 1.99999999999999991e-6 < (/.f64 x y) Initial program 97.5%
Taylor expanded in x around inf 93.6%
Taylor expanded in z around 0 82.6%
+-commutative82.6%
associate-*r/83.6%
associate-*l/85.7%
associate-*r*85.7%
*-commutative85.7%
distribute-lft-out93.6%
mul-1-neg93.6%
sub-neg93.6%
div-sub95.2%
Simplified95.2%
if -1e11 < (/.f64 x y) < 1.99999999999999991e-6Initial program 96.4%
Taylor expanded in z around inf 94.0%
associate-/l*95.0%
Simplified95.0%
Final simplification95.1%
(FPCore (x y z t) :precision binary64 (if (or (<= (/ x y) -2e+103) (not (<= (/ x y) 2e-99))) (* x (/ (- z t) y)) (* t (- 1.0 (/ x y)))))
double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -2e+103) || !((x / y) <= 2e-99)) {
tmp = x * ((z - t) / 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 (((x / y) <= (-2d+103)) .or. (.not. ((x / y) <= 2d-99))) then
tmp = x * ((z - t) / 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 (((x / y) <= -2e+103) || !((x / y) <= 2e-99)) {
tmp = x * ((z - t) / y);
} else {
tmp = t * (1.0 - (x / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x / y) <= -2e+103) or not ((x / y) <= 2e-99): tmp = x * ((z - t) / y) else: tmp = t * (1.0 - (x / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(x / y) <= -2e+103) || !(Float64(x / y) <= 2e-99)) tmp = Float64(x * Float64(Float64(z - t) / 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 (((x / y) <= -2e+103) || ~(((x / y) <= 2e-99))) tmp = x * ((z - t) / y); else tmp = t * (1.0 - (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x / y), $MachinePrecision], -2e+103], N[Not[LessEqual[N[(x / y), $MachinePrecision], 2e-99]], $MachinePrecision]], N[(x * N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -2 \cdot 10^{+103} \lor \neg \left(\frac{x}{y} \leq 2 \cdot 10^{-99}\right):\\
\;\;\;\;x \cdot \frac{z - t}{y}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\end{array}
\end{array}
if (/.f64 x y) < -2e103 or 2e-99 < (/.f64 x y) Initial program 97.7%
Taylor expanded in x around inf 89.7%
Taylor expanded in z around 0 79.2%
+-commutative79.2%
associate-*r/79.4%
associate-*l/82.1%
associate-*r*82.1%
*-commutative82.1%
distribute-lft-out89.7%
mul-1-neg89.7%
sub-neg89.7%
div-sub91.2%
Simplified91.2%
if -2e103 < (/.f64 x y) < 2e-99Initial program 96.2%
Taylor expanded in z around 0 69.9%
mul-1-neg69.9%
unsub-neg69.9%
*-rgt-identity69.9%
associate-/l*75.1%
distribute-lft-out--75.1%
Simplified75.1%
Final simplification83.4%
(FPCore (x y z t) :precision binary64 (if (<= (/ x y) -100.0) (/ (* x (- z t)) y) (if (<= (/ x y) 2e-6) (+ t (* x (/ z y))) (* x (/ (- z t) y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x / y) <= -100.0) {
tmp = (x * (z - t)) / y;
} else if ((x / y) <= 2e-6) {
tmp = t + (x * (z / y));
} else {
tmp = x * ((z - t) / 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 / y) <= (-100.0d0)) then
tmp = (x * (z - t)) / y
else if ((x / y) <= 2d-6) then
tmp = t + (x * (z / y))
else
tmp = x * ((z - t) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x / y) <= -100.0) {
tmp = (x * (z - t)) / y;
} else if ((x / y) <= 2e-6) {
tmp = t + (x * (z / y));
} else {
tmp = x * ((z - t) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x / y) <= -100.0: tmp = (x * (z - t)) / y elif (x / y) <= 2e-6: tmp = t + (x * (z / y)) else: tmp = x * ((z - t) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(x / y) <= -100.0) tmp = Float64(Float64(x * Float64(z - t)) / y); elseif (Float64(x / y) <= 2e-6) tmp = Float64(t + Float64(x * Float64(z / y))); else tmp = Float64(x * Float64(Float64(z - t) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x / y) <= -100.0) tmp = (x * (z - t)) / y; elseif ((x / y) <= 2e-6) tmp = t + (x * (z / y)); else tmp = x * ((z - t) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(x / y), $MachinePrecision], -100.0], N[(N[(x * N[(z - t), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 2e-6], N[(t + N[(x * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -100:\\
\;\;\;\;\frac{x \cdot \left(z - t\right)}{y}\\
\mathbf{elif}\;\frac{x}{y} \leq 2 \cdot 10^{-6}:\\
\;\;\;\;t + x \cdot \frac{z}{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{z - t}{y}\\
\end{array}
\end{array}
if (/.f64 x y) < -100Initial program 99.7%
Taylor expanded in x around inf 89.5%
*-commutative89.5%
sub-div91.0%
associate-*l/94.0%
Applied egg-rr94.0%
if -100 < (/.f64 x y) < 1.99999999999999991e-6Initial program 96.4%
Taylor expanded in z around inf 94.6%
associate-/l*95.7%
Simplified95.7%
if 1.99999999999999991e-6 < (/.f64 x y) Initial program 95.2%
Taylor expanded in x around inf 96.7%
Taylor expanded in z around 0 76.0%
+-commutative76.0%
associate-*r/80.7%
associate-*l/85.2%
associate-*r*85.2%
*-commutative85.2%
distribute-lft-out96.7%
mul-1-neg96.7%
sub-neg96.7%
div-sub98.3%
Simplified98.3%
Final simplification95.9%
(FPCore (x y z t) :precision binary64 (if (or (<= (/ x y) -1e+49) (not (<= (/ x y) 2e-99))) (* (/ x y) z) t))
double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -1e+49) || !((x / y) <= 2e-99)) {
tmp = (x / 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 (((x / y) <= (-1d+49)) .or. (.not. ((x / y) <= 2d-99))) then
tmp = (x / 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 (((x / y) <= -1e+49) || !((x / y) <= 2e-99)) {
tmp = (x / y) * z;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x / y) <= -1e+49) or not ((x / y) <= 2e-99): tmp = (x / y) * z else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(x / y) <= -1e+49) || !(Float64(x / y) <= 2e-99)) tmp = Float64(Float64(x / y) * z); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((x / y) <= -1e+49) || ~(((x / y) <= 2e-99))) tmp = (x / y) * z; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x / y), $MachinePrecision], -1e+49], N[Not[LessEqual[N[(x / y), $MachinePrecision], 2e-99]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] * z), $MachinePrecision], t]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -1 \cdot 10^{+49} \lor \neg \left(\frac{x}{y} \leq 2 \cdot 10^{-99}\right):\\
\;\;\;\;\frac{x}{y} \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if (/.f64 x y) < -9.99999999999999946e48 or 2e-99 < (/.f64 x y) Initial program 97.8%
Taylor expanded in x around inf 88.2%
Taylor expanded in z around inf 50.1%
associate-*l/55.7%
*-commutative55.7%
Simplified55.7%
if -9.99999999999999946e48 < (/.f64 x y) < 2e-99Initial program 96.0%
Taylor expanded in x around 0 68.5%
Final simplification61.5%
(FPCore (x y z t) :precision binary64 (if (<= z -2.75e+118) (* x (/ z y)) (if (<= z 1.5e+52) (* t (- 1.0 (/ x y))) (* (/ x y) z))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.75e+118) {
tmp = x * (z / y);
} else if (z <= 1.5e+52) {
tmp = t * (1.0 - (x / y));
} else {
tmp = (x / y) * 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 (z <= (-2.75d+118)) then
tmp = x * (z / y)
else if (z <= 1.5d+52) then
tmp = t * (1.0d0 - (x / y))
else
tmp = (x / y) * z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.75e+118) {
tmp = x * (z / y);
} else if (z <= 1.5e+52) {
tmp = t * (1.0 - (x / y));
} else {
tmp = (x / y) * z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -2.75e+118: tmp = x * (z / y) elif z <= 1.5e+52: tmp = t * (1.0 - (x / y)) else: tmp = (x / y) * z return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -2.75e+118) tmp = Float64(x * Float64(z / y)); elseif (z <= 1.5e+52) tmp = Float64(t * Float64(1.0 - Float64(x / y))); else tmp = Float64(Float64(x / y) * z); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -2.75e+118) tmp = x * (z / y); elseif (z <= 1.5e+52) tmp = t * (1.0 - (x / y)); else tmp = (x / y) * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.75e+118], N[(x * N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.5e+52], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] * z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.75 \cdot 10^{+118}:\\
\;\;\;\;x \cdot \frac{z}{y}\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+52}:\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} \cdot z\\
\end{array}
\end{array}
if z < -2.7500000000000002e118Initial program 89.1%
Taylor expanded in x around inf 74.5%
Taylor expanded in z around inf 69.1%
associate-*r/74.3%
Simplified74.3%
if -2.7500000000000002e118 < z < 1.5e52Initial program 98.2%
Taylor expanded in z around 0 74.0%
mul-1-neg74.0%
unsub-neg74.0%
*-rgt-identity74.0%
associate-/l*79.3%
distribute-lft-out--79.3%
Simplified79.3%
if 1.5e52 < z Initial program 98.1%
Taylor expanded in x around inf 72.3%
Taylor expanded in z around inf 66.9%
associate-*l/74.5%
*-commutative74.5%
Simplified74.5%
Final simplification77.6%
(FPCore (x y z t) :precision binary64 (if (<= y -1.42e+97) t (if (<= y 5.8e+37) (* x (/ z y)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.42e+97) {
tmp = t;
} else if (y <= 5.8e+37) {
tmp = x * (z / y);
} 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 <= (-1.42d+97)) then
tmp = t
else if (y <= 5.8d+37) then
tmp = x * (z / y)
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 <= -1.42e+97) {
tmp = t;
} else if (y <= 5.8e+37) {
tmp = x * (z / y);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.42e+97: tmp = t elif y <= 5.8e+37: tmp = x * (z / y) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.42e+97) tmp = t; elseif (y <= 5.8e+37) tmp = Float64(x * Float64(z / y)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.42e+97) tmp = t; elseif (y <= 5.8e+37) tmp = x * (z / y); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.42e+97], t, If[LessEqual[y, 5.8e+37], N[(x * N[(z / y), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.42 \cdot 10^{+97}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{+37}:\\
\;\;\;\;x \cdot \frac{z}{y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.41999999999999991e97 or 5.79999999999999957e37 < y Initial program 95.4%
Taylor expanded in x around 0 62.0%
if -1.41999999999999991e97 < y < 5.79999999999999957e37Initial program 98.0%
Taylor expanded in x around inf 78.6%
Taylor expanded in z around inf 50.3%
associate-*r/48.8%
Simplified48.8%
(FPCore (x y z t) :precision binary64 (+ t (* (/ x y) (- z t))))
double code(double x, double y, double z, double t) {
return t + ((x / y) * (z - 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 + ((x / y) * (z - t))
end function
public static double code(double x, double y, double z, double t) {
return t + ((x / y) * (z - t));
}
def code(x, y, z, t): return t + ((x / y) * (z - t))
function code(x, y, z, t) return Float64(t + Float64(Float64(x / y) * Float64(z - t))) end
function tmp = code(x, y, z, t) tmp = t + ((x / y) * (z - t)); end
code[x_, y_, z_, t_] := N[(t + N[(N[(x / y), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
t + \frac{x}{y} \cdot \left(z - t\right)
\end{array}
Initial program 97.0%
Final simplification97.0%
(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 97.0%
Taylor expanded in x around 0 35.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ (* (/ x y) (- z t)) t)))
(if (< z 2.759456554562692e-282)
t_1
(if (< z 2.326994450874436e-110) (+ (* x (/ (- z t) y)) t) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = ((x / y) * (z - t)) + t;
double tmp;
if (z < 2.759456554562692e-282) {
tmp = t_1;
} else if (z < 2.326994450874436e-110) {
tmp = (x * ((z - t) / 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 = ((x / y) * (z - t)) + t
if (z < 2.759456554562692d-282) then
tmp = t_1
else if (z < 2.326994450874436d-110) then
tmp = (x * ((z - t) / 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 = ((x / y) * (z - t)) + t;
double tmp;
if (z < 2.759456554562692e-282) {
tmp = t_1;
} else if (z < 2.326994450874436e-110) {
tmp = (x * ((z - t) / y)) + t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = ((x / y) * (z - t)) + t tmp = 0 if z < 2.759456554562692e-282: tmp = t_1 elif z < 2.326994450874436e-110: tmp = (x * ((z - t) / y)) + t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(Float64(x / y) * Float64(z - t)) + t) tmp = 0.0 if (z < 2.759456554562692e-282) tmp = t_1; elseif (z < 2.326994450874436e-110) tmp = Float64(Float64(x * Float64(Float64(z - t) / y)) + t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = ((x / y) * (z - t)) + t; tmp = 0.0; if (z < 2.759456554562692e-282) tmp = t_1; elseif (z < 2.326994450874436e-110) tmp = (x * ((z - t) / y)) + t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[(x / y), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]}, If[Less[z, 2.759456554562692e-282], t$95$1, If[Less[z, 2.326994450874436e-110], N[(N[(x * N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} \cdot \left(z - t\right) + t\\
\mathbf{if}\;z < 2.759456554562692 \cdot 10^{-282}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 2.326994450874436 \cdot 10^{-110}:\\
\;\;\;\;x \cdot \frac{z - t}{y} + t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024086
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cget from hsignal-0.2.7.1"
:precision binary64
:alt
(if (< z 2.759456554562692e-282) (+ (* (/ x y) (- z t)) t) (if (< z 2.326994450874436e-110) (+ (* x (/ (- z t) y)) t) (+ (* (/ x y) (- z t)) t)))
(+ (* (/ x y) (- z t)) t))