
(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 13 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.
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 (<= t_1 (- INFINITY))
(* x (- (/ y a) (* t (/ (/ z x) a))))
(if (<= t_1 5e+274)
(/ (fma x y (* t (- z))) a)
(* t (/ (- (* y (/ x t)) z) a))))))assert(x < y && y < z && z < t && t < 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 <= -((double) INFINITY)) {
tmp = x * ((y / a) - (t * ((z / x) / a)));
} else if (t_1 <= 5e+274) {
tmp = fma(x, y, (t * -z)) / a;
} else {
tmp = t * (((y * (x / t)) - z) / a);
}
return tmp;
}
x, y, z, t, a = sort([x, y, z, t, a]) 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 <= Float64(-Inf)) tmp = Float64(x * Float64(Float64(y / a) - Float64(t * Float64(Float64(z / x) / a)))); elseif (t_1 <= 5e+274) tmp = Float64(fma(x, y, Float64(t * Float64(-z))) / a); else tmp = Float64(t * Float64(Float64(Float64(y * Float64(x / t)) - z) / a)); end return tmp end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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[LessEqual[t$95$1, (-Infinity)], N[(x * N[(N[(y / a), $MachinePrecision] - N[(t * N[(N[(z / x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+274], N[(N[(x * y + N[(t * (-z)), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(t * N[(N[(N[(y * N[(x / t), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[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 -\infty:\\
\;\;\;\;x \cdot \left(\frac{y}{a} - t \cdot \frac{\frac{z}{x}}{a}\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+274}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, t \cdot \left(-z\right)\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y \cdot \frac{x}{t} - z}{a}\\
\end{array}
\end{array}
if (-.f64 (*.f64 x y) (*.f64 z t)) < -inf.0Initial program 72.3%
Taylor expanded in x around inf 85.9%
+-commutative85.9%
mul-1-neg85.9%
unsub-neg85.9%
associate-/l*89.7%
*-commutative89.7%
associate-/r*93.3%
Simplified93.3%
if -inf.0 < (-.f64 (*.f64 x y) (*.f64 z t)) < 4.9999999999999998e274Initial program 98.8%
div-sub97.2%
*-commutative97.2%
div-sub98.8%
*-commutative98.8%
fma-neg98.8%
distribute-rgt-neg-out98.8%
Simplified98.8%
if 4.9999999999999998e274 < (-.f64 (*.f64 x y) (*.f64 z t)) Initial program 58.8%
Taylor expanded in t around inf 69.1%
+-commutative69.1%
mul-1-neg69.1%
unsub-neg69.1%
times-frac77.7%
Simplified77.7%
Taylor expanded in x around 0 69.1%
associate-/l/69.6%
div-sub75.4%
*-commutative75.4%
associate-/l*89.4%
Simplified89.4%
Final simplification96.9%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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 a))))
(if (<= (* x y) -4e-14)
(/ x (/ a y))
(if (<= (* x y) 4e-155)
(/ (* t (- z)) a)
(if (<= (* x y) 2e-71)
t_1
(if (<= (* x y) 2e-36)
(* z (/ t (- a)))
(if (<= (* x y) 4e+111) (/ (* x y) a) t_1)))))))assert(x < y && y < z && z < t && t < 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 / a);
double tmp;
if ((x * y) <= -4e-14) {
tmp = x / (a / y);
} else if ((x * y) <= 4e-155) {
tmp = (t * -z) / a;
} else if ((x * y) <= 2e-71) {
tmp = t_1;
} else if ((x * y) <= 2e-36) {
tmp = z * (t / -a);
} else if ((x * y) <= 4e+111) {
tmp = (x * y) / a;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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 / a)
if ((x * y) <= (-4d-14)) then
tmp = x / (a / y)
else if ((x * y) <= 4d-155) then
tmp = (t * -z) / a
else if ((x * y) <= 2d-71) then
tmp = t_1
else if ((x * y) <= 2d-36) then
tmp = z * (t / -a)
else if ((x * y) <= 4d+111) then
tmp = (x * y) / a
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
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 / a);
double tmp;
if ((x * y) <= -4e-14) {
tmp = x / (a / y);
} else if ((x * y) <= 4e-155) {
tmp = (t * -z) / a;
} else if ((x * y) <= 2e-71) {
tmp = t_1;
} else if ((x * y) <= 2e-36) {
tmp = z * (t / -a);
} else if ((x * y) <= 4e+111) {
tmp = (x * y) / a;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) [x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): t_1 = x * (y / a) tmp = 0 if (x * y) <= -4e-14: tmp = x / (a / y) elif (x * y) <= 4e-155: tmp = (t * -z) / a elif (x * y) <= 2e-71: tmp = t_1 elif (x * y) <= 2e-36: tmp = z * (t / -a) elif (x * y) <= 4e+111: tmp = (x * y) / a else: tmp = t_1 return tmp
x, y, z, t, a = sort([x, y, z, t, a]) x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) t_1 = Float64(x * Float64(y / a)) tmp = 0.0 if (Float64(x * y) <= -4e-14) tmp = Float64(x / Float64(a / y)); elseif (Float64(x * y) <= 4e-155) tmp = Float64(Float64(t * Float64(-z)) / a); elseif (Float64(x * y) <= 2e-71) tmp = t_1; elseif (Float64(x * y) <= 2e-36) tmp = Float64(z * Float64(t / Float64(-a))); elseif (Float64(x * y) <= 4e+111) tmp = Float64(Float64(x * y) / a); else tmp = t_1; end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
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 / a);
tmp = 0.0;
if ((x * y) <= -4e-14)
tmp = x / (a / y);
elseif ((x * y) <= 4e-155)
tmp = (t * -z) / a;
elseif ((x * y) <= 2e-71)
tmp = t_1;
elseif ((x * y) <= 2e-36)
tmp = z * (t / -a);
elseif ((x * y) <= 4e+111)
tmp = (x * y) / a;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -4e-14], N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 4e-155], N[(N[(t * (-z)), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2e-71], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 2e-36], N[(z * N[(t / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 4e+111], N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{a}\\
\mathbf{if}\;x \cdot y \leq -4 \cdot 10^{-14}:\\
\;\;\;\;\frac{x}{\frac{a}{y}}\\
\mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{-155}:\\
\;\;\;\;\frac{t \cdot \left(-z\right)}{a}\\
\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-71}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-36}:\\
\;\;\;\;z \cdot \frac{t}{-a}\\
\mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{+111}:\\
\;\;\;\;\frac{x \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 x y) < -4e-14Initial program 84.6%
Taylor expanded in x around inf 75.4%
associate-*r/76.9%
Simplified76.9%
clear-num76.8%
un-div-inv77.5%
Applied egg-rr77.5%
if -4e-14 < (*.f64 x y) < 4.00000000000000006e-155Initial program 95.3%
Taylor expanded in x around 0 81.9%
associate-*r*81.9%
mul-1-neg81.9%
Simplified81.9%
if 4.00000000000000006e-155 < (*.f64 x y) < 1.9999999999999998e-71 or 3.99999999999999983e111 < (*.f64 x y) Initial program 85.6%
Taylor expanded in x around inf 78.7%
associate-*r/85.7%
Simplified85.7%
if 1.9999999999999998e-71 < (*.f64 x y) < 1.9999999999999999e-36Initial program 89.3%
Taylor expanded in x around 0 67.2%
*-commutative67.2%
associate-*r/65.9%
neg-mul-165.9%
distribute-rgt-neg-in65.9%
distribute-frac-neg65.9%
Simplified65.9%
if 1.9999999999999999e-36 < (*.f64 x y) < 3.99999999999999983e111Initial program 96.2%
Taylor expanded in x around inf 66.0%
Final simplification79.4%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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 a))))
(if (<= (* x y) -4e-14)
(/ x (/ a y))
(if (<= (* x y) 4e-155)
(/ (- t) (/ a z))
(if (<= (* x y) 2e-71)
t_1
(if (<= (* x y) 2e-36)
(* z (/ t (- a)))
(if (<= (* x y) 4e+111) (/ (* x y) a) t_1)))))))assert(x < y && y < z && z < t && t < 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 / a);
double tmp;
if ((x * y) <= -4e-14) {
tmp = x / (a / y);
} else if ((x * y) <= 4e-155) {
tmp = -t / (a / z);
} else if ((x * y) <= 2e-71) {
tmp = t_1;
} else if ((x * y) <= 2e-36) {
tmp = z * (t / -a);
} else if ((x * y) <= 4e+111) {
tmp = (x * y) / a;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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 / a)
if ((x * y) <= (-4d-14)) then
tmp = x / (a / y)
else if ((x * y) <= 4d-155) then
tmp = -t / (a / z)
else if ((x * y) <= 2d-71) then
tmp = t_1
else if ((x * y) <= 2d-36) then
tmp = z * (t / -a)
else if ((x * y) <= 4d+111) then
tmp = (x * y) / a
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
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 / a);
double tmp;
if ((x * y) <= -4e-14) {
tmp = x / (a / y);
} else if ((x * y) <= 4e-155) {
tmp = -t / (a / z);
} else if ((x * y) <= 2e-71) {
tmp = t_1;
} else if ((x * y) <= 2e-36) {
tmp = z * (t / -a);
} else if ((x * y) <= 4e+111) {
tmp = (x * y) / a;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) [x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): t_1 = x * (y / a) tmp = 0 if (x * y) <= -4e-14: tmp = x / (a / y) elif (x * y) <= 4e-155: tmp = -t / (a / z) elif (x * y) <= 2e-71: tmp = t_1 elif (x * y) <= 2e-36: tmp = z * (t / -a) elif (x * y) <= 4e+111: tmp = (x * y) / a else: tmp = t_1 return tmp
x, y, z, t, a = sort([x, y, z, t, a]) x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) t_1 = Float64(x * Float64(y / a)) tmp = 0.0 if (Float64(x * y) <= -4e-14) tmp = Float64(x / Float64(a / y)); elseif (Float64(x * y) <= 4e-155) tmp = Float64(Float64(-t) / Float64(a / z)); elseif (Float64(x * y) <= 2e-71) tmp = t_1; elseif (Float64(x * y) <= 2e-36) tmp = Float64(z * Float64(t / Float64(-a))); elseif (Float64(x * y) <= 4e+111) tmp = Float64(Float64(x * y) / a); else tmp = t_1; end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
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 / a);
tmp = 0.0;
if ((x * y) <= -4e-14)
tmp = x / (a / y);
elseif ((x * y) <= 4e-155)
tmp = -t / (a / z);
elseif ((x * y) <= 2e-71)
tmp = t_1;
elseif ((x * y) <= 2e-36)
tmp = z * (t / -a);
elseif ((x * y) <= 4e+111)
tmp = (x * y) / a;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -4e-14], N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 4e-155], N[((-t) / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2e-71], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 2e-36], N[(z * N[(t / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 4e+111], N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{a}\\
\mathbf{if}\;x \cdot y \leq -4 \cdot 10^{-14}:\\
\;\;\;\;\frac{x}{\frac{a}{y}}\\
\mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{-155}:\\
\;\;\;\;\frac{-t}{\frac{a}{z}}\\
\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-71}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-36}:\\
\;\;\;\;z \cdot \frac{t}{-a}\\
\mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{+111}:\\
\;\;\;\;\frac{x \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 x y) < -4e-14Initial program 84.6%
Taylor expanded in x around inf 75.4%
associate-*r/76.9%
Simplified76.9%
clear-num76.8%
un-div-inv77.5%
Applied egg-rr77.5%
if -4e-14 < (*.f64 x y) < 4.00000000000000006e-155Initial program 95.3%
Taylor expanded in x around 0 81.9%
associate-*r*81.9%
mul-1-neg81.9%
Simplified81.9%
add-sqr-sqrt40.3%
sqrt-unprod34.8%
sqr-neg34.8%
sqrt-unprod4.4%
add-sqr-sqrt11.1%
associate-*l/11.2%
frac-2neg11.2%
Applied egg-rr11.2%
add-sqr-sqrt3.3%
sqrt-unprod36.2%
sqr-neg36.2%
sqrt-unprod44.0%
add-sqr-sqrt78.0%
distribute-rgt-neg-out78.0%
associate-/r/76.3%
distribute-neg-frac76.3%
Applied egg-rr76.3%
if 4.00000000000000006e-155 < (*.f64 x y) < 1.9999999999999998e-71 or 3.99999999999999983e111 < (*.f64 x y) Initial program 85.6%
Taylor expanded in x around inf 78.7%
associate-*r/85.7%
Simplified85.7%
if 1.9999999999999998e-71 < (*.f64 x y) < 1.9999999999999999e-36Initial program 89.3%
Taylor expanded in x around 0 67.2%
*-commutative67.2%
associate-*r/65.9%
neg-mul-165.9%
distribute-rgt-neg-in65.9%
distribute-frac-neg65.9%
Simplified65.9%
if 1.9999999999999999e-36 < (*.f64 x y) < 3.99999999999999983e111Initial program 96.2%
Taylor expanded in x around inf 66.0%
Final simplification77.1%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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 a))))
(if (<= (* x y) -4e-14)
(/ x (/ a y))
(if (<= (* x y) 4e-155)
(* t (/ (- z) a))
(if (<= (* x y) 2e-71)
t_1
(if (<= (* x y) 2e-36)
(* z (/ t (- a)))
(if (<= (* x y) 4e+111) (/ (* x y) a) t_1)))))))assert(x < y && y < z && z < t && t < 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 / a);
double tmp;
if ((x * y) <= -4e-14) {
tmp = x / (a / y);
} else if ((x * y) <= 4e-155) {
tmp = t * (-z / a);
} else if ((x * y) <= 2e-71) {
tmp = t_1;
} else if ((x * y) <= 2e-36) {
tmp = z * (t / -a);
} else if ((x * y) <= 4e+111) {
tmp = (x * y) / a;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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 / a)
if ((x * y) <= (-4d-14)) then
tmp = x / (a / y)
else if ((x * y) <= 4d-155) then
tmp = t * (-z / a)
else if ((x * y) <= 2d-71) then
tmp = t_1
else if ((x * y) <= 2d-36) then
tmp = z * (t / -a)
else if ((x * y) <= 4d+111) then
tmp = (x * y) / a
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
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 / a);
double tmp;
if ((x * y) <= -4e-14) {
tmp = x / (a / y);
} else if ((x * y) <= 4e-155) {
tmp = t * (-z / a);
} else if ((x * y) <= 2e-71) {
tmp = t_1;
} else if ((x * y) <= 2e-36) {
tmp = z * (t / -a);
} else if ((x * y) <= 4e+111) {
tmp = (x * y) / a;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) [x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): t_1 = x * (y / a) tmp = 0 if (x * y) <= -4e-14: tmp = x / (a / y) elif (x * y) <= 4e-155: tmp = t * (-z / a) elif (x * y) <= 2e-71: tmp = t_1 elif (x * y) <= 2e-36: tmp = z * (t / -a) elif (x * y) <= 4e+111: tmp = (x * y) / a else: tmp = t_1 return tmp
x, y, z, t, a = sort([x, y, z, t, a]) x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) t_1 = Float64(x * Float64(y / a)) tmp = 0.0 if (Float64(x * y) <= -4e-14) tmp = Float64(x / Float64(a / y)); elseif (Float64(x * y) <= 4e-155) tmp = Float64(t * Float64(Float64(-z) / a)); elseif (Float64(x * y) <= 2e-71) tmp = t_1; elseif (Float64(x * y) <= 2e-36) tmp = Float64(z * Float64(t / Float64(-a))); elseif (Float64(x * y) <= 4e+111) tmp = Float64(Float64(x * y) / a); else tmp = t_1; end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
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 / a);
tmp = 0.0;
if ((x * y) <= -4e-14)
tmp = x / (a / y);
elseif ((x * y) <= 4e-155)
tmp = t * (-z / a);
elseif ((x * y) <= 2e-71)
tmp = t_1;
elseif ((x * y) <= 2e-36)
tmp = z * (t / -a);
elseif ((x * y) <= 4e+111)
tmp = (x * y) / a;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -4e-14], N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 4e-155], N[(t * N[((-z) / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2e-71], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 2e-36], N[(z * N[(t / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 4e+111], N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{a}\\
\mathbf{if}\;x \cdot y \leq -4 \cdot 10^{-14}:\\
\;\;\;\;\frac{x}{\frac{a}{y}}\\
\mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{-155}:\\
\;\;\;\;t \cdot \frac{-z}{a}\\
\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-71}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-36}:\\
\;\;\;\;z \cdot \frac{t}{-a}\\
\mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{+111}:\\
\;\;\;\;\frac{x \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 x y) < -4e-14Initial program 84.6%
Taylor expanded in x around inf 75.4%
associate-*r/76.9%
Simplified76.9%
clear-num76.8%
un-div-inv77.5%
Applied egg-rr77.5%
if -4e-14 < (*.f64 x y) < 4.00000000000000006e-155Initial program 95.3%
Taylor expanded in x around 0 81.9%
mul-1-neg81.9%
associate-/l*74.4%
distribute-rgt-neg-in74.4%
distribute-neg-frac274.4%
Simplified74.4%
if 4.00000000000000006e-155 < (*.f64 x y) < 1.9999999999999998e-71 or 3.99999999999999983e111 < (*.f64 x y) Initial program 85.6%
Taylor expanded in x around inf 78.7%
associate-*r/85.7%
Simplified85.7%
if 1.9999999999999998e-71 < (*.f64 x y) < 1.9999999999999999e-36Initial program 89.3%
Taylor expanded in x around 0 67.2%
*-commutative67.2%
associate-*r/65.9%
neg-mul-165.9%
distribute-rgt-neg-in65.9%
distribute-frac-neg65.9%
Simplified65.9%
if 1.9999999999999999e-36 < (*.f64 x y) < 3.99999999999999983e111Initial program 96.2%
Taylor expanded in x around inf 66.0%
Final simplification76.4%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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 (<= t_1 (- INFINITY))
(* x (- (/ y a) (* t (/ (/ z x) a))))
(if (<= t_1 5e+274) (/ t_1 a) (* t (/ (- (* y (/ x t)) z) a))))))assert(x < y && y < z && z < t && t < 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 <= -((double) INFINITY)) {
tmp = x * ((y / a) - (t * ((z / x) / a)));
} else if (t_1 <= 5e+274) {
tmp = t_1 / a;
} else {
tmp = t * (((y * (x / t)) - z) / a);
}
return tmp;
}
assert x < y && y < z && z < t && t < a;
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 <= -Double.POSITIVE_INFINITY) {
tmp = x * ((y / a) - (t * ((z / x) / a)));
} else if (t_1 <= 5e+274) {
tmp = t_1 / a;
} else {
tmp = t * (((y * (x / t)) - z) / a);
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) [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 <= -math.inf: tmp = x * ((y / a) - (t * ((z / x) / a))) elif t_1 <= 5e+274: tmp = t_1 / a else: tmp = t * (((y * (x / t)) - z) / a) return tmp
x, y, z, t, a = sort([x, y, z, t, a]) 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 <= Float64(-Inf)) tmp = Float64(x * Float64(Float64(y / a) - Float64(t * Float64(Float64(z / x) / a)))); elseif (t_1 <= 5e+274) tmp = Float64(t_1 / a); else tmp = Float64(t * Float64(Float64(Float64(y * Float64(x / t)) - z) / a)); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
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 <= -Inf)
tmp = x * ((y / a) - (t * ((z / x) / a)));
elseif (t_1 <= 5e+274)
tmp = t_1 / a;
else
tmp = t * (((y * (x / t)) - z) / a);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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[LessEqual[t$95$1, (-Infinity)], N[(x * N[(N[(y / a), $MachinePrecision] - N[(t * N[(N[(z / x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+274], N[(t$95$1 / a), $MachinePrecision], N[(t * N[(N[(N[(y * N[(x / t), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[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 -\infty:\\
\;\;\;\;x \cdot \left(\frac{y}{a} - t \cdot \frac{\frac{z}{x}}{a}\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+274}:\\
\;\;\;\;\frac{t\_1}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y \cdot \frac{x}{t} - z}{a}\\
\end{array}
\end{array}
if (-.f64 (*.f64 x y) (*.f64 z t)) < -inf.0Initial program 72.3%
Taylor expanded in x around inf 85.9%
+-commutative85.9%
mul-1-neg85.9%
unsub-neg85.9%
associate-/l*89.7%
*-commutative89.7%
associate-/r*93.3%
Simplified93.3%
if -inf.0 < (-.f64 (*.f64 x y) (*.f64 z t)) < 4.9999999999999998e274Initial program 98.8%
if 4.9999999999999998e274 < (-.f64 (*.f64 x y) (*.f64 z t)) Initial program 58.8%
Taylor expanded in t around inf 69.1%
+-commutative69.1%
mul-1-neg69.1%
unsub-neg69.1%
times-frac77.7%
Simplified77.7%
Taylor expanded in x around 0 69.1%
associate-/l/69.6%
div-sub75.4%
*-commutative75.4%
associate-/l*89.4%
Simplified89.4%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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 (<= t_1 -5e+234)
(- (* x (/ y a)) (/ t (/ a z)))
(if (<= t_1 5e+274) (/ t_1 a) (* t (/ (- (* y (/ x t)) z) a))))))assert(x < y && y < z && z < t && t < 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+234) {
tmp = (x * (y / a)) - (t / (a / z));
} else if (t_1 <= 5e+274) {
tmp = t_1 / a;
} else {
tmp = t * (((y * (x / t)) - z) / a);
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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+234)) then
tmp = (x * (y / a)) - (t / (a / z))
else if (t_1 <= 5d+274) then
tmp = t_1 / a
else
tmp = t * (((y * (x / t)) - z) / a)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
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+234) {
tmp = (x * (y / a)) - (t / (a / z));
} else if (t_1 <= 5e+274) {
tmp = t_1 / a;
} else {
tmp = t * (((y * (x / t)) - z) / a);
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) [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+234: tmp = (x * (y / a)) - (t / (a / z)) elif t_1 <= 5e+274: tmp = t_1 / a else: tmp = t * (((y * (x / t)) - z) / a) return tmp
x, y, z, t, a = sort([x, y, z, t, a]) 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+234) tmp = Float64(Float64(x * Float64(y / a)) - Float64(t / Float64(a / z))); elseif (t_1 <= 5e+274) tmp = Float64(t_1 / a); else tmp = Float64(t * Float64(Float64(Float64(y * Float64(x / t)) - z) / a)); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
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+234)
tmp = (x * (y / a)) - (t / (a / z));
elseif (t_1 <= 5e+274)
tmp = t_1 / a;
else
tmp = t * (((y * (x / t)) - z) / a);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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[LessEqual[t$95$1, -5e+234], N[(N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision] - N[(t / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+274], N[(t$95$1 / a), $MachinePrecision], N[(t * N[(N[(N[(y * N[(x / t), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[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^{+234}:\\
\;\;\;\;x \cdot \frac{y}{a} - \frac{t}{\frac{a}{z}}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+274}:\\
\;\;\;\;\frac{t\_1}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y \cdot \frac{x}{t} - z}{a}\\
\end{array}
\end{array}
if (-.f64 (*.f64 x y) (*.f64 z t)) < -5.0000000000000003e234Initial program 81.2%
div-sub78.7%
associate-/l*90.6%
associate-/l*97.3%
Applied egg-rr97.3%
*-commutative97.3%
div-inv97.3%
associate-*l*97.3%
add-sqr-sqrt37.3%
sqrt-unprod57.5%
sqr-neg57.5%
sqrt-unprod32.5%
add-sqr-sqrt52.4%
associate-/r/52.4%
un-div-inv52.4%
add-sqr-sqrt32.5%
sqrt-unprod57.5%
sqr-neg57.5%
sqrt-unprod37.3%
add-sqr-sqrt97.3%
Applied egg-rr97.3%
if -5.0000000000000003e234 < (-.f64 (*.f64 x y) (*.f64 z t)) < 4.9999999999999998e274Initial program 98.7%
if 4.9999999999999998e274 < (-.f64 (*.f64 x y) (*.f64 z t)) Initial program 58.8%
Taylor expanded in t around inf 69.1%
+-commutative69.1%
mul-1-neg69.1%
unsub-neg69.1%
times-frac77.7%
Simplified77.7%
Taylor expanded in x around 0 69.1%
associate-/l/69.6%
div-sub75.4%
*-commutative75.4%
associate-/l*89.4%
Simplified89.4%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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 (<= t_1 -5e+234)
(- (* x (/ y a)) (* z (/ t a)))
(if (<= t_1 5e+274) (/ t_1 a) (* t (/ (- (* y (/ x t)) z) a))))))assert(x < y && y < z && z < t && t < 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+234) {
tmp = (x * (y / a)) - (z * (t / a));
} else if (t_1 <= 5e+274) {
tmp = t_1 / a;
} else {
tmp = t * (((y * (x / t)) - z) / a);
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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+234)) then
tmp = (x * (y / a)) - (z * (t / a))
else if (t_1 <= 5d+274) then
tmp = t_1 / a
else
tmp = t * (((y * (x / t)) - z) / a)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
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+234) {
tmp = (x * (y / a)) - (z * (t / a));
} else if (t_1 <= 5e+274) {
tmp = t_1 / a;
} else {
tmp = t * (((y * (x / t)) - z) / a);
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) [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+234: tmp = (x * (y / a)) - (z * (t / a)) elif t_1 <= 5e+274: tmp = t_1 / a else: tmp = t * (((y * (x / t)) - z) / a) return tmp
x, y, z, t, a = sort([x, y, z, t, a]) 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+234) tmp = Float64(Float64(x * Float64(y / a)) - Float64(z * Float64(t / a))); elseif (t_1 <= 5e+274) tmp = Float64(t_1 / a); else tmp = Float64(t * Float64(Float64(Float64(y * Float64(x / t)) - z) / a)); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
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+234)
tmp = (x * (y / a)) - (z * (t / a));
elseif (t_1 <= 5e+274)
tmp = t_1 / a;
else
tmp = t * (((y * (x / t)) - z) / a);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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[LessEqual[t$95$1, -5e+234], N[(N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision] - N[(z * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+274], N[(t$95$1 / a), $MachinePrecision], N[(t * N[(N[(N[(y * N[(x / t), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[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^{+234}:\\
\;\;\;\;x \cdot \frac{y}{a} - z \cdot \frac{t}{a}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+274}:\\
\;\;\;\;\frac{t\_1}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y \cdot \frac{x}{t} - z}{a}\\
\end{array}
\end{array}
if (-.f64 (*.f64 x y) (*.f64 z t)) < -5.0000000000000003e234Initial program 81.2%
div-sub78.7%
associate-/l*90.6%
associate-/l*97.3%
Applied egg-rr97.3%
if -5.0000000000000003e234 < (-.f64 (*.f64 x y) (*.f64 z t)) < 4.9999999999999998e274Initial program 98.7%
if 4.9999999999999998e274 < (-.f64 (*.f64 x y) (*.f64 z t)) Initial program 58.8%
Taylor expanded in t around inf 69.1%
+-commutative69.1%
mul-1-neg69.1%
unsub-neg69.1%
times-frac77.7%
Simplified77.7%
Taylor expanded in x around 0 69.1%
associate-/l/69.6%
div-sub75.4%
*-commutative75.4%
associate-/l*89.4%
Simplified89.4%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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) -4e-14)
(/ x (/ a y))
(if (<= (* x y) 4e-155)
(* t (/ (- z) a))
(if (<= (* x y) 4e+111) (/ (* x y) a) (* x (/ y a))))))assert(x < y && y < z && z < t && 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) <= -4e-14) {
tmp = x / (a / y);
} else if ((x * y) <= 4e-155) {
tmp = t * (-z / a);
} else if ((x * y) <= 4e+111) {
tmp = (x * y) / 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.
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) <= (-4d-14)) then
tmp = x / (a / y)
else if ((x * y) <= 4d-155) then
tmp = t * (-z / a)
else if ((x * y) <= 4d+111) then
tmp = (x * y) / a
else
tmp = x * (y / a)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
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) <= -4e-14) {
tmp = x / (a / y);
} else if ((x * y) <= 4e-155) {
tmp = t * (-z / a);
} else if ((x * y) <= 4e+111) {
tmp = (x * y) / a;
} else {
tmp = x * (y / a);
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) [x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): tmp = 0 if (x * y) <= -4e-14: tmp = x / (a / y) elif (x * y) <= 4e-155: tmp = t * (-z / a) elif (x * y) <= 4e+111: tmp = (x * y) / a else: tmp = x * (y / a) return tmp
x, y, z, t, a = sort([x, y, z, t, a]) 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) <= -4e-14) tmp = Float64(x / Float64(a / y)); elseif (Float64(x * y) <= 4e-155) tmp = Float64(t * Float64(Float64(-z) / a)); elseif (Float64(x * y) <= 4e+111) tmp = Float64(Float64(x * y) / a); else tmp = Float64(x * Float64(y / a)); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
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) <= -4e-14)
tmp = x / (a / y);
elseif ((x * y) <= 4e-155)
tmp = t * (-z / a);
elseif ((x * y) <= 4e+111)
tmp = (x * y) / 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. 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], -4e-14], N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 4e-155], N[(t * N[((-z) / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 4e+111], N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision], N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -4 \cdot 10^{-14}:\\
\;\;\;\;\frac{x}{\frac{a}{y}}\\
\mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{-155}:\\
\;\;\;\;t \cdot \frac{-z}{a}\\
\mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{+111}:\\
\;\;\;\;\frac{x \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{a}\\
\end{array}
\end{array}
if (*.f64 x y) < -4e-14Initial program 84.6%
Taylor expanded in x around inf 75.4%
associate-*r/76.9%
Simplified76.9%
clear-num76.8%
un-div-inv77.5%
Applied egg-rr77.5%
if -4e-14 < (*.f64 x y) < 4.00000000000000006e-155Initial program 95.3%
Taylor expanded in x around 0 81.9%
mul-1-neg81.9%
associate-/l*74.4%
distribute-rgt-neg-in74.4%
distribute-neg-frac274.4%
Simplified74.4%
if 4.00000000000000006e-155 < (*.f64 x y) < 3.99999999999999983e111Initial program 95.6%
Taylor expanded in x around inf 61.1%
if 3.99999999999999983e111 < (*.f64 x y) Initial program 83.2%
Taylor expanded in x around inf 77.1%
associate-*r/85.5%
Simplified85.5%
Final simplification74.9%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. 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) -5e+234) (* y (/ x a)) (if (<= (* x y) 1e+164) (/ (- (* x y) (* z t)) a) (* x (/ y a)))))
assert(x < y && y < z && z < t && 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+234) {
tmp = y * (x / a);
} else if ((x * y) <= 1e+164) {
tmp = ((x * y) - (z * t)) / 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.
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+234)) then
tmp = y * (x / a)
else if ((x * y) <= 1d+164) then
tmp = ((x * y) - (z * t)) / a
else
tmp = x * (y / a)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
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+234) {
tmp = y * (x / a);
} else if ((x * y) <= 1e+164) {
tmp = ((x * y) - (z * t)) / a;
} else {
tmp = x * (y / a);
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) [x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): tmp = 0 if (x * y) <= -5e+234: tmp = y * (x / a) elif (x * y) <= 1e+164: tmp = ((x * y) - (z * t)) / a else: tmp = x * (y / a) return tmp
x, y, z, t, a = sort([x, y, z, t, a]) 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+234) tmp = Float64(y * Float64(x / a)); elseif (Float64(x * y) <= 1e+164) tmp = Float64(Float64(Float64(x * y) - Float64(z * t)) / a); else tmp = Float64(x * Float64(y / a)); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
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+234)
tmp = y * (x / a);
elseif ((x * y) <= 1e+164)
tmp = ((x * y) - (z * t)) / 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. 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], -5e+234], N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1e+164], N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+234}:\\
\;\;\;\;y \cdot \frac{x}{a}\\
\mathbf{elif}\;x \cdot y \leq 10^{+164}:\\
\;\;\;\;\frac{x \cdot y - z \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{a}\\
\end{array}
\end{array}
if (*.f64 x y) < -5.0000000000000003e234Initial program 71.3%
Taylor expanded in x around inf 71.3%
associate-*r/88.8%
Simplified88.8%
Taylor expanded in x around 0 71.3%
*-commutative71.3%
associate-*l/88.8%
associate-/r/88.8%
Simplified88.8%
clear-num88.8%
associate-/r/88.7%
clear-num88.8%
Applied egg-rr88.8%
if -5.0000000000000003e234 < (*.f64 x y) < 1e164Initial program 95.5%
if 1e164 < (*.f64 x y) Initial program 76.6%
Taylor expanded in x around inf 79.8%
associate-*r/91.4%
Simplified91.4%
Final simplification94.3%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. 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 (<= t_1 5e+274) (/ t_1 a) (* t (/ (- (* y (/ x t)) z) a)))))
assert(x < y && y < z && z < t && t < 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+274) {
tmp = t_1 / a;
} else {
tmp = t * (((y * (x / t)) - z) / a);
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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+274) then
tmp = t_1 / a
else
tmp = t * (((y * (x / t)) - z) / a)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
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+274) {
tmp = t_1 / a;
} else {
tmp = t * (((y * (x / t)) - z) / a);
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) [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+274: tmp = t_1 / a else: tmp = t * (((y * (x / t)) - z) / a) return tmp
x, y, z, t, a = sort([x, y, z, t, a]) 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+274) tmp = Float64(t_1 / a); else tmp = Float64(t * Float64(Float64(Float64(y * Float64(x / t)) - z) / a)); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
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+274)
tmp = t_1 / a;
else
tmp = t * (((y * (x / t)) - z) / a);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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[LessEqual[t$95$1, 5e+274], N[(t$95$1 / a), $MachinePrecision], N[(t * N[(N[(N[(y * N[(x / t), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[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^{+274}:\\
\;\;\;\;\frac{t\_1}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y \cdot \frac{x}{t} - z}{a}\\
\end{array}
\end{array}
if (-.f64 (*.f64 x y) (*.f64 z t)) < 4.9999999999999998e274Initial program 95.6%
if 4.9999999999999998e274 < (-.f64 (*.f64 x y) (*.f64 z t)) Initial program 58.8%
Taylor expanded in t around inf 69.1%
+-commutative69.1%
mul-1-neg69.1%
unsub-neg69.1%
times-frac77.7%
Simplified77.7%
Taylor expanded in x around 0 69.1%
associate-/l/69.6%
div-sub75.4%
*-commutative75.4%
associate-/l*89.4%
Simplified89.4%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. 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 (<= a 8.5e+172) (* x (/ y a)) (* y (/ x a))))
assert(x < y && y < z && z < t && 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 (a <= 8.5e+172) {
tmp = x * (y / a);
} else {
tmp = y * (x / a);
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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 (a <= 8.5d+172) then
tmp = x * (y / a)
else
tmp = y * (x / a)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
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 (a <= 8.5e+172) {
tmp = x * (y / a);
} else {
tmp = y * (x / a);
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) [x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): tmp = 0 if a <= 8.5e+172: tmp = x * (y / a) else: tmp = y * (x / a) return tmp
x, y, z, t, a = sort([x, y, z, t, a]) x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) tmp = 0.0 if (a <= 8.5e+172) tmp = Float64(x * Float64(y / a)); else tmp = Float64(y * Float64(x / a)); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
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 (a <= 8.5e+172)
tmp = x * (y / a);
else
tmp = y * (x / a);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. 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[a, 8.5e+172], N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision], N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 8.5 \cdot 10^{+172}:\\
\;\;\;\;x \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{a}\\
\end{array}
\end{array}
if a < 8.50000000000000053e172Initial program 92.1%
Taylor expanded in x around inf 53.4%
associate-*r/54.8%
Simplified54.8%
if 8.50000000000000053e172 < a Initial program 79.3%
Taylor expanded in x around inf 48.6%
associate-*r/48.6%
Simplified48.6%
Taylor expanded in x around 0 48.6%
*-commutative48.6%
associate-*l/48.6%
associate-/r/48.7%
Simplified48.7%
clear-num48.6%
associate-/r/48.7%
clear-num48.7%
Applied egg-rr48.7%
Final simplification54.0%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. 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 (/ a y)))
assert(x < y && y < z && z < t && t < a);
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
return x / (a / y);
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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 / (a / y)
end function
assert x < y && y < z && z < t && t < a;
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 / (a / y);
}
[x, y, z, t, a] = sort([x, y, z, t, a]) [x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): return x / (a / y)
x, y, z, t, a = sort([x, y, z, t, a]) x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) return Float64(x / Float64(a / y)) end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp = code(x, y, z, t, a)
tmp = x / (a / y);
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. 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[(a / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\frac{x}{\frac{a}{y}}
\end{array}
Initial program 90.5%
Taylor expanded in x around inf 52.8%
associate-*r/54.0%
Simplified54.0%
clear-num54.0%
un-div-inv54.3%
Applied egg-rr54.3%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. 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);
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.
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;
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]) [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]) 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])){:}
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. 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, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
x \cdot \frac{y}{a}
\end{array}
Initial program 90.5%
Taylor expanded in x around inf 52.8%
associate-*r/54.0%
Simplified54.0%
(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 2024089
(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))