
(FPCore (x y z t a) :precision binary64 (/ (- (* x y) (* z t)) a))
double code(double x, double y, double z, double t, double a) {
return ((x * y) - (z * t)) / a;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((x * y) - (z * t)) / a
end function
public static double code(double x, double y, double z, double t, double a) {
return ((x * y) - (z * t)) / a;
}
def code(x, y, z, t, a): return ((x * y) - (z * t)) / a
function code(x, y, z, t, a) return Float64(Float64(Float64(x * y) - Float64(z * t)) / a) end
function tmp = code(x, y, z, t, a) tmp = ((x * y) - (z * t)) / a; end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y - z \cdot t}{a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 10 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (/ (- (* x y) (* z t)) a))
double code(double x, double y, double z, double t, double a) {
return ((x * y) - (z * t)) / a;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((x * y) - (z * t)) / a
end function
public static double code(double x, double y, double z, double t, double a) {
return ((x * y) - (z * t)) / a;
}
def code(x, y, z, t, a): return ((x * y) - (z * t)) / a
function code(x, y, z, t, a) return Float64(Float64(Float64(x * y) - Float64(z * t)) / a) end
function tmp = code(x, y, z, t, a) tmp = ((x * y) - (z * t)) / a; end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y - z \cdot t}{a}
\end{array}
NOTE: x and y 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 -2e+300) (not (<= t_1 4e+260)))
(fma x (/ y a) (/ (- z) (/ a t)))
(/ t_1 a))))assert(x < y);
double code(double x, double y, double z, double t, double a) {
double t_1 = (x * y) - (z * t);
double tmp;
if ((t_1 <= -2e+300) || !(t_1 <= 4e+260)) {
tmp = fma(x, (y / a), (-z / (a / t)));
} else {
tmp = t_1 / a;
}
return tmp;
}
x, y = sort([x, y]) function code(x, y, z, t, a) t_1 = Float64(Float64(x * y) - Float64(z * t)) tmp = 0.0 if ((t_1 <= -2e+300) || !(t_1 <= 4e+260)) tmp = fma(x, Float64(y / a), Float64(Float64(-z) / Float64(a / t))); else tmp = Float64(t_1 / a); end return tmp end
NOTE: x and y 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, -2e+300], N[Not[LessEqual[t$95$1, 4e+260]], $MachinePrecision]], N[(x * N[(y / a), $MachinePrecision] + N[((-z) / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / a), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := x \cdot y - z \cdot t\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{+300} \lor \neg \left(t_1 \leq 4 \cdot 10^{+260}\right):\\
\;\;\;\;\mathsf{fma}\left(x, \frac{y}{a}, \frac{-z}{\frac{a}{t}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{a}\\
\end{array}
\end{array}
if (-.f64 (*.f64 x y) (*.f64 z t)) < -2.0000000000000001e300 or 4.00000000000000026e260 < (-.f64 (*.f64 x y) (*.f64 z t)) Initial program 69.8%
div-sub65.5%
*-un-lft-identity65.5%
times-frac80.4%
fma-neg83.3%
associate-/l*96.9%
Applied egg-rr96.9%
if -2.0000000000000001e300 < (-.f64 (*.f64 x y) (*.f64 z t)) < 4.00000000000000026e260Initial program 97.6%
Final simplification97.4%
NOTE: x and y 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 -2e+300)
(fma -1.0 (/ t (/ a z)) (/ y (/ a x)))
(if (<= t_1 5e+307) (/ t_1 a) (- (/ x (/ a y)) (/ z (/ a t)))))))assert(x < y);
double code(double x, double y, double z, double t, double a) {
double t_1 = (x * y) - (z * t);
double tmp;
if (t_1 <= -2e+300) {
tmp = fma(-1.0, (t / (a / z)), (y / (a / x)));
} else if (t_1 <= 5e+307) {
tmp = t_1 / a;
} else {
tmp = (x / (a / y)) - (z / (a / t));
}
return tmp;
}
x, y = sort([x, y]) function code(x, y, z, t, a) t_1 = Float64(Float64(x * y) - Float64(z * t)) tmp = 0.0 if (t_1 <= -2e+300) tmp = fma(-1.0, Float64(t / Float64(a / z)), Float64(y / Float64(a / x))); elseif (t_1 <= 5e+307) tmp = Float64(t_1 / a); else tmp = Float64(Float64(x / Float64(a / y)) - Float64(z / Float64(a / t))); end return tmp end
NOTE: x and y 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, -2e+300], N[(-1.0 * N[(t / N[(a / z), $MachinePrecision]), $MachinePrecision] + N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+307], N[(t$95$1 / a), $MachinePrecision], N[(N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision] - N[(z / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := x \cdot y - z \cdot t\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{+300}:\\
\;\;\;\;\mathsf{fma}\left(-1, \frac{t}{\frac{a}{z}}, \frac{y}{\frac{a}{x}}\right)\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+307}:\\
\;\;\;\;\frac{t_1}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{a}{y}} - \frac{z}{\frac{a}{t}}\\
\end{array}
\end{array}
if (-.f64 (*.f64 x y) (*.f64 z t)) < -2.0000000000000001e300Initial program 69.5%
Taylor expanded in x around 0 66.3%
fma-def66.3%
associate-/l*75.2%
associate-/l*93.3%
Simplified93.3%
if -2.0000000000000001e300 < (-.f64 (*.f64 x y) (*.f64 z t)) < 5e307Initial program 97.7%
if 5e307 < (-.f64 (*.f64 x y) (*.f64 z t)) Initial program 64.5%
div-sub58.2%
associate-/l*72.8%
associate-/l*90.5%
Applied egg-rr90.5%
Final simplification96.2%
NOTE: x and y 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 (- INFINITY)) (not (<= t_1 5e+307)))
(- (/ x (/ a y)) (/ z (/ a t)))
(/ t_1 a))))assert(x < y);
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)) || !(t_1 <= 5e+307)) {
tmp = (x / (a / y)) - (z / (a / t));
} else {
tmp = t_1 / a;
}
return tmp;
}
assert x < y;
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) || !(t_1 <= 5e+307)) {
tmp = (x / (a / y)) - (z / (a / t));
} else {
tmp = t_1 / a;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a): t_1 = (x * y) - (z * t) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 5e+307): tmp = (x / (a / y)) - (z / (a / t)) else: tmp = t_1 / a return tmp
x, y = sort([x, y]) function code(x, y, z, t, a) t_1 = Float64(Float64(x * y) - Float64(z * t)) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 5e+307)) tmp = Float64(Float64(x / Float64(a / y)) - Float64(z / Float64(a / t))); else tmp = Float64(t_1 / a); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
t_1 = (x * y) - (z * t);
tmp = 0.0;
if ((t_1 <= -Inf) || ~((t_1 <= 5e+307)))
tmp = (x / (a / y)) - (z / (a / t));
else
tmp = t_1 / a;
end
tmp_2 = tmp;
end
NOTE: x and y 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, (-Infinity)], N[Not[LessEqual[t$95$1, 5e+307]], $MachinePrecision]], N[(N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision] - N[(z / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / a), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := x \cdot y - z \cdot t\\
\mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq 5 \cdot 10^{+307}\right):\\
\;\;\;\;\frac{x}{\frac{a}{y}} - \frac{z}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{a}\\
\end{array}
\end{array}
if (-.f64 (*.f64 x y) (*.f64 z t)) < -inf.0 or 5e307 < (-.f64 (*.f64 x y) (*.f64 z t)) Initial program 65.9%
div-sub61.0%
associate-/l*77.8%
associate-/l*93.2%
Applied egg-rr93.2%
if -inf.0 < (-.f64 (*.f64 x y) (*.f64 z t)) < 5e307Initial program 97.7%
Final simplification96.6%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
:precision binary64
(if (<= (* x y) -2e+50)
(/ y (/ a x))
(if (<= (* x y) -1.85e-20)
(* (- t) (/ z a))
(if (<= (* x y) -5e-119)
(* y (/ x a))
(if (<= (* x y) 0.0)
(/ (- t) (/ a z))
(if (<= (* x y) 4e-89) (/ (- (* z t)) a) (* x (/ y a))))))))assert(x < y);
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -2e+50) {
tmp = y / (a / x);
} else if ((x * y) <= -1.85e-20) {
tmp = -t * (z / a);
} else if ((x * y) <= -5e-119) {
tmp = y * (x / a);
} else if ((x * y) <= 0.0) {
tmp = -t / (a / z);
} else if ((x * y) <= 4e-89) {
tmp = -(z * t) / a;
} else {
tmp = x * (y / a);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x * y) <= (-2d+50)) then
tmp = y / (a / x)
else if ((x * y) <= (-1.85d-20)) then
tmp = -t * (z / a)
else if ((x * y) <= (-5d-119)) then
tmp = y * (x / a)
else if ((x * y) <= 0.0d0) then
tmp = -t / (a / z)
else if ((x * y) <= 4d-89) then
tmp = -(z * t) / a
else
tmp = x * (y / a)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -2e+50) {
tmp = y / (a / x);
} else if ((x * y) <= -1.85e-20) {
tmp = -t * (z / a);
} else if ((x * y) <= -5e-119) {
tmp = y * (x / a);
} else if ((x * y) <= 0.0) {
tmp = -t / (a / z);
} else if ((x * y) <= 4e-89) {
tmp = -(z * t) / a;
} else {
tmp = x * (y / a);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a): tmp = 0 if (x * y) <= -2e+50: tmp = y / (a / x) elif (x * y) <= -1.85e-20: tmp = -t * (z / a) elif (x * y) <= -5e-119: tmp = y * (x / a) elif (x * y) <= 0.0: tmp = -t / (a / z) elif (x * y) <= 4e-89: tmp = -(z * t) / a else: tmp = x * (y / a) return tmp
x, y = sort([x, y]) function code(x, y, z, t, a) tmp = 0.0 if (Float64(x * y) <= -2e+50) tmp = Float64(y / Float64(a / x)); elseif (Float64(x * y) <= -1.85e-20) tmp = Float64(Float64(-t) * Float64(z / a)); elseif (Float64(x * y) <= -5e-119) tmp = Float64(y * Float64(x / a)); elseif (Float64(x * y) <= 0.0) tmp = Float64(Float64(-t) / Float64(a / z)); elseif (Float64(x * y) <= 4e-89) tmp = Float64(Float64(-Float64(z * t)) / a); else tmp = Float64(x * Float64(y / a)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if ((x * y) <= -2e+50)
tmp = y / (a / x);
elseif ((x * y) <= -1.85e-20)
tmp = -t * (z / a);
elseif ((x * y) <= -5e-119)
tmp = y * (x / a);
elseif ((x * y) <= 0.0)
tmp = -t / (a / z);
elseif ((x * y) <= 4e-89)
tmp = -(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. code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x * y), $MachinePrecision], -2e+50], N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -1.85e-20], N[((-t) * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -5e-119], N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 0.0], N[((-t) / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 4e-89], N[((-N[(z * t), $MachinePrecision]) / a), $MachinePrecision], N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+50}:\\
\;\;\;\;\frac{y}{\frac{a}{x}}\\
\mathbf{elif}\;x \cdot y \leq -1.85 \cdot 10^{-20}:\\
\;\;\;\;\left(-t\right) \cdot \frac{z}{a}\\
\mathbf{elif}\;x \cdot y \leq -5 \cdot 10^{-119}:\\
\;\;\;\;y \cdot \frac{x}{a}\\
\mathbf{elif}\;x \cdot y \leq 0:\\
\;\;\;\;\frac{-t}{\frac{a}{z}}\\
\mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{-89}:\\
\;\;\;\;\frac{-z \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{a}\\
\end{array}
\end{array}
if (*.f64 x y) < -2.0000000000000002e50Initial program 82.6%
Taylor expanded in x around inf 76.8%
associate-/l*84.3%
Simplified84.3%
if -2.0000000000000002e50 < (*.f64 x y) < -1.85e-20Initial program 99.7%
Taylor expanded in x around 0 65.8%
associate-*r/65.8%
mul-1-neg65.8%
distribute-rgt-neg-out65.8%
*-commutative65.8%
associate-/l*65.6%
associate-/r/59.1%
Simplified59.1%
if -1.85e-20 < (*.f64 x y) < -4.99999999999999993e-119Initial program 93.1%
Taylor expanded in x around inf 65.3%
associate-*r/72.0%
Simplified72.0%
if -4.99999999999999993e-119 < (*.f64 x y) < 0.0Initial program 85.8%
Taylor expanded in x around 0 78.9%
associate-*r/78.9%
mul-1-neg78.9%
distribute-rgt-neg-out78.9%
*-commutative78.9%
associate-/l*86.4%
associate-/r/85.9%
Simplified85.9%
associate-*l/78.9%
*-commutative78.9%
add-sqr-sqrt46.9%
sqrt-unprod39.6%
sqr-neg39.6%
sqrt-unprod3.1%
add-sqr-sqrt14.0%
associate-/l*14.0%
Applied egg-rr14.0%
associate-/r/13.9%
Applied egg-rr13.9%
div-inv13.9%
add-sqr-sqrt7.9%
sqrt-unprod50.1%
sqr-neg50.1%
sqrt-unprod56.1%
add-sqr-sqrt85.8%
associate-*r*85.9%
associate-/r/85.7%
un-div-inv85.9%
frac-2neg85.9%
distribute-frac-neg85.9%
remove-double-neg85.9%
Applied egg-rr85.9%
if 0.0 < (*.f64 x y) < 4.00000000000000015e-89Initial program 97.8%
Taylor expanded in x around 0 85.1%
associate-*r/85.1%
associate-*r*85.1%
neg-mul-185.1%
Simplified85.1%
if 4.00000000000000015e-89 < (*.f64 x y) Initial program 89.7%
Taylor expanded in x around inf 68.2%
associate-*r/69.7%
Simplified69.7%
associate-*r/68.2%
clear-num68.1%
*-commutative68.1%
Applied egg-rr68.1%
*-commutative68.1%
clear-num68.2%
*-commutative68.2%
associate-*r/63.4%
*-commutative63.4%
Applied egg-rr63.4%
Final simplification75.8%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* z (- (/ t a)))))
(if (<= z -4.3e+57)
t_1
(if (<= z -3.15e-21)
(* y (/ x a))
(if (or (<= z -4e-38) (not (<= z 5.6e-130))) t_1 (/ (* x y) a))))))assert(x < y);
double code(double x, double y, double z, double t, double a) {
double t_1 = z * -(t / a);
double tmp;
if (z <= -4.3e+57) {
tmp = t_1;
} else if (z <= -3.15e-21) {
tmp = y * (x / a);
} else if ((z <= -4e-38) || !(z <= 5.6e-130)) {
tmp = t_1;
} else {
tmp = (x * y) / a;
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = z * -(t / a)
if (z <= (-4.3d+57)) then
tmp = t_1
else if (z <= (-3.15d-21)) then
tmp = y * (x / a)
else if ((z <= (-4d-38)) .or. (.not. (z <= 5.6d-130))) then
tmp = t_1
else
tmp = (x * y) / a
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a) {
double t_1 = z * -(t / a);
double tmp;
if (z <= -4.3e+57) {
tmp = t_1;
} else if (z <= -3.15e-21) {
tmp = y * (x / a);
} else if ((z <= -4e-38) || !(z <= 5.6e-130)) {
tmp = t_1;
} else {
tmp = (x * y) / a;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a): t_1 = z * -(t / a) tmp = 0 if z <= -4.3e+57: tmp = t_1 elif z <= -3.15e-21: tmp = y * (x / a) elif (z <= -4e-38) or not (z <= 5.6e-130): tmp = t_1 else: tmp = (x * y) / a return tmp
x, y = sort([x, y]) function code(x, y, z, t, a) t_1 = Float64(z * Float64(-Float64(t / a))) tmp = 0.0 if (z <= -4.3e+57) tmp = t_1; elseif (z <= -3.15e-21) tmp = Float64(y * Float64(x / a)); elseif ((z <= -4e-38) || !(z <= 5.6e-130)) tmp = t_1; else tmp = Float64(Float64(x * y) / a); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
t_1 = z * -(t / a);
tmp = 0.0;
if (z <= -4.3e+57)
tmp = t_1;
elseif (z <= -3.15e-21)
tmp = y * (x / a);
elseif ((z <= -4e-38) || ~((z <= 5.6e-130)))
tmp = t_1;
else
tmp = (x * y) / a;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * (-N[(t / a), $MachinePrecision])), $MachinePrecision]}, If[LessEqual[z, -4.3e+57], t$95$1, If[LessEqual[z, -3.15e-21], N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -4e-38], N[Not[LessEqual[z, 5.6e-130]], $MachinePrecision]], t$95$1, N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := z \cdot \left(-\frac{t}{a}\right)\\
\mathbf{if}\;z \leq -4.3 \cdot 10^{+57}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3.15 \cdot 10^{-21}:\\
\;\;\;\;y \cdot \frac{x}{a}\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-38} \lor \neg \left(z \leq 5.6 \cdot 10^{-130}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{a}\\
\end{array}
\end{array}
if z < -4.30000000000000033e57 or -3.15e-21 < z < -3.9999999999999998e-38 or 5.60000000000000032e-130 < z Initial program 87.7%
Taylor expanded in x around 0 58.2%
associate-*r/58.2%
mul-1-neg58.2%
distribute-rgt-neg-out58.2%
*-commutative58.2%
associate-/l*62.6%
associate-/r/63.6%
Simplified63.6%
associate-*l/58.2%
*-commutative58.2%
add-sqr-sqrt24.0%
sqrt-unprod23.3%
sqr-neg23.3%
sqrt-unprod2.7%
add-sqr-sqrt3.8%
associate-/l*6.5%
Applied egg-rr6.5%
add-sqr-sqrt3.7%
sqrt-unprod27.5%
sqr-neg27.5%
sqrt-unprod30.8%
add-sqr-sqrt63.5%
distribute-frac-neg63.5%
associate-/r/62.2%
distribute-rgt-neg-in62.2%
Applied egg-rr62.2%
if -4.30000000000000033e57 < z < -3.15e-21Initial program 92.2%
Taylor expanded in x around inf 63.6%
associate-*r/55.7%
Simplified55.7%
if -3.9999999999999998e-38 < z < 5.60000000000000032e-130Initial program 93.1%
Taylor expanded in x around inf 66.5%
Final simplification63.7%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- t) (/ z a))))
(if (<= z -4.2e+57)
t_1
(if (<= z -4.45e-17)
(* y (/ x a))
(if (<= z -1.2e-40)
(* z (- (/ t a)))
(if (<= z 1.3e-130) (/ (* x y) a) t_1))))))assert(x < y);
double code(double x, double y, double z, double t, double a) {
double t_1 = -t * (z / a);
double tmp;
if (z <= -4.2e+57) {
tmp = t_1;
} else if (z <= -4.45e-17) {
tmp = y * (x / a);
} else if (z <= -1.2e-40) {
tmp = z * -(t / a);
} else if (z <= 1.3e-130) {
tmp = (x * y) / a;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = -t * (z / a)
if (z <= (-4.2d+57)) then
tmp = t_1
else if (z <= (-4.45d-17)) then
tmp = y * (x / a)
else if (z <= (-1.2d-40)) then
tmp = z * -(t / a)
else if (z <= 1.3d-130) then
tmp = (x * y) / a
else
tmp = t_1
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -t * (z / a);
double tmp;
if (z <= -4.2e+57) {
tmp = t_1;
} else if (z <= -4.45e-17) {
tmp = y * (x / a);
} else if (z <= -1.2e-40) {
tmp = z * -(t / a);
} else if (z <= 1.3e-130) {
tmp = (x * y) / a;
} else {
tmp = t_1;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a): t_1 = -t * (z / a) tmp = 0 if z <= -4.2e+57: tmp = t_1 elif z <= -4.45e-17: tmp = y * (x / a) elif z <= -1.2e-40: tmp = z * -(t / a) elif z <= 1.3e-130: tmp = (x * y) / a else: tmp = t_1 return tmp
x, y = sort([x, y]) function code(x, y, z, t, a) t_1 = Float64(Float64(-t) * Float64(z / a)) tmp = 0.0 if (z <= -4.2e+57) tmp = t_1; elseif (z <= -4.45e-17) tmp = Float64(y * Float64(x / a)); elseif (z <= -1.2e-40) tmp = Float64(z * Float64(-Float64(t / a))); elseif (z <= 1.3e-130) tmp = Float64(Float64(x * y) / a); else tmp = t_1; end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
t_1 = -t * (z / a);
tmp = 0.0;
if (z <= -4.2e+57)
tmp = t_1;
elseif (z <= -4.45e-17)
tmp = y * (x / a);
elseif (z <= -1.2e-40)
tmp = z * -(t / a);
elseif (z <= 1.3e-130)
tmp = (x * y) / a;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-t) * N[(z / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.2e+57], t$95$1, If[LessEqual[z, -4.45e-17], N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.2e-40], N[(z * (-N[(t / a), $MachinePrecision])), $MachinePrecision], If[LessEqual[z, 1.3e-130], N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := \left(-t\right) \cdot \frac{z}{a}\\
\mathbf{if}\;z \leq -4.2 \cdot 10^{+57}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4.45 \cdot 10^{-17}:\\
\;\;\;\;y \cdot \frac{x}{a}\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{-40}:\\
\;\;\;\;z \cdot \left(-\frac{t}{a}\right)\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-130}:\\
\;\;\;\;\frac{x \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -4.19999999999999982e57 or 1.3e-130 < z Initial program 87.6%
Taylor expanded in x around 0 58.1%
associate-*r/58.1%
mul-1-neg58.1%
distribute-rgt-neg-out58.1%
*-commutative58.1%
associate-/l*62.5%
associate-/r/63.5%
Simplified63.5%
if -4.19999999999999982e57 < z < -4.4500000000000002e-17Initial program 92.2%
Taylor expanded in x around inf 63.6%
associate-*r/55.7%
Simplified55.7%
if -4.4500000000000002e-17 < z < -1.19999999999999996e-40Initial program 99.2%
Taylor expanded in x around 0 70.5%
associate-*r/70.5%
mul-1-neg70.5%
distribute-rgt-neg-out70.5%
*-commutative70.5%
associate-/l*70.5%
associate-/r/70.5%
Simplified70.5%
associate-*l/70.5%
*-commutative70.5%
add-sqr-sqrt70.5%
sqrt-unprod70.5%
sqr-neg70.5%
sqrt-unprod0.0%
add-sqr-sqrt0.9%
associate-/l*0.9%
Applied egg-rr0.9%
add-sqr-sqrt0.9%
sqrt-unprod0.4%
sqr-neg0.4%
sqrt-unprod0.0%
add-sqr-sqrt70.5%
distribute-frac-neg70.5%
associate-/r/70.5%
distribute-rgt-neg-in70.5%
Applied egg-rr70.5%
if -1.19999999999999996e-40 < z < 1.3e-130Initial program 93.1%
Taylor expanded in x around inf 66.5%
Final simplification64.4%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
:precision binary64
(if (<= z -3e+57)
(/ (- t) (/ a z))
(if (<= z -3.7e-14)
(* y (/ x a))
(if (<= z -1.2e-37)
(* z (- (/ t a)))
(if (<= z 6.8e-130) (/ (* x y) a) (* (- t) (/ z a)))))))assert(x < y);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3e+57) {
tmp = -t / (a / z);
} else if (z <= -3.7e-14) {
tmp = y * (x / a);
} else if (z <= -1.2e-37) {
tmp = z * -(t / a);
} else if (z <= 6.8e-130) {
tmp = (x * y) / a;
} else {
tmp = -t * (z / a);
}
return tmp;
}
NOTE: x and y 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 (z <= (-3d+57)) then
tmp = -t / (a / z)
else if (z <= (-3.7d-14)) then
tmp = y * (x / a)
else if (z <= (-1.2d-37)) then
tmp = z * -(t / a)
else if (z <= 6.8d-130) then
tmp = (x * y) / a
else
tmp = -t * (z / a)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3e+57) {
tmp = -t / (a / z);
} else if (z <= -3.7e-14) {
tmp = y * (x / a);
} else if (z <= -1.2e-37) {
tmp = z * -(t / a);
} else if (z <= 6.8e-130) {
tmp = (x * y) / a;
} else {
tmp = -t * (z / a);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a): tmp = 0 if z <= -3e+57: tmp = -t / (a / z) elif z <= -3.7e-14: tmp = y * (x / a) elif z <= -1.2e-37: tmp = z * -(t / a) elif z <= 6.8e-130: tmp = (x * y) / a else: tmp = -t * (z / a) return tmp
x, y = sort([x, y]) function code(x, y, z, t, a) tmp = 0.0 if (z <= -3e+57) tmp = Float64(Float64(-t) / Float64(a / z)); elseif (z <= -3.7e-14) tmp = Float64(y * Float64(x / a)); elseif (z <= -1.2e-37) tmp = Float64(z * Float64(-Float64(t / a))); elseif (z <= 6.8e-130) tmp = Float64(Float64(x * y) / a); else tmp = Float64(Float64(-t) * Float64(z / a)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (z <= -3e+57)
tmp = -t / (a / z);
elseif (z <= -3.7e-14)
tmp = y * (x / a);
elseif (z <= -1.2e-37)
tmp = z * -(t / a);
elseif (z <= 6.8e-130)
tmp = (x * y) / a;
else
tmp = -t * (z / a);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3e+57], N[((-t) / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.7e-14], N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.2e-37], N[(z * (-N[(t / a), $MachinePrecision])), $MachinePrecision], If[LessEqual[z, 6.8e-130], N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision], N[((-t) * N[(z / a), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{+57}:\\
\;\;\;\;\frac{-t}{\frac{a}{z}}\\
\mathbf{elif}\;z \leq -3.7 \cdot 10^{-14}:\\
\;\;\;\;y \cdot \frac{x}{a}\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{-37}:\\
\;\;\;\;z \cdot \left(-\frac{t}{a}\right)\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-130}:\\
\;\;\;\;\frac{x \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;\left(-t\right) \cdot \frac{z}{a}\\
\end{array}
\end{array}
if z < -3e57Initial program 82.3%
Taylor expanded in x around 0 66.4%
associate-*r/66.4%
mul-1-neg66.4%
distribute-rgt-neg-out66.4%
*-commutative66.4%
associate-/l*77.7%
associate-/r/74.1%
Simplified74.1%
associate-*l/66.4%
*-commutative66.4%
add-sqr-sqrt66.3%
sqrt-unprod52.7%
sqr-neg52.7%
sqrt-unprod0.0%
add-sqr-sqrt3.2%
associate-/l*9.0%
Applied egg-rr9.0%
associate-/r/3.3%
Applied egg-rr3.3%
div-inv3.3%
add-sqr-sqrt2.7%
sqrt-unprod38.0%
sqr-neg38.0%
sqrt-unprod44.7%
add-sqr-sqrt77.7%
associate-*r*74.0%
associate-/r/74.0%
un-div-inv74.0%
frac-2neg74.0%
distribute-frac-neg74.0%
remove-double-neg74.0%
Applied egg-rr74.0%
if -3e57 < z < -3.70000000000000001e-14Initial program 92.2%
Taylor expanded in x around inf 63.6%
associate-*r/55.7%
Simplified55.7%
if -3.70000000000000001e-14 < z < -1.19999999999999995e-37Initial program 99.2%
Taylor expanded in x around 0 70.5%
associate-*r/70.5%
mul-1-neg70.5%
distribute-rgt-neg-out70.5%
*-commutative70.5%
associate-/l*70.5%
associate-/r/70.5%
Simplified70.5%
associate-*l/70.5%
*-commutative70.5%
add-sqr-sqrt70.5%
sqrt-unprod70.5%
sqr-neg70.5%
sqrt-unprod0.0%
add-sqr-sqrt0.9%
associate-/l*0.9%
Applied egg-rr0.9%
add-sqr-sqrt0.9%
sqrt-unprod0.4%
sqr-neg0.4%
sqrt-unprod0.0%
add-sqr-sqrt70.5%
distribute-frac-neg70.5%
associate-/r/70.5%
distribute-rgt-neg-in70.5%
Applied egg-rr70.5%
if -1.19999999999999995e-37 < z < 6.8000000000000001e-130Initial program 93.1%
Taylor expanded in x around inf 66.5%
if 6.8000000000000001e-130 < z Initial program 90.4%
Taylor expanded in x around 0 53.5%
associate-*r/53.5%
mul-1-neg53.5%
distribute-rgt-neg-out53.5%
*-commutative53.5%
associate-/l*54.1%
associate-/r/57.7%
Simplified57.7%
Final simplification64.4%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= (* z t) (- INFINITY)) (/ (- t) (/ a z)) (/ (- (* x y) (* z t)) a)))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z * t) <= -((double) INFINITY)) {
tmp = -t / (a / z);
} else {
tmp = ((x * y) - (z * t)) / a;
}
return tmp;
}
assert x < y;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z * t) <= -Double.POSITIVE_INFINITY) {
tmp = -t / (a / z);
} else {
tmp = ((x * y) - (z * t)) / a;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a): tmp = 0 if (z * t) <= -math.inf: tmp = -t / (a / z) else: tmp = ((x * y) - (z * t)) / a return tmp
x, y = sort([x, y]) function code(x, y, z, t, a) tmp = 0.0 if (Float64(z * t) <= Float64(-Inf)) tmp = Float64(Float64(-t) / Float64(a / z)); else tmp = Float64(Float64(Float64(x * y) - Float64(z * t)) / a); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if ((z * t) <= -Inf)
tmp = -t / (a / z);
else
tmp = ((x * y) - (z * t)) / a;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[LessEqual[N[(z * t), $MachinePrecision], (-Infinity)], N[((-t) / N[(a / z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \cdot t \leq -\infty:\\
\;\;\;\;\frac{-t}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y - z \cdot t}{a}\\
\end{array}
\end{array}
if (*.f64 z t) < -inf.0Initial program 58.3%
Taylor expanded in x around 0 64.5%
associate-*r/64.5%
mul-1-neg64.5%
distribute-rgt-neg-out64.5%
*-commutative64.5%
associate-/l*100.0%
associate-/r/99.8%
Simplified99.8%
associate-*l/64.5%
*-commutative64.5%
add-sqr-sqrt39.0%
sqrt-unprod39.0%
sqr-neg39.0%
sqrt-unprod0.0%
add-sqr-sqrt0.1%
associate-/l*0.2%
Applied egg-rr0.2%
associate-/r/0.2%
Applied egg-rr0.2%
div-inv0.2%
add-sqr-sqrt0.0%
sqrt-unprod44.2%
sqr-neg44.2%
sqrt-unprod62.1%
add-sqr-sqrt99.8%
associate-*r*99.7%
associate-/r/99.6%
un-div-inv99.9%
frac-2neg99.9%
distribute-frac-neg99.9%
remove-double-neg99.9%
Applied egg-rr99.9%
if -inf.0 < (*.f64 z t) Initial program 92.2%
Final simplification92.7%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= y 8e-145) (* y (/ x a)) (* x (/ y a))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 8e-145) {
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.
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= 8d-145) then
tmp = y * (x / a)
else
tmp = x * (y / a)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 8e-145) {
tmp = y * (x / a);
} else {
tmp = x * (y / a);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a): tmp = 0 if y <= 8e-145: tmp = y * (x / a) else: tmp = x * (y / a) return tmp
x, y = sort([x, y]) function code(x, y, z, t, a) tmp = 0.0 if (y <= 8e-145) tmp = Float64(y * Float64(x / a)); else tmp = Float64(x * Float64(y / a)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (y <= 8e-145)
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. code[x_, y_, z_, t_, a_] := If[LessEqual[y, 8e-145], N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision], N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 8 \cdot 10^{-145}:\\
\;\;\;\;y \cdot \frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{a}\\
\end{array}
\end{array}
if y < 7.99999999999999932e-145Initial program 89.0%
Taylor expanded in x around inf 46.8%
associate-*r/48.0%
Simplified48.0%
if 7.99999999999999932e-145 < y Initial program 91.8%
Taylor expanded in x around inf 57.1%
associate-*r/59.3%
Simplified59.3%
associate-*r/57.1%
clear-num57.0%
*-commutative57.0%
Applied egg-rr57.0%
*-commutative57.0%
clear-num57.1%
*-commutative57.1%
associate-*r/57.0%
*-commutative57.0%
Applied egg-rr57.0%
Final simplification51.4%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (* y (/ x a)))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
return y * (x / a);
}
NOTE: x and y 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 = y * (x / a)
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a) {
return y * (x / a);
}
[x, y] = sort([x, y]) def code(x, y, z, t, a): return y * (x / a)
x, y = sort([x, y]) function code(x, y, z, t, a) return Float64(y * Float64(x / a)) end
x, y = num2cell(sort([x, y])){:}
function tmp = code(x, y, z, t, a)
tmp = y * (x / a);
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
y \cdot \frac{x}{a}
\end{array}
Initial program 90.1%
Taylor expanded in x around inf 50.7%
associate-*r/52.3%
Simplified52.3%
Final simplification52.3%
(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 2023182
(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))