
(FPCore (x y z t a) :precision binary64 (/ (- (* x y) (* z t)) a))
double code(double x, double y, double z, double t, double a) {
return ((x * y) - (z * t)) / a;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((x * y) - (z * t)) / a
end function
public static double code(double x, double y, double z, double t, double a) {
return ((x * y) - (z * t)) / a;
}
def code(x, y, z, t, a): return ((x * y) - (z * t)) / a
function code(x, y, z, t, a) return Float64(Float64(Float64(x * y) - Float64(z * t)) / a) end
function tmp = code(x, y, z, t, a) tmp = ((x * y) - (z * t)) / a; end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y - z \cdot t}{a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 10 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (/ (- (* x y) (* z t)) a))
double code(double x, double y, double z, double t, double a) {
return ((x * y) - (z * t)) / a;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((x * y) - (z * t)) / a
end function
public static double code(double x, double y, double z, double t, double a) {
return ((x * y) - (z * t)) / a;
}
def code(x, y, z, t, a): return ((x * y) - (z * t)) / a
function code(x, y, z, t, a) return Float64(Float64(Float64(x * y) - Float64(z * t)) / a) end
function tmp = code(x, y, z, t, a) tmp = ((x * y) - (z * t)) / a; end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y - z \cdot t}{a}
\end{array}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (* x y) (* z t))))
(if (or (<= t_1 -5e+295) (not (<= t_1 1e+238)))
(* x (/ (- y (* t (/ z x))) a))
(/ t_1 a))))assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double t_1 = (x * y) - (z * t);
double tmp;
if ((t_1 <= -5e+295) || !(t_1 <= 1e+238)) {
tmp = x * ((y - (t * (z / x))) / a);
} else {
tmp = t_1 / a;
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (x * y) - (z * t)
if ((t_1 <= (-5d+295)) .or. (.not. (t_1 <= 1d+238))) then
tmp = x * ((y - (t * (z / x))) / a)
else
tmp = t_1 / a
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (x * y) - (z * t);
double tmp;
if ((t_1 <= -5e+295) || !(t_1 <= 1e+238)) {
tmp = x * ((y - (t * (z / x))) / a);
} else {
tmp = t_1 / a;
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): t_1 = (x * y) - (z * t) tmp = 0 if (t_1 <= -5e+295) or not (t_1 <= 1e+238): tmp = x * ((y - (t * (z / x))) / a) else: tmp = t_1 / a return tmp
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) t_1 = Float64(Float64(x * y) - Float64(z * t)) tmp = 0.0 if ((t_1 <= -5e+295) || !(t_1 <= 1e+238)) tmp = Float64(x * Float64(Float64(y - Float64(t * Float64(z / x))) / a)); else tmp = Float64(t_1 / a); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
t_1 = (x * y) - (z * t);
tmp = 0.0;
if ((t_1 <= -5e+295) || ~((t_1 <= 1e+238)))
tmp = x * ((y - (t * (z / x))) / a);
else
tmp = t_1 / a;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e+295], N[Not[LessEqual[t$95$1, 1e+238]], $MachinePrecision]], N[(x * N[(N[(y - N[(t * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / a), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
t_1 := x \cdot y - z \cdot t\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+295} \lor \neg \left(t\_1 \leq 10^{+238}\right):\\
\;\;\;\;x \cdot \frac{y - t \cdot \frac{z}{x}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{a}\\
\end{array}
\end{array}
if (-.f64 (*.f64 x y) (*.f64 z t)) < -4.99999999999999991e295 or 1e238 < (-.f64 (*.f64 x y) (*.f64 z t)) Initial program 79.0%
Taylor expanded in x around inf 80.3%
associate-*r/80.3%
associate-*r*80.3%
mul-1-neg80.3%
Simplified80.3%
Taylor expanded in x around inf 90.3%
+-commutative90.3%
mul-1-neg90.3%
unsub-neg90.3%
times-frac92.6%
associate-*l/92.8%
div-sub96.5%
Simplified96.5%
if -4.99999999999999991e295 < (-.f64 (*.f64 x y) (*.f64 z t)) < 1e238Initial program 99.1%
Final simplification98.3%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
:precision binary64
(if (<= (* x y) -2e+34)
(/ x (/ a y))
(if (<= (* x y) -2e-28)
(/ -1.0 (/ a (* z t)))
(if (<= (* x y) -5e-65)
(/ (* x y) a)
(if (<= (* x y) 4e-8) (/ (* z t) (- a)) (/ y (/ a x)))))))assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -2e+34) {
tmp = x / (a / y);
} else if ((x * y) <= -2e-28) {
tmp = -1.0 / (a / (z * t));
} else if ((x * y) <= -5e-65) {
tmp = (x * y) / a;
} else if ((x * y) <= 4e-8) {
tmp = (z * t) / -a;
} else {
tmp = y / (a / x);
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x * y) <= (-2d+34)) then
tmp = x / (a / y)
else if ((x * y) <= (-2d-28)) then
tmp = (-1.0d0) / (a / (z * t))
else if ((x * y) <= (-5d-65)) then
tmp = (x * y) / a
else if ((x * y) <= 4d-8) then
tmp = (z * t) / -a
else
tmp = y / (a / x)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -2e+34) {
tmp = x / (a / y);
} else if ((x * y) <= -2e-28) {
tmp = -1.0 / (a / (z * t));
} else if ((x * y) <= -5e-65) {
tmp = (x * y) / a;
} else if ((x * y) <= 4e-8) {
tmp = (z * t) / -a;
} else {
tmp = y / (a / x);
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): tmp = 0 if (x * y) <= -2e+34: tmp = x / (a / y) elif (x * y) <= -2e-28: tmp = -1.0 / (a / (z * t)) elif (x * y) <= -5e-65: tmp = (x * y) / a elif (x * y) <= 4e-8: tmp = (z * t) / -a else: tmp = y / (a / x) return tmp
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) tmp = 0.0 if (Float64(x * y) <= -2e+34) tmp = Float64(x / Float64(a / y)); elseif (Float64(x * y) <= -2e-28) tmp = Float64(-1.0 / Float64(a / Float64(z * t))); elseif (Float64(x * y) <= -5e-65) tmp = Float64(Float64(x * y) / a); elseif (Float64(x * y) <= 4e-8) tmp = Float64(Float64(z * t) / Float64(-a)); else tmp = Float64(y / Float64(a / x)); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if ((x * y) <= -2e+34)
tmp = x / (a / y);
elseif ((x * y) <= -2e-28)
tmp = -1.0 / (a / (z * t));
elseif ((x * y) <= -5e-65)
tmp = (x * y) / a;
elseif ((x * y) <= 4e-8)
tmp = (z * t) / -a;
else
tmp = y / (a / x);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x * y), $MachinePrecision], -2e+34], N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -2e-28], N[(-1.0 / N[(a / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -5e-65], N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 4e-8], N[(N[(z * t), $MachinePrecision] / (-a)), $MachinePrecision], N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+34}:\\
\;\;\;\;\frac{x}{\frac{a}{y}}\\
\mathbf{elif}\;x \cdot y \leq -2 \cdot 10^{-28}:\\
\;\;\;\;\frac{-1}{\frac{a}{z \cdot t}}\\
\mathbf{elif}\;x \cdot y \leq -5 \cdot 10^{-65}:\\
\;\;\;\;\frac{x \cdot y}{a}\\
\mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{-8}:\\
\;\;\;\;\frac{z \cdot t}{-a}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{a}{x}}\\
\end{array}
\end{array}
if (*.f64 x y) < -1.99999999999999989e34Initial program 87.5%
Taylor expanded in x around inf 77.0%
associate-*r/81.3%
Simplified81.3%
clear-num81.3%
un-div-inv82.7%
Applied egg-rr82.7%
if -1.99999999999999989e34 < (*.f64 x y) < -1.99999999999999994e-28Initial program 99.7%
Taylor expanded in x around 0 68.4%
mul-1-neg68.4%
associate-/l*68.4%
distribute-rgt-neg-in68.4%
distribute-neg-frac268.4%
Simplified68.4%
distribute-frac-neg268.4%
distribute-rgt-neg-out68.4%
distribute-lft-neg-out68.4%
associate-/l*68.4%
clear-num68.5%
frac-2neg68.5%
metadata-eval68.5%
frac-2neg68.5%
add-sqr-sqrt29.5%
sqrt-unprod25.6%
sqr-neg25.6%
sqrt-unprod1.4%
add-sqr-sqrt2.0%
distribute-frac-neg22.0%
distribute-lft-neg-out2.0%
remove-double-neg2.0%
distribute-lft-neg-out2.0%
*-commutative2.0%
associate-/r*2.0%
add-sqr-sqrt0.7%
sqrt-unprod41.0%
sqr-neg41.0%
sqrt-unprod50.1%
add-sqr-sqrt68.4%
Applied egg-rr68.4%
Taylor expanded in a around 0 68.5%
if -1.99999999999999994e-28 < (*.f64 x y) < -4.99999999999999983e-65Initial program 99.8%
Taylor expanded in x around inf 88.4%
if -4.99999999999999983e-65 < (*.f64 x y) < 4.0000000000000001e-8Initial program 97.9%
Taylor expanded in x around 0 80.9%
associate-*r*80.9%
mul-1-neg80.9%
Simplified80.9%
if 4.0000000000000001e-8 < (*.f64 x y) Initial program 86.9%
Taylor expanded in x around inf 79.8%
associate-*r/80.8%
Simplified80.8%
clear-num79.6%
un-div-inv79.9%
Applied egg-rr79.9%
associate-/r/86.9%
Applied egg-rr86.9%
*-commutative86.9%
clear-num86.7%
un-div-inv87.4%
Applied egg-rr87.4%
Final simplification82.4%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* z t) (- a))))
(if (<= (* x y) -2e+34)
(/ x (/ a y))
(if (<= (* x y) -2e-28)
t_1
(if (<= (* x y) -5e-65)
(/ (* x y) a)
(if (<= (* x y) 4e-8) t_1 (/ y (/ a x))))))))assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double t_1 = (z * t) / -a;
double tmp;
if ((x * y) <= -2e+34) {
tmp = x / (a / y);
} else if ((x * y) <= -2e-28) {
tmp = t_1;
} else if ((x * y) <= -5e-65) {
tmp = (x * y) / a;
} else if ((x * y) <= 4e-8) {
tmp = t_1;
} else {
tmp = y / (a / x);
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (z * t) / -a
if ((x * y) <= (-2d+34)) then
tmp = x / (a / y)
else if ((x * y) <= (-2d-28)) then
tmp = t_1
else if ((x * y) <= (-5d-65)) then
tmp = (x * y) / a
else if ((x * y) <= 4d-8) then
tmp = t_1
else
tmp = y / (a / x)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (z * t) / -a;
double tmp;
if ((x * y) <= -2e+34) {
tmp = x / (a / y);
} else if ((x * y) <= -2e-28) {
tmp = t_1;
} else if ((x * y) <= -5e-65) {
tmp = (x * y) / a;
} else if ((x * y) <= 4e-8) {
tmp = t_1;
} else {
tmp = y / (a / x);
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): t_1 = (z * t) / -a tmp = 0 if (x * y) <= -2e+34: tmp = x / (a / y) elif (x * y) <= -2e-28: tmp = t_1 elif (x * y) <= -5e-65: tmp = (x * y) / a elif (x * y) <= 4e-8: tmp = t_1 else: tmp = y / (a / x) return tmp
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) t_1 = Float64(Float64(z * t) / Float64(-a)) tmp = 0.0 if (Float64(x * y) <= -2e+34) tmp = Float64(x / Float64(a / y)); elseif (Float64(x * y) <= -2e-28) tmp = t_1; elseif (Float64(x * y) <= -5e-65) tmp = Float64(Float64(x * y) / a); elseif (Float64(x * y) <= 4e-8) tmp = t_1; else tmp = Float64(y / Float64(a / x)); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
t_1 = (z * t) / -a;
tmp = 0.0;
if ((x * y) <= -2e+34)
tmp = x / (a / y);
elseif ((x * y) <= -2e-28)
tmp = t_1;
elseif ((x * y) <= -5e-65)
tmp = (x * y) / a;
elseif ((x * y) <= 4e-8)
tmp = t_1;
else
tmp = y / (a / x);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] / (-a)), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -2e+34], N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -2e-28], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -5e-65], N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 4e-8], t$95$1, N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
t_1 := \frac{z \cdot t}{-a}\\
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+34}:\\
\;\;\;\;\frac{x}{\frac{a}{y}}\\
\mathbf{elif}\;x \cdot y \leq -2 \cdot 10^{-28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq -5 \cdot 10^{-65}:\\
\;\;\;\;\frac{x \cdot y}{a}\\
\mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{-8}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{a}{x}}\\
\end{array}
\end{array}
if (*.f64 x y) < -1.99999999999999989e34Initial program 87.5%
Taylor expanded in x around inf 77.0%
associate-*r/81.3%
Simplified81.3%
clear-num81.3%
un-div-inv82.7%
Applied egg-rr82.7%
if -1.99999999999999989e34 < (*.f64 x y) < -1.99999999999999994e-28 or -4.99999999999999983e-65 < (*.f64 x y) < 4.0000000000000001e-8Initial program 98.1%
Taylor expanded in x around 0 79.2%
associate-*r*79.2%
mul-1-neg79.2%
Simplified79.2%
if -1.99999999999999994e-28 < (*.f64 x y) < -4.99999999999999983e-65Initial program 99.8%
Taylor expanded in x around inf 88.4%
if 4.0000000000000001e-8 < (*.f64 x y) Initial program 86.9%
Taylor expanded in x around inf 79.8%
associate-*r/80.8%
Simplified80.8%
clear-num79.6%
un-div-inv79.9%
Applied egg-rr79.9%
associate-/r/86.9%
Applied egg-rr86.9%
*-commutative86.9%
clear-num86.7%
un-div-inv87.4%
Applied egg-rr87.4%
Final simplification82.4%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
:precision binary64
(if (<= (* x y) -2e+17)
(/ x (/ a y))
(if (<= (* x y) -0.4)
(* (- z) (/ t a))
(if (<= (* x y) -5e-65)
(/ (* x y) a)
(if (<= (* x y) 4e-8) (* t (/ z (- a))) (/ y (/ a x)))))))assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -2e+17) {
tmp = x / (a / y);
} else if ((x * y) <= -0.4) {
tmp = -z * (t / a);
} else if ((x * y) <= -5e-65) {
tmp = (x * y) / a;
} else if ((x * y) <= 4e-8) {
tmp = t * (z / -a);
} else {
tmp = y / (a / x);
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x * y) <= (-2d+17)) then
tmp = x / (a / y)
else if ((x * y) <= (-0.4d0)) then
tmp = -z * (t / a)
else if ((x * y) <= (-5d-65)) then
tmp = (x * y) / a
else if ((x * y) <= 4d-8) then
tmp = t * (z / -a)
else
tmp = y / (a / x)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -2e+17) {
tmp = x / (a / y);
} else if ((x * y) <= -0.4) {
tmp = -z * (t / a);
} else if ((x * y) <= -5e-65) {
tmp = (x * y) / a;
} else if ((x * y) <= 4e-8) {
tmp = t * (z / -a);
} else {
tmp = y / (a / x);
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): tmp = 0 if (x * y) <= -2e+17: tmp = x / (a / y) elif (x * y) <= -0.4: tmp = -z * (t / a) elif (x * y) <= -5e-65: tmp = (x * y) / a elif (x * y) <= 4e-8: tmp = t * (z / -a) else: tmp = y / (a / x) return tmp
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) tmp = 0.0 if (Float64(x * y) <= -2e+17) tmp = Float64(x / Float64(a / y)); elseif (Float64(x * y) <= -0.4) tmp = Float64(Float64(-z) * Float64(t / a)); elseif (Float64(x * y) <= -5e-65) tmp = Float64(Float64(x * y) / a); elseif (Float64(x * y) <= 4e-8) tmp = Float64(t * Float64(z / Float64(-a))); else tmp = Float64(y / Float64(a / x)); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if ((x * y) <= -2e+17)
tmp = x / (a / y);
elseif ((x * y) <= -0.4)
tmp = -z * (t / a);
elseif ((x * y) <= -5e-65)
tmp = (x * y) / a;
elseif ((x * y) <= 4e-8)
tmp = t * (z / -a);
else
tmp = y / (a / x);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x * y), $MachinePrecision], -2e+17], N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -0.4], N[((-z) * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -5e-65], N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 4e-8], N[(t * N[(z / (-a)), $MachinePrecision]), $MachinePrecision], N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+17}:\\
\;\;\;\;\frac{x}{\frac{a}{y}}\\
\mathbf{elif}\;x \cdot y \leq -0.4:\\
\;\;\;\;\left(-z\right) \cdot \frac{t}{a}\\
\mathbf{elif}\;x \cdot y \leq -5 \cdot 10^{-65}:\\
\;\;\;\;\frac{x \cdot y}{a}\\
\mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{-8}:\\
\;\;\;\;t \cdot \frac{z}{-a}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{a}{x}}\\
\end{array}
\end{array}
if (*.f64 x y) < -2e17Initial program 88.2%
Taylor expanded in x around inf 75.4%
associate-*r/79.5%
Simplified79.5%
clear-num79.4%
un-div-inv80.8%
Applied egg-rr80.8%
if -2e17 < (*.f64 x y) < -0.40000000000000002Initial program 99.6%
Taylor expanded in x around 0 87.2%
*-commutative87.2%
associate-*r/75.6%
neg-mul-175.6%
distribute-rgt-neg-in75.6%
distribute-frac-neg75.6%
Simplified75.6%
if -0.40000000000000002 < (*.f64 x y) < -4.99999999999999983e-65Initial program 99.9%
Taylor expanded in x around inf 69.6%
if -4.99999999999999983e-65 < (*.f64 x y) < 4.0000000000000001e-8Initial program 97.9%
Taylor expanded in x around 0 80.9%
mul-1-neg80.9%
associate-/l*74.6%
distribute-rgt-neg-in74.6%
distribute-neg-frac274.6%
Simplified74.6%
if 4.0000000000000001e-8 < (*.f64 x y) Initial program 86.9%
Taylor expanded in x around inf 79.8%
associate-*r/80.8%
Simplified80.8%
clear-num79.6%
un-div-inv79.9%
Applied egg-rr79.9%
associate-/r/86.9%
Applied egg-rr86.9%
*-commutative86.9%
clear-num86.7%
un-div-inv87.4%
Applied egg-rr87.4%
Final simplification79.3%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ z (- a)))))
(if (<= (* x y) -2e+34)
(/ x (/ a y))
(if (<= (* x y) -2e-28)
t_1
(if (<= (* x y) -5e-65)
(/ (* x y) a)
(if (<= (* x y) 4e-8) t_1 (/ y (/ a x))))))))assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (z / -a);
double tmp;
if ((x * y) <= -2e+34) {
tmp = x / (a / y);
} else if ((x * y) <= -2e-28) {
tmp = t_1;
} else if ((x * y) <= -5e-65) {
tmp = (x * y) / a;
} else if ((x * y) <= 4e-8) {
tmp = t_1;
} else {
tmp = y / (a / x);
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t * (z / -a)
if ((x * y) <= (-2d+34)) then
tmp = x / (a / y)
else if ((x * y) <= (-2d-28)) then
tmp = t_1
else if ((x * y) <= (-5d-65)) then
tmp = (x * y) / a
else if ((x * y) <= 4d-8) then
tmp = t_1
else
tmp = y / (a / x)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * (z / -a);
double tmp;
if ((x * y) <= -2e+34) {
tmp = x / (a / y);
} else if ((x * y) <= -2e-28) {
tmp = t_1;
} else if ((x * y) <= -5e-65) {
tmp = (x * y) / a;
} else if ((x * y) <= 4e-8) {
tmp = t_1;
} else {
tmp = y / (a / x);
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): t_1 = t * (z / -a) tmp = 0 if (x * y) <= -2e+34: tmp = x / (a / y) elif (x * y) <= -2e-28: tmp = t_1 elif (x * y) <= -5e-65: tmp = (x * y) / a elif (x * y) <= 4e-8: tmp = t_1 else: tmp = y / (a / x) return tmp
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) t_1 = Float64(t * Float64(z / Float64(-a))) tmp = 0.0 if (Float64(x * y) <= -2e+34) tmp = Float64(x / Float64(a / y)); elseif (Float64(x * y) <= -2e-28) tmp = t_1; elseif (Float64(x * y) <= -5e-65) tmp = Float64(Float64(x * y) / a); elseif (Float64(x * y) <= 4e-8) tmp = t_1; else tmp = Float64(y / Float64(a / x)); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
t_1 = t * (z / -a);
tmp = 0.0;
if ((x * y) <= -2e+34)
tmp = x / (a / y);
elseif ((x * y) <= -2e-28)
tmp = t_1;
elseif ((x * y) <= -5e-65)
tmp = (x * y) / a;
elseif ((x * y) <= 4e-8)
tmp = t_1;
else
tmp = y / (a / x);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(z / (-a)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -2e+34], N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -2e-28], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -5e-65], N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 4e-8], t$95$1, N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
t_1 := t \cdot \frac{z}{-a}\\
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+34}:\\
\;\;\;\;\frac{x}{\frac{a}{y}}\\
\mathbf{elif}\;x \cdot y \leq -2 \cdot 10^{-28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq -5 \cdot 10^{-65}:\\
\;\;\;\;\frac{x \cdot y}{a}\\
\mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{-8}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{a}{x}}\\
\end{array}
\end{array}
if (*.f64 x y) < -1.99999999999999989e34Initial program 87.5%
Taylor expanded in x around inf 77.0%
associate-*r/81.3%
Simplified81.3%
clear-num81.3%
un-div-inv82.7%
Applied egg-rr82.7%
if -1.99999999999999989e34 < (*.f64 x y) < -1.99999999999999994e-28 or -4.99999999999999983e-65 < (*.f64 x y) < 4.0000000000000001e-8Initial program 98.1%
Taylor expanded in x around 0 79.2%
mul-1-neg79.2%
associate-/l*73.7%
distribute-rgt-neg-in73.7%
distribute-neg-frac273.7%
Simplified73.7%
if -1.99999999999999994e-28 < (*.f64 x y) < -4.99999999999999983e-65Initial program 99.8%
Taylor expanded in x around inf 88.4%
if 4.0000000000000001e-8 < (*.f64 x y) Initial program 86.9%
Taylor expanded in x around inf 79.8%
associate-*r/80.8%
Simplified80.8%
clear-num79.6%
un-div-inv79.9%
Applied egg-rr79.9%
associate-/r/86.9%
Applied egg-rr86.9%
*-commutative86.9%
clear-num86.7%
un-div-inv87.4%
Applied egg-rr87.4%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (or (<= (* x y) -5e+295) (not (<= (* x y) 1e+238))) (* x (/ y a)) (/ (- (* x y) (* z t)) a)))
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((x * y) <= -5e+295) || !((x * y) <= 1e+238)) {
tmp = x * (y / a);
} else {
tmp = ((x * y) - (z * t)) / a;
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (((x * y) <= (-5d+295)) .or. (.not. ((x * y) <= 1d+238))) then
tmp = x * (y / a)
else
tmp = ((x * y) - (z * t)) / a
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((x * y) <= -5e+295) || !((x * y) <= 1e+238)) {
tmp = x * (y / a);
} else {
tmp = ((x * y) - (z * t)) / a;
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): tmp = 0 if ((x * y) <= -5e+295) or not ((x * y) <= 1e+238): tmp = x * (y / a) else: tmp = ((x * y) - (z * t)) / a return tmp
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) tmp = 0.0 if ((Float64(x * y) <= -5e+295) || !(Float64(x * y) <= 1e+238)) tmp = Float64(x * Float64(y / a)); else tmp = Float64(Float64(Float64(x * y) - Float64(z * t)) / a); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (((x * y) <= -5e+295) || ~(((x * y) <= 1e+238)))
tmp = x * (y / a);
else
tmp = ((x * y) - (z * t)) / a;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -5e+295], N[Not[LessEqual[N[(x * y), $MachinePrecision], 1e+238]], $MachinePrecision]], N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+295} \lor \neg \left(x \cdot y \leq 10^{+238}\right):\\
\;\;\;\;x \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y - z \cdot t}{a}\\
\end{array}
\end{array}
if (*.f64 x y) < -4.99999999999999991e295 or 1e238 < (*.f64 x y) Initial program 71.8%
Taylor expanded in x around inf 71.9%
associate-*r/94.3%
Simplified94.3%
if -4.99999999999999991e295 < (*.f64 x y) < 1e238Initial program 98.3%
Final simplification97.5%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= y 4e-200) (/ y (/ a x)) (/ x (/ a y))))
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 4e-200) {
tmp = y / (a / x);
} else {
tmp = x / (a / y);
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= 4d-200) then
tmp = y / (a / x)
else
tmp = x / (a / y)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 4e-200) {
tmp = y / (a / x);
} else {
tmp = x / (a / y);
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): tmp = 0 if y <= 4e-200: tmp = y / (a / x) else: tmp = x / (a / y) return tmp
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) tmp = 0.0 if (y <= 4e-200) tmp = Float64(y / Float64(a / x)); else tmp = Float64(x / Float64(a / y)); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (y <= 4e-200)
tmp = y / (a / x);
else
tmp = x / (a / y);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[LessEqual[y, 4e-200], N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision], N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4 \cdot 10^{-200}:\\
\;\;\;\;\frac{y}{\frac{a}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{a}{y}}\\
\end{array}
\end{array}
if y < 3.9999999999999999e-200Initial program 92.7%
Taylor expanded in x around inf 51.1%
associate-*r/51.9%
Simplified51.9%
clear-num51.6%
un-div-inv51.7%
Applied egg-rr51.7%
associate-/r/54.9%
Applied egg-rr54.9%
*-commutative54.9%
clear-num54.8%
un-div-inv55.1%
Applied egg-rr55.1%
if 3.9999999999999999e-200 < y Initial program 92.7%
Taylor expanded in x around inf 60.2%
associate-*r/63.0%
Simplified63.0%
clear-num62.6%
un-div-inv63.4%
Applied egg-rr63.4%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= y 6.6e-198) (* y (/ x a)) (/ x (/ a y))))
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 6.6e-198) {
tmp = y * (x / a);
} else {
tmp = x / (a / y);
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= 6.6d-198) then
tmp = y * (x / a)
else
tmp = x / (a / y)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 6.6e-198) {
tmp = y * (x / a);
} else {
tmp = x / (a / y);
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): tmp = 0 if y <= 6.6e-198: tmp = y * (x / a) else: tmp = x / (a / y) return tmp
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) tmp = 0.0 if (y <= 6.6e-198) tmp = Float64(y * Float64(x / a)); else tmp = Float64(x / Float64(a / y)); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (y <= 6.6e-198)
tmp = y * (x / a);
else
tmp = x / (a / y);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[LessEqual[y, 6.6e-198], N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision], N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 6.6 \cdot 10^{-198}:\\
\;\;\;\;y \cdot \frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{a}{y}}\\
\end{array}
\end{array}
if y < 6.6000000000000001e-198Initial program 92.7%
Taylor expanded in x around inf 51.1%
associate-*r/51.9%
Simplified51.9%
clear-num51.6%
un-div-inv51.7%
Applied egg-rr51.7%
associate-/r/54.9%
Applied egg-rr54.9%
if 6.6000000000000001e-198 < y Initial program 92.7%
Taylor expanded in x around inf 60.2%
associate-*r/63.0%
Simplified63.0%
clear-num62.6%
un-div-inv63.4%
Applied egg-rr63.4%
Final simplification58.5%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= y 2.2e-199) (* y (/ x a)) (* x (/ y a))))
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 2.2e-199) {
tmp = y * (x / a);
} else {
tmp = x * (y / a);
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= 2.2d-199) then
tmp = y * (x / a)
else
tmp = x * (y / a)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 2.2e-199) {
tmp = y * (x / a);
} else {
tmp = x * (y / a);
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): tmp = 0 if y <= 2.2e-199: tmp = y * (x / a) else: tmp = x * (y / a) return tmp
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) tmp = 0.0 if (y <= 2.2e-199) tmp = Float64(y * Float64(x / a)); else tmp = Float64(x * Float64(y / a)); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (y <= 2.2e-199)
tmp = y * (x / a);
else
tmp = x * (y / a);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[LessEqual[y, 2.2e-199], N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision], N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.2 \cdot 10^{-199}:\\
\;\;\;\;y \cdot \frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{a}\\
\end{array}
\end{array}
if y < 2.1999999999999998e-199Initial program 92.7%
Taylor expanded in x around inf 51.1%
associate-*r/51.9%
Simplified51.9%
clear-num51.6%
un-div-inv51.7%
Applied egg-rr51.7%
associate-/r/54.9%
Applied egg-rr54.9%
if 2.1999999999999998e-199 < y Initial program 92.7%
Taylor expanded in x around inf 60.2%
associate-*r/63.0%
Simplified63.0%
Final simplification58.4%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (* x (/ y a)))
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
return x * (y / a);
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x * (y / a)
end function
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
return x * (y / a);
}
[x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): return x * (y / a)
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) return Float64(x * Float64(y / a)) end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp = code(x, y, z, t, a)
tmp = x * (y / a);
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
x \cdot \frac{y}{a}
\end{array}
Initial program 92.7%
Taylor expanded in x around inf 55.0%
associate-*r/56.6%
Simplified56.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (* (/ y a) x) (* (/ t a) z))))
(if (< z -2.468684968699548e+170)
t_1
(if (< z 6.309831121978371e-71) (/ (- (* x y) (* z t)) a) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((y / a) * x) - ((t / a) * z);
double tmp;
if (z < -2.468684968699548e+170) {
tmp = t_1;
} else if (z < 6.309831121978371e-71) {
tmp = ((x * y) - (z * t)) / a;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = ((y / a) * x) - ((t / a) * z)
if (z < (-2.468684968699548d+170)) then
tmp = t_1
else if (z < 6.309831121978371d-71) then
tmp = ((x * y) - (z * t)) / a
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = ((y / a) * x) - ((t / a) * z);
double tmp;
if (z < -2.468684968699548e+170) {
tmp = t_1;
} else if (z < 6.309831121978371e-71) {
tmp = ((x * y) - (z * t)) / a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((y / a) * x) - ((t / a) * z) tmp = 0 if z < -2.468684968699548e+170: tmp = t_1 elif z < 6.309831121978371e-71: tmp = ((x * y) - (z * t)) / a else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(y / a) * x) - Float64(Float64(t / a) * z)) tmp = 0.0 if (z < -2.468684968699548e+170) tmp = t_1; elseif (z < 6.309831121978371e-71) tmp = Float64(Float64(Float64(x * y) - Float64(z * t)) / a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((y / a) * x) - ((t / a) * z); tmp = 0.0; if (z < -2.468684968699548e+170) tmp = t_1; elseif (z < 6.309831121978371e-71) tmp = ((x * y) - (z * t)) / a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y / a), $MachinePrecision] * x), $MachinePrecision] - N[(N[(t / a), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -2.468684968699548e+170], t$95$1, If[Less[z, 6.309831121978371e-71], N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{a} \cdot x - \frac{t}{a} \cdot z\\
\mathbf{if}\;z < -2.468684968699548 \cdot 10^{+170}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 6.309831121978371 \cdot 10^{-71}:\\
\;\;\;\;\frac{x \cdot y - z \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024100
(FPCore (x y z t a)
:name "Data.Colour.Matrix:inverse from colour-2.3.3, B"
:precision binary64
:alt
(if (< z -2.468684968699548e+170) (- (* (/ y a) x) (* (/ t a) z)) (if (< z 6.309831121978371e-71) (/ (- (* x y) (* z t)) a) (- (* (/ y a) x) (* (/ t a) z))))
(/ (- (* x y) (* z t)) a))