
(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 11 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 and y should be sorted in increasing order before calling this function.
NOTE: z and t 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 -1e+228)
(- (/ x (/ a y)) (/ z (/ a t)))
(if (<= t_1 2e+293)
(/ (fma x y (* z (- t))) a)
(- (* y (/ x a)) (* t (/ z a)))))))assert(x < y);
assert(z < t);
double code(double x, double y, double z, double t, double a) {
double t_1 = (x * y) - (z * t);
double tmp;
if (t_1 <= -1e+228) {
tmp = (x / (a / y)) - (z / (a / t));
} else if (t_1 <= 2e+293) {
tmp = fma(x, y, (z * -t)) / a;
} else {
tmp = (y * (x / a)) - (t * (z / a));
}
return tmp;
}
x, y = sort([x, y]) z, t = sort([z, t]) function code(x, y, z, t, a) t_1 = Float64(Float64(x * y) - Float64(z * t)) tmp = 0.0 if (t_1 <= -1e+228) tmp = Float64(Float64(x / Float64(a / y)) - Float64(z / Float64(a / t))); elseif (t_1 <= 2e+293) tmp = Float64(fma(x, y, Float64(z * Float64(-t))) / a); else tmp = Float64(Float64(y * Float64(x / a)) - Float64(t * Float64(z / a))); end return tmp end
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t 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, -1e+228], N[(N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision] - N[(z / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+293], N[(N[(x * y + N[(z * (-t)), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision] - N[(t * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
t_1 := x \cdot y - z \cdot t\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+228}:\\
\;\;\;\;\frac{x}{\frac{a}{y}} - \frac{z}{\frac{a}{t}}\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+293}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(-t\right)\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{a} - t \cdot \frac{z}{a}\\
\end{array}
\end{array}
if (-.f64 (*.f64 x y) (*.f64 z t)) < -9.9999999999999992e227Initial program 78.1%
div-sub75.7%
associate-/l*91.3%
associate-/l*97.5%
Applied egg-rr97.5%
if -9.9999999999999992e227 < (-.f64 (*.f64 x y) (*.f64 z t)) < 1.9999999999999998e293Initial program 99.2%
fma-neg99.2%
distribute-rgt-neg-out99.2%
Simplified99.2%
if 1.9999999999999998e293 < (-.f64 (*.f64 x y) (*.f64 z t)) Initial program 69.9%
Taylor expanded in x around 0 64.7%
+-commutative64.7%
mul-1-neg64.7%
unsub-neg64.7%
associate-*l/79.3%
*-commutative79.3%
div-inv79.3%
associate-*l*86.6%
div-inv86.7%
Applied egg-rr86.7%
Final simplification97.1%
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t 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+305) (not (<= t_1 2e+293)))
(- (* x (/ y a)) (* t (/ z a)))
(/ t_1 a))))assert(x < y);
assert(z < t);
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+305) || !(t_1 <= 2e+293)) {
tmp = (x * (y / a)) - (t * (z / a));
} else {
tmp = t_1 / a;
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t 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+305)) .or. (.not. (t_1 <= 2d+293))) then
tmp = (x * (y / a)) - (t * (z / a))
else
tmp = t_1 / a
end if
code = tmp
end function
assert x < y;
assert z < t;
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+305) || !(t_1 <= 2e+293)) {
tmp = (x * (y / a)) - (t * (z / a));
} else {
tmp = t_1 / a;
}
return tmp;
}
[x, y] = sort([x, y]) [z, t] = sort([z, t]) def code(x, y, z, t, a): t_1 = (x * y) - (z * t) tmp = 0 if (t_1 <= -5e+305) or not (t_1 <= 2e+293): tmp = (x * (y / a)) - (t * (z / a)) else: tmp = t_1 / a return tmp
x, y = sort([x, y]) z, t = sort([z, t]) function code(x, y, z, t, a) t_1 = Float64(Float64(x * y) - Float64(z * t)) tmp = 0.0 if ((t_1 <= -5e+305) || !(t_1 <= 2e+293)) tmp = Float64(Float64(x * Float64(y / a)) - Float64(t * Float64(z / a))); else tmp = Float64(t_1 / a); end return tmp end
x, y = num2cell(sort([x, y])){:}
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t, a)
t_1 = (x * y) - (z * t);
tmp = 0.0;
if ((t_1 <= -5e+305) || ~((t_1 <= 2e+293)))
tmp = (x * (y / a)) - (t * (z / a));
else
tmp = t_1 / a;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t 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+305], N[Not[LessEqual[t$95$1, 2e+293]], $MachinePrecision]], N[(N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision] - N[(t * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / a), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
t_1 := x \cdot y - z \cdot t\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+305} \lor \neg \left(t_1 \leq 2 \cdot 10^{+293}\right):\\
\;\;\;\;x \cdot \frac{y}{a} - t \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{a}\\
\end{array}
\end{array}
if (-.f64 (*.f64 x y) (*.f64 z t)) < -5.00000000000000009e305 or 1.9999999999999998e293 < (-.f64 (*.f64 x y) (*.f64 z t)) Initial program 69.8%
Taylor expanded in x around 0 65.5%
associate-*l/74.9%
Applied egg-rr74.9%
+-commutative74.9%
mul-1-neg74.9%
*-commutative74.9%
clear-num74.9%
div-inv74.9%
sub-neg74.9%
associate-*r/94.0%
associate-/r/92.6%
*-commutative92.6%
Applied egg-rr92.6%
if -5.00000000000000009e305 < (-.f64 (*.f64 x y) (*.f64 z t)) < 1.9999999999999998e293Initial program 99.2%
Final simplification97.5%
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ z a))) (t_2 (- (* x y) (* z t))))
(if (<= t_2 -5e+305)
(- (* x (/ y a)) t_1)
(if (<= t_2 2e+293) (/ t_2 a) (- (* y (/ x a)) t_1)))))assert(x < y);
assert(z < t);
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (z / a);
double t_2 = (x * y) - (z * t);
double tmp;
if (t_2 <= -5e+305) {
tmp = (x * (y / a)) - t_1;
} else if (t_2 <= 2e+293) {
tmp = t_2 / a;
} else {
tmp = (y * (x / a)) - t_1;
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t 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) :: t_2
real(8) :: tmp
t_1 = t * (z / a)
t_2 = (x * y) - (z * t)
if (t_2 <= (-5d+305)) then
tmp = (x * (y / a)) - t_1
else if (t_2 <= 2d+293) then
tmp = t_2 / a
else
tmp = (y * (x / a)) - t_1
end if
code = tmp
end function
assert x < y;
assert z < t;
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * (z / a);
double t_2 = (x * y) - (z * t);
double tmp;
if (t_2 <= -5e+305) {
tmp = (x * (y / a)) - t_1;
} else if (t_2 <= 2e+293) {
tmp = t_2 / a;
} else {
tmp = (y * (x / a)) - t_1;
}
return tmp;
}
[x, y] = sort([x, y]) [z, t] = sort([z, t]) def code(x, y, z, t, a): t_1 = t * (z / a) t_2 = (x * y) - (z * t) tmp = 0 if t_2 <= -5e+305: tmp = (x * (y / a)) - t_1 elif t_2 <= 2e+293: tmp = t_2 / a else: tmp = (y * (x / a)) - t_1 return tmp
x, y = sort([x, y]) z, t = sort([z, t]) function code(x, y, z, t, a) t_1 = Float64(t * Float64(z / a)) t_2 = Float64(Float64(x * y) - Float64(z * t)) tmp = 0.0 if (t_2 <= -5e+305) tmp = Float64(Float64(x * Float64(y / a)) - t_1); elseif (t_2 <= 2e+293) tmp = Float64(t_2 / a); else tmp = Float64(Float64(y * Float64(x / a)) - t_1); end return tmp end
x, y = num2cell(sort([x, y])){:}
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t, a)
t_1 = t * (z / a);
t_2 = (x * y) - (z * t);
tmp = 0.0;
if (t_2 <= -5e+305)
tmp = (x * (y / a)) - t_1;
elseif (t_2 <= 2e+293)
tmp = t_2 / a;
else
tmp = (y * (x / a)) - t_1;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t 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]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+305], N[(N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t$95$2, 2e+293], N[(t$95$2 / a), $MachinePrecision], N[(N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
t_1 := t \cdot \frac{z}{a}\\
t_2 := x \cdot y - z \cdot t\\
\mathbf{if}\;t_2 \leq -5 \cdot 10^{+305}:\\
\;\;\;\;x \cdot \frac{y}{a} - t_1\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+293}:\\
\;\;\;\;\frac{t_2}{a}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{a} - t_1\\
\end{array}
\end{array}
if (-.f64 (*.f64 x y) (*.f64 z t)) < -5.00000000000000009e305Initial program 69.7%
Taylor expanded in x around 0 66.5%
associate-*l/75.3%
Applied egg-rr75.3%
+-commutative75.3%
mul-1-neg75.3%
*-commutative75.3%
clear-num75.3%
div-inv75.2%
sub-neg75.2%
associate-*r/96.6%
associate-/r/96.6%
*-commutative96.6%
Applied egg-rr96.6%
if -5.00000000000000009e305 < (-.f64 (*.f64 x y) (*.f64 z t)) < 1.9999999999999998e293Initial program 99.2%
if 1.9999999999999998e293 < (-.f64 (*.f64 x y) (*.f64 z t)) Initial program 69.9%
Taylor expanded in x around 0 64.7%
+-commutative64.7%
mul-1-neg64.7%
unsub-neg64.7%
associate-*l/79.3%
*-commutative79.3%
div-inv79.3%
associate-*l*86.6%
div-inv86.7%
Applied egg-rr86.7%
Final simplification97.1%
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t 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 -1e+228)
(- (/ x (/ a y)) (/ z (/ a t)))
(if (<= t_1 2e+293) (/ t_1 a) (- (* y (/ x a)) (* t (/ z a)))))))assert(x < y);
assert(z < t);
double code(double x, double y, double z, double t, double a) {
double t_1 = (x * y) - (z * t);
double tmp;
if (t_1 <= -1e+228) {
tmp = (x / (a / y)) - (z / (a / t));
} else if (t_1 <= 2e+293) {
tmp = t_1 / a;
} else {
tmp = (y * (x / a)) - (t * (z / a));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t 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 <= (-1d+228)) then
tmp = (x / (a / y)) - (z / (a / t))
else if (t_1 <= 2d+293) then
tmp = t_1 / a
else
tmp = (y * (x / a)) - (t * (z / a))
end if
code = tmp
end function
assert x < y;
assert z < t;
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 <= -1e+228) {
tmp = (x / (a / y)) - (z / (a / t));
} else if (t_1 <= 2e+293) {
tmp = t_1 / a;
} else {
tmp = (y * (x / a)) - (t * (z / a));
}
return tmp;
}
[x, y] = sort([x, y]) [z, t] = sort([z, t]) def code(x, y, z, t, a): t_1 = (x * y) - (z * t) tmp = 0 if t_1 <= -1e+228: tmp = (x / (a / y)) - (z / (a / t)) elif t_1 <= 2e+293: tmp = t_1 / a else: tmp = (y * (x / a)) - (t * (z / a)) return tmp
x, y = sort([x, y]) z, t = sort([z, t]) function code(x, y, z, t, a) t_1 = Float64(Float64(x * y) - Float64(z * t)) tmp = 0.0 if (t_1 <= -1e+228) tmp = Float64(Float64(x / Float64(a / y)) - Float64(z / Float64(a / t))); elseif (t_1 <= 2e+293) tmp = Float64(t_1 / a); else tmp = Float64(Float64(y * Float64(x / a)) - Float64(t * Float64(z / a))); end return tmp end
x, y = num2cell(sort([x, y])){:}
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t, a)
t_1 = (x * y) - (z * t);
tmp = 0.0;
if (t_1 <= -1e+228)
tmp = (x / (a / y)) - (z / (a / t));
elseif (t_1 <= 2e+293)
tmp = t_1 / a;
else
tmp = (y * (x / a)) - (t * (z / a));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t 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, -1e+228], N[(N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision] - N[(z / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+293], N[(t$95$1 / a), $MachinePrecision], N[(N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision] - N[(t * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
t_1 := x \cdot y - z \cdot t\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+228}:\\
\;\;\;\;\frac{x}{\frac{a}{y}} - \frac{z}{\frac{a}{t}}\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+293}:\\
\;\;\;\;\frac{t_1}{a}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{a} - t \cdot \frac{z}{a}\\
\end{array}
\end{array}
if (-.f64 (*.f64 x y) (*.f64 z t)) < -9.9999999999999992e227Initial program 78.1%
div-sub75.7%
associate-/l*91.3%
associate-/l*97.5%
Applied egg-rr97.5%
if -9.9999999999999992e227 < (-.f64 (*.f64 x y) (*.f64 z t)) < 1.9999999999999998e293Initial program 99.2%
if 1.9999999999999998e293 < (-.f64 (*.f64 x y) (*.f64 z t)) Initial program 69.9%
Taylor expanded in x around 0 64.7%
+-commutative64.7%
mul-1-neg64.7%
unsub-neg64.7%
associate-*l/79.3%
*-commutative79.3%
div-inv79.3%
associate-*l*86.6%
div-inv86.7%
Applied egg-rr86.7%
Final simplification97.1%
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: z and t should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= (* x y) (- INFINITY)) (/ x (/ a y)) (if (<= (* x y) 5e+217) (/ (- (* x y) (* z t)) a) (* x (/ y a)))))
assert(x < y);
assert(z < t);
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -((double) INFINITY)) {
tmp = x / (a / y);
} else if ((x * y) <= 5e+217) {
tmp = ((x * y) - (z * t)) / a;
} else {
tmp = x * (y / a);
}
return tmp;
}
assert x < y;
assert z < t;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -Double.POSITIVE_INFINITY) {
tmp = x / (a / y);
} else if ((x * y) <= 5e+217) {
tmp = ((x * y) - (z * t)) / a;
} else {
tmp = x * (y / a);
}
return tmp;
}
[x, y] = sort([x, y]) [z, t] = sort([z, t]) def code(x, y, z, t, a): tmp = 0 if (x * y) <= -math.inf: tmp = x / (a / y) elif (x * y) <= 5e+217: tmp = ((x * y) - (z * t)) / a else: tmp = x * (y / a) return tmp
x, y = sort([x, y]) z, t = sort([z, t]) function code(x, y, z, t, a) tmp = 0.0 if (Float64(x * y) <= Float64(-Inf)) tmp = Float64(x / Float64(a / y)); elseif (Float64(x * y) <= 5e+217) tmp = Float64(Float64(Float64(x * y) - Float64(z * t)) / a); else tmp = Float64(x * Float64(y / a)); end return tmp end
x, y = num2cell(sort([x, y])){:}
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if ((x * y) <= -Inf)
tmp = x / (a / y);
elseif ((x * y) <= 5e+217)
tmp = ((x * y) - (z * t)) / a;
else
tmp = x * (y / a);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: z and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x * y), $MachinePrecision], (-Infinity)], N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 5e+217], 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] = \mathsf{sort}([x, y])\\
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -\infty:\\
\;\;\;\;\frac{x}{\frac{a}{y}}\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+217}:\\
\;\;\;\;\frac{x \cdot y - z \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{a}\\
\end{array}
\end{array}
if (*.f64 x y) < -inf.0Initial program 58.5%
Taylor expanded in x around inf 58.5%
associate-*l/93.9%
Simplified93.9%
associate-/r/94.1%
Applied egg-rr94.1%
if -inf.0 < (*.f64 x y) < 5.00000000000000041e217Initial program 96.7%
if 5.00000000000000041e217 < (*.f64 x y) Initial program 73.1%
Taylor expanded in x around 0 70.0%
Taylor expanded in t around 0 73.2%
associate-*r/93.7%
Simplified93.7%
Final simplification96.1%
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- t) (/ a z))))
(if (<= t -1.55e-133)
t_1
(if (<= t 7.1e-243)
(/ y (/ a x))
(if (<= t 3.3e-153)
(* x (/ y a))
(if (<= t 1.3e+50) (* y (/ x a)) t_1))))))assert(x < y);
assert(z < t);
double code(double x, double y, double z, double t, double a) {
double t_1 = -t / (a / z);
double tmp;
if (t <= -1.55e-133) {
tmp = t_1;
} else if (t <= 7.1e-243) {
tmp = y / (a / x);
} else if (t <= 3.3e-153) {
tmp = x * (y / a);
} else if (t <= 1.3e+50) {
tmp = y * (x / a);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t 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 / (a / z)
if (t <= (-1.55d-133)) then
tmp = t_1
else if (t <= 7.1d-243) then
tmp = y / (a / x)
else if (t <= 3.3d-153) then
tmp = x * (y / a)
else if (t <= 1.3d+50) then
tmp = y * (x / a)
else
tmp = t_1
end if
code = tmp
end function
assert x < y;
assert z < t;
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -t / (a / z);
double tmp;
if (t <= -1.55e-133) {
tmp = t_1;
} else if (t <= 7.1e-243) {
tmp = y / (a / x);
} else if (t <= 3.3e-153) {
tmp = x * (y / a);
} else if (t <= 1.3e+50) {
tmp = y * (x / a);
} else {
tmp = t_1;
}
return tmp;
}
[x, y] = sort([x, y]) [z, t] = sort([z, t]) def code(x, y, z, t, a): t_1 = -t / (a / z) tmp = 0 if t <= -1.55e-133: tmp = t_1 elif t <= 7.1e-243: tmp = y / (a / x) elif t <= 3.3e-153: tmp = x * (y / a) elif t <= 1.3e+50: tmp = y * (x / a) else: tmp = t_1 return tmp
x, y = sort([x, y]) z, t = sort([z, t]) function code(x, y, z, t, a) t_1 = Float64(Float64(-t) / Float64(a / z)) tmp = 0.0 if (t <= -1.55e-133) tmp = t_1; elseif (t <= 7.1e-243) tmp = Float64(y / Float64(a / x)); elseif (t <= 3.3e-153) tmp = Float64(x * Float64(y / a)); elseif (t <= 1.3e+50) tmp = Float64(y * Float64(x / a)); else tmp = t_1; end return tmp end
x, y = num2cell(sort([x, y])){:}
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t, a)
t_1 = -t / (a / z);
tmp = 0.0;
if (t <= -1.55e-133)
tmp = t_1;
elseif (t <= 7.1e-243)
tmp = y / (a / x);
elseif (t <= 3.3e-153)
tmp = x * (y / a);
elseif (t <= 1.3e+50)
tmp = y * (x / a);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-t) / N[(a / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.55e-133], t$95$1, If[LessEqual[t, 7.1e-243], N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.3e-153], N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.3e+50], N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
t_1 := \frac{-t}{\frac{a}{z}}\\
\mathbf{if}\;t \leq -1.55 \cdot 10^{-133}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 7.1 \cdot 10^{-243}:\\
\;\;\;\;\frac{y}{\frac{a}{x}}\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{-153}:\\
\;\;\;\;x \cdot \frac{y}{a}\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{+50}:\\
\;\;\;\;y \cdot \frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.55000000000000008e-133 or 1.3000000000000001e50 < t Initial program 88.2%
Taylor expanded in x around 0 66.5%
mul-1-neg66.5%
associate-/l*65.8%
Simplified65.8%
if -1.55000000000000008e-133 < t < 7.1000000000000004e-243Initial program 96.2%
Taylor expanded in x around inf 74.4%
associate-*l/69.5%
Simplified69.5%
*-commutative69.5%
clear-num69.4%
un-div-inv69.4%
Applied egg-rr69.4%
if 7.1000000000000004e-243 < t < 3.29999999999999988e-153Initial program 90.7%
Taylor expanded in x around 0 86.0%
Taylor expanded in t around 0 86.1%
associate-*r/84.4%
Simplified84.4%
if 3.29999999999999988e-153 < t < 1.3000000000000001e50Initial program 95.2%
Taylor expanded in x around inf 69.4%
associate-*l/70.6%
Simplified70.6%
Final simplification68.9%
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: z and t should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (or (<= (* x y) -5e+25) (not (<= (* x y) 1e-31))) (* y (/ x a)) (* z (/ (- t) a))))
assert(x < y);
assert(z < t);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((x * y) <= -5e+25) || !((x * y) <= 1e-31)) {
tmp = y * (x / a);
} else {
tmp = z * (-t / a);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t 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+25)) .or. (.not. ((x * y) <= 1d-31))) then
tmp = y * (x / a)
else
tmp = z * (-t / a)
end if
code = tmp
end function
assert x < y;
assert z < t;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((x * y) <= -5e+25) || !((x * y) <= 1e-31)) {
tmp = y * (x / a);
} else {
tmp = z * (-t / a);
}
return tmp;
}
[x, y] = sort([x, y]) [z, t] = sort([z, t]) def code(x, y, z, t, a): tmp = 0 if ((x * y) <= -5e+25) or not ((x * y) <= 1e-31): tmp = y * (x / a) else: tmp = z * (-t / a) return tmp
x, y = sort([x, y]) z, t = sort([z, t]) function code(x, y, z, t, a) tmp = 0.0 if ((Float64(x * y) <= -5e+25) || !(Float64(x * y) <= 1e-31)) tmp = Float64(y * Float64(x / a)); else tmp = Float64(z * Float64(Float64(-t) / a)); end return tmp end
x, y = num2cell(sort([x, y])){:}
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (((x * y) <= -5e+25) || ~(((x * y) <= 1e-31)))
tmp = y * (x / a);
else
tmp = z * (-t / a);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: z and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -5e+25], N[Not[LessEqual[N[(x * y), $MachinePrecision], 1e-31]], $MachinePrecision]], N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision], N[(z * N[((-t) / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+25} \lor \neg \left(x \cdot y \leq 10^{-31}\right):\\
\;\;\;\;y \cdot \frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{-t}{a}\\
\end{array}
\end{array}
if (*.f64 x y) < -5.00000000000000024e25 or 1e-31 < (*.f64 x y) Initial program 87.0%
Taylor expanded in x around inf 69.5%
associate-*l/74.8%
Simplified74.8%
if -5.00000000000000024e25 < (*.f64 x y) < 1e-31Initial program 96.1%
div-sub96.1%
associate-/l*95.4%
associate-/l*93.0%
Applied egg-rr93.0%
Taylor expanded in x around 0 77.3%
associate-*r/77.3%
mul-1-neg77.3%
distribute-lft-neg-out77.3%
associate-*l/74.9%
*-commutative74.9%
Simplified74.9%
Final simplification74.9%
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: z and t should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (or (<= (* x y) -5e+25) (not (<= (* x y) 2e-87))) (* y (/ x a)) (/ (* z (- t)) a)))
assert(x < y);
assert(z < t);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((x * y) <= -5e+25) || !((x * y) <= 2e-87)) {
tmp = y * (x / a);
} else {
tmp = (z * -t) / a;
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t 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+25)) .or. (.not. ((x * y) <= 2d-87))) then
tmp = y * (x / a)
else
tmp = (z * -t) / a
end if
code = tmp
end function
assert x < y;
assert z < t;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((x * y) <= -5e+25) || !((x * y) <= 2e-87)) {
tmp = y * (x / a);
} else {
tmp = (z * -t) / a;
}
return tmp;
}
[x, y] = sort([x, y]) [z, t] = sort([z, t]) def code(x, y, z, t, a): tmp = 0 if ((x * y) <= -5e+25) or not ((x * y) <= 2e-87): tmp = y * (x / a) else: tmp = (z * -t) / a return tmp
x, y = sort([x, y]) z, t = sort([z, t]) function code(x, y, z, t, a) tmp = 0.0 if ((Float64(x * y) <= -5e+25) || !(Float64(x * y) <= 2e-87)) tmp = Float64(y * Float64(x / a)); else tmp = Float64(Float64(z * Float64(-t)) / a); end return tmp end
x, y = num2cell(sort([x, y])){:}
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (((x * y) <= -5e+25) || ~(((x * y) <= 2e-87)))
tmp = y * (x / a);
else
tmp = (z * -t) / a;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: z and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -5e+25], N[Not[LessEqual[N[(x * y), $MachinePrecision], 2e-87]], $MachinePrecision]], N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision], N[(N[(z * (-t)), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+25} \lor \neg \left(x \cdot y \leq 2 \cdot 10^{-87}\right):\\
\;\;\;\;y \cdot \frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(-t\right)}{a}\\
\end{array}
\end{array}
if (*.f64 x y) < -5.00000000000000024e25 or 2.00000000000000004e-87 < (*.f64 x y) Initial program 87.2%
Taylor expanded in x around inf 68.2%
associate-*l/72.5%
Simplified72.5%
if -5.00000000000000024e25 < (*.f64 x y) < 2.00000000000000004e-87Initial program 96.7%
Taylor expanded in x around 0 80.3%
mul-1-neg80.3%
distribute-rgt-neg-in80.3%
Simplified80.3%
Final simplification75.9%
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: z and t should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= x -2.9e-102) (* y (/ x a)) (* x (/ y a))))
assert(x < y);
assert(z < t);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -2.9e-102) {
tmp = y * (x / a);
} else {
tmp = x * (y / a);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t 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 <= (-2.9d-102)) then
tmp = y * (x / a)
else
tmp = x * (y / a)
end if
code = tmp
end function
assert x < y;
assert z < t;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -2.9e-102) {
tmp = y * (x / a);
} else {
tmp = x * (y / a);
}
return tmp;
}
[x, y] = sort([x, y]) [z, t] = sort([z, t]) def code(x, y, z, t, a): tmp = 0 if x <= -2.9e-102: tmp = y * (x / a) else: tmp = x * (y / a) return tmp
x, y = sort([x, y]) z, t = sort([z, t]) function code(x, y, z, t, a) tmp = 0.0 if (x <= -2.9e-102) tmp = Float64(y * Float64(x / a)); else tmp = Float64(x * Float64(y / a)); end return tmp end
x, y = num2cell(sort([x, y])){:}
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (x <= -2.9e-102)
tmp = y * (x / a);
else
tmp = x * (y / a);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: z and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[LessEqual[x, -2.9e-102], N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision], N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.9 \cdot 10^{-102}:\\
\;\;\;\;y \cdot \frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{a}\\
\end{array}
\end{array}
if x < -2.89999999999999986e-102Initial program 91.5%
Taylor expanded in x around inf 61.7%
associate-*l/70.0%
Simplified70.0%
if -2.89999999999999986e-102 < x Initial program 91.2%
Taylor expanded in x around 0 88.8%
Taylor expanded in t around 0 47.7%
associate-*r/51.3%
Simplified51.3%
Final simplification57.9%
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: z and t should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= x -3.6e-102) (* y (/ x a)) (/ x (/ a y))))
assert(x < y);
assert(z < t);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -3.6e-102) {
tmp = y * (x / a);
} else {
tmp = x / (a / y);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t 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 <= (-3.6d-102)) then
tmp = y * (x / a)
else
tmp = x / (a / y)
end if
code = tmp
end function
assert x < y;
assert z < t;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -3.6e-102) {
tmp = y * (x / a);
} else {
tmp = x / (a / y);
}
return tmp;
}
[x, y] = sort([x, y]) [z, t] = sort([z, t]) def code(x, y, z, t, a): tmp = 0 if x <= -3.6e-102: tmp = y * (x / a) else: tmp = x / (a / y) return tmp
x, y = sort([x, y]) z, t = sort([z, t]) function code(x, y, z, t, a) tmp = 0.0 if (x <= -3.6e-102) tmp = Float64(y * Float64(x / a)); else tmp = Float64(x / Float64(a / y)); end return tmp end
x, y = num2cell(sort([x, y])){:}
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (x <= -3.6e-102)
tmp = y * (x / a);
else
tmp = x / (a / y);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: z and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[LessEqual[x, -3.6e-102], N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision], N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.6 \cdot 10^{-102}:\\
\;\;\;\;y \cdot \frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{a}{y}}\\
\end{array}
\end{array}
if x < -3.6e-102Initial program 91.5%
Taylor expanded in x around inf 61.7%
associate-*l/70.0%
Simplified70.0%
if -3.6e-102 < x Initial program 91.2%
Taylor expanded in x around inf 47.7%
associate-*l/45.0%
Simplified45.0%
associate-/r/51.3%
Applied egg-rr51.3%
Final simplification57.9%
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: z and t should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (* x (/ y a)))
assert(x < y);
assert(z < t);
double code(double x, double y, double z, double t, double a) {
return x * (y / a);
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t 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;
assert z < t;
public static double code(double x, double y, double z, double t, double a) {
return x * (y / a);
}
[x, y] = sort([x, y]) [z, t] = sort([z, t]) def code(x, y, z, t, a): return x * (y / a)
x, y = sort([x, y]) z, t = sort([z, t]) function code(x, y, z, t, a) return Float64(x * Float64(y / a)) end
x, y = num2cell(sort([x, y])){:}
z, t = num2cell(sort([z, t])){:}
function tmp = code(x, y, z, t, a)
tmp = x * (y / a);
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: z and t 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] = \mathsf{sort}([x, y])\\
[z, t] = \mathsf{sort}([z, t])\\
\\
x \cdot \frac{y}{a}
\end{array}
Initial program 91.3%
Taylor expanded in x around 0 89.0%
Taylor expanded in t around 0 52.7%
associate-*r/55.6%
Simplified55.6%
Final simplification55.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 2023336
(FPCore (x y z t a)
:name "Data.Colour.Matrix:inverse from colour-2.3.3, B"
:precision binary64
:herbie-target
(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))