
(FPCore (x y z t a) :precision binary64 (/ (* (* x y) z) (sqrt (- (* z z) (* t a)))))
double code(double x, double y, double z, double t, double a) {
return ((x * y) * z) / sqrt(((z * 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) / sqrt(((z * z) - (t * a)))
end function
public static double code(double x, double y, double z, double t, double a) {
return ((x * y) * z) / Math.sqrt(((z * z) - (t * a)));
}
def code(x, y, z, t, a): return ((x * y) * z) / math.sqrt(((z * z) - (t * a)))
function code(x, y, z, t, a) return Float64(Float64(Float64(x * y) * z) / sqrt(Float64(Float64(z * z) - Float64(t * a)))) end
function tmp = code(x, y, z, t, a) tmp = ((x * y) * z) / sqrt(((z * z) - (t * a))); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision] / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (/ (* (* x y) z) (sqrt (- (* z z) (* t a)))))
double code(double x, double y, double z, double t, double a) {
return ((x * y) * z) / sqrt(((z * 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) / sqrt(((z * z) - (t * a)))
end function
public static double code(double x, double y, double z, double t, double a) {
return ((x * y) * z) / Math.sqrt(((z * z) - (t * a)));
}
def code(x, y, z, t, a): return ((x * y) * z) / math.sqrt(((z * z) - (t * a)))
function code(x, y, z, t, a) return Float64(Float64(Float64(x * y) * z) / sqrt(Float64(Float64(z * z) - Float64(t * a)))) end
function tmp = code(x, y, z, t, a) tmp = ((x * y) * z) / sqrt(((z * z) - (t * a))); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision] / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot 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
(if (<= z -5e+154)
(* x (* (/ z (- (* 0.5 (* a (/ t z))) z)) y))
(if (<= z 8e+116)
(* y (* x (/ z (sqrt (- (pow z 2.0) (* a t))))))
(* x y))))assert(x < y);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5e+154) {
tmp = x * ((z / ((0.5 * (a * (t / z))) - z)) * y);
} else if (z <= 8e+116) {
tmp = y * (x * (z / sqrt((pow(z, 2.0) - (a * t)))));
} else {
tmp = x * y;
}
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 <= (-5d+154)) then
tmp = x * ((z / ((0.5d0 * (a * (t / z))) - z)) * y)
else if (z <= 8d+116) then
tmp = y * (x * (z / sqrt(((z ** 2.0d0) - (a * t)))))
else
tmp = x * y
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 <= -5e+154) {
tmp = x * ((z / ((0.5 * (a * (t / z))) - z)) * y);
} else if (z <= 8e+116) {
tmp = y * (x * (z / Math.sqrt((Math.pow(z, 2.0) - (a * t)))));
} else {
tmp = x * y;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a): tmp = 0 if z <= -5e+154: tmp = x * ((z / ((0.5 * (a * (t / z))) - z)) * y) elif z <= 8e+116: tmp = y * (x * (z / math.sqrt((math.pow(z, 2.0) - (a * t))))) else: tmp = x * y return tmp
x, y = sort([x, y]) function code(x, y, z, t, a) tmp = 0.0 if (z <= -5e+154) tmp = Float64(x * Float64(Float64(z / Float64(Float64(0.5 * Float64(a * Float64(t / z))) - z)) * y)); elseif (z <= 8e+116) tmp = Float64(y * Float64(x * Float64(z / sqrt(Float64((z ^ 2.0) - Float64(a * t)))))); else tmp = Float64(x * y); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (z <= -5e+154)
tmp = x * ((z / ((0.5 * (a * (t / z))) - z)) * y);
elseif (z <= 8e+116)
tmp = y * (x * (z / sqrt(((z ^ 2.0) - (a * t)))));
else
tmp = x * y;
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, -5e+154], N[(x * N[(N[(z / N[(N[(0.5 * N[(a * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e+116], N[(y * N[(x * N[(z / N[Sqrt[N[(N[Power[z, 2.0], $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+154}:\\
\;\;\;\;x \cdot \left(\frac{z}{0.5 \cdot \left(a \cdot \frac{t}{z}\right) - z} \cdot y\right)\\
\mathbf{elif}\;z \leq 8 \cdot 10^{+116}:\\
\;\;\;\;y \cdot \left(x \cdot \frac{z}{\sqrt{{z}^{2} - a \cdot t}}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -5.00000000000000004e154Initial program 4.7%
associate-*l*4.4%
associate-*r/4.7%
*-commutative4.7%
associate-/l*5.6%
Simplified5.6%
associate-/r/5.6%
pow25.6%
Applied egg-rr5.6%
Taylor expanded in z around -inf 95.3%
+-commutative95.3%
mul-1-neg95.3%
unsub-neg95.3%
associate-*r/97.8%
Simplified97.8%
if -5.00000000000000004e154 < z < 8.00000000000000012e116Initial program 84.4%
associate-*l/81.6%
associate-/l*77.5%
associate-*l/79.8%
associate-*r/81.4%
associate-/r/87.2%
associate-*r*88.3%
pow288.3%
Applied egg-rr88.3%
if 8.00000000000000012e116 < z Initial program 27.4%
Taylor expanded in z around inf 98.2%
Final simplification91.7%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
:precision binary64
(if (<= z -5e+154)
(* x (* (/ z (- (* 0.5 (* a (/ t z))) z)) y))
(if (<= z 5e+117)
(* x (* y (/ z (sqrt (- (pow z 2.0) (* a t))))))
(* x y))))assert(x < y);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5e+154) {
tmp = x * ((z / ((0.5 * (a * (t / z))) - z)) * y);
} else if (z <= 5e+117) {
tmp = x * (y * (z / sqrt((pow(z, 2.0) - (a * t)))));
} else {
tmp = x * y;
}
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 <= (-5d+154)) then
tmp = x * ((z / ((0.5d0 * (a * (t / z))) - z)) * y)
else if (z <= 5d+117) then
tmp = x * (y * (z / sqrt(((z ** 2.0d0) - (a * t)))))
else
tmp = x * y
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 <= -5e+154) {
tmp = x * ((z / ((0.5 * (a * (t / z))) - z)) * y);
} else if (z <= 5e+117) {
tmp = x * (y * (z / Math.sqrt((Math.pow(z, 2.0) - (a * t)))));
} else {
tmp = x * y;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a): tmp = 0 if z <= -5e+154: tmp = x * ((z / ((0.5 * (a * (t / z))) - z)) * y) elif z <= 5e+117: tmp = x * (y * (z / math.sqrt((math.pow(z, 2.0) - (a * t))))) else: tmp = x * y return tmp
x, y = sort([x, y]) function code(x, y, z, t, a) tmp = 0.0 if (z <= -5e+154) tmp = Float64(x * Float64(Float64(z / Float64(Float64(0.5 * Float64(a * Float64(t / z))) - z)) * y)); elseif (z <= 5e+117) tmp = Float64(x * Float64(y * Float64(z / sqrt(Float64((z ^ 2.0) - Float64(a * t)))))); else tmp = Float64(x * y); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (z <= -5e+154)
tmp = x * ((z / ((0.5 * (a * (t / z))) - z)) * y);
elseif (z <= 5e+117)
tmp = x * (y * (z / sqrt(((z ^ 2.0) - (a * t)))));
else
tmp = x * y;
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, -5e+154], N[(x * N[(N[(z / N[(N[(0.5 * N[(a * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e+117], N[(x * N[(y * N[(z / N[Sqrt[N[(N[Power[z, 2.0], $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+154}:\\
\;\;\;\;x \cdot \left(\frac{z}{0.5 \cdot \left(a \cdot \frac{t}{z}\right) - z} \cdot y\right)\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+117}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{z}{\sqrt{{z}^{2} - a \cdot t}}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -5.00000000000000004e154Initial program 4.7%
associate-*l*4.4%
associate-*r/4.7%
*-commutative4.7%
associate-/l*5.6%
Simplified5.6%
associate-/r/5.6%
pow25.6%
Applied egg-rr5.6%
Taylor expanded in z around -inf 95.3%
+-commutative95.3%
mul-1-neg95.3%
unsub-neg95.3%
associate-*r/97.8%
Simplified97.8%
if -5.00000000000000004e154 < z < 4.99999999999999983e117Initial program 84.4%
associate-*l*81.8%
associate-*r/82.3%
*-commutative82.3%
associate-/l*81.4%
Simplified81.4%
associate-/r/87.2%
pow287.2%
Applied egg-rr87.2%
if 4.99999999999999983e117 < z Initial program 27.4%
Taylor expanded in z around inf 98.2%
Final simplification91.0%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= z -1e+90) (* x (* (/ z (- (* 0.5 (* a (/ t z))) z)) y)) (if (<= z 2.9e+34) (* x (/ z (/ (sqrt (- (* z z) (* a t))) y))) (* x y))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1e+90) {
tmp = x * ((z / ((0.5 * (a * (t / z))) - z)) * y);
} else if (z <= 2.9e+34) {
tmp = x * (z / (sqrt(((z * z) - (a * t))) / y));
} else {
tmp = x * y;
}
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 <= (-1d+90)) then
tmp = x * ((z / ((0.5d0 * (a * (t / z))) - z)) * y)
else if (z <= 2.9d+34) then
tmp = x * (z / (sqrt(((z * z) - (a * t))) / y))
else
tmp = x * y
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 <= -1e+90) {
tmp = x * ((z / ((0.5 * (a * (t / z))) - z)) * y);
} else if (z <= 2.9e+34) {
tmp = x * (z / (Math.sqrt(((z * z) - (a * t))) / y));
} else {
tmp = x * y;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a): tmp = 0 if z <= -1e+90: tmp = x * ((z / ((0.5 * (a * (t / z))) - z)) * y) elif z <= 2.9e+34: tmp = x * (z / (math.sqrt(((z * z) - (a * t))) / y)) else: tmp = x * y return tmp
x, y = sort([x, y]) function code(x, y, z, t, a) tmp = 0.0 if (z <= -1e+90) tmp = Float64(x * Float64(Float64(z / Float64(Float64(0.5 * Float64(a * Float64(t / z))) - z)) * y)); elseif (z <= 2.9e+34) tmp = Float64(x * Float64(z / Float64(sqrt(Float64(Float64(z * z) - Float64(a * t))) / y))); else tmp = Float64(x * y); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (z <= -1e+90)
tmp = x * ((z / ((0.5 * (a * (t / z))) - z)) * y);
elseif (z <= 2.9e+34)
tmp = x * (z / (sqrt(((z * z) - (a * t))) / y));
else
tmp = x * y;
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, -1e+90], N[(x * N[(N[(z / N[(N[(0.5 * N[(a * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.9e+34], N[(x * N[(z / N[(N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+90}:\\
\;\;\;\;x \cdot \left(\frac{z}{0.5 \cdot \left(a \cdot \frac{t}{z}\right) - z} \cdot y\right)\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{+34}:\\
\;\;\;\;x \cdot \frac{z}{\frac{\sqrt{z \cdot z - a \cdot t}}{y}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -9.99999999999999966e89Initial program 25.9%
associate-*l*23.8%
associate-*r/24.1%
*-commutative24.1%
associate-/l*22.9%
Simplified22.9%
associate-/r/28.3%
pow228.3%
Applied egg-rr28.3%
Taylor expanded in z around -inf 96.4%
+-commutative96.4%
mul-1-neg96.4%
unsub-neg96.4%
associate-*r/98.3%
Simplified98.3%
if -9.99999999999999966e89 < z < 2.9000000000000001e34Initial program 81.1%
associate-*l*81.5%
associate-*r/81.4%
*-commutative81.4%
associate-/l*79.5%
Simplified79.5%
if 2.9000000000000001e34 < z Initial program 51.6%
Taylor expanded in z around inf 97.6%
Final simplification88.7%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= z -1.75e+82) (* x (* (/ z (- (* 0.5 (* a (/ t z))) z)) y)) (if (<= z 2.5e+34) (* z (/ (* x y) (sqrt (- (* z z) (* a t))))) (* x y))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.75e+82) {
tmp = x * ((z / ((0.5 * (a * (t / z))) - z)) * y);
} else if (z <= 2.5e+34) {
tmp = z * ((x * y) / sqrt(((z * z) - (a * t))));
} else {
tmp = x * y;
}
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 <= (-1.75d+82)) then
tmp = x * ((z / ((0.5d0 * (a * (t / z))) - z)) * y)
else if (z <= 2.5d+34) then
tmp = z * ((x * y) / sqrt(((z * z) - (a * t))))
else
tmp = x * y
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 <= -1.75e+82) {
tmp = x * ((z / ((0.5 * (a * (t / z))) - z)) * y);
} else if (z <= 2.5e+34) {
tmp = z * ((x * y) / Math.sqrt(((z * z) - (a * t))));
} else {
tmp = x * y;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a): tmp = 0 if z <= -1.75e+82: tmp = x * ((z / ((0.5 * (a * (t / z))) - z)) * y) elif z <= 2.5e+34: tmp = z * ((x * y) / math.sqrt(((z * z) - (a * t)))) else: tmp = x * y return tmp
x, y = sort([x, y]) function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.75e+82) tmp = Float64(x * Float64(Float64(z / Float64(Float64(0.5 * Float64(a * Float64(t / z))) - z)) * y)); elseif (z <= 2.5e+34) tmp = Float64(z * Float64(Float64(x * y) / sqrt(Float64(Float64(z * z) - Float64(a * t))))); else tmp = Float64(x * y); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (z <= -1.75e+82)
tmp = x * ((z / ((0.5 * (a * (t / z))) - z)) * y);
elseif (z <= 2.5e+34)
tmp = z * ((x * y) / sqrt(((z * z) - (a * t))));
else
tmp = x * y;
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, -1.75e+82], N[(x * N[(N[(z / N[(N[(0.5 * N[(a * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e+34], N[(z * N[(N[(x * y), $MachinePrecision] / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{+82}:\\
\;\;\;\;x \cdot \left(\frac{z}{0.5 \cdot \left(a \cdot \frac{t}{z}\right) - z} \cdot y\right)\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+34}:\\
\;\;\;\;z \cdot \frac{x \cdot y}{\sqrt{z \cdot z - a \cdot t}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -1.75e82Initial program 27.2%
associate-*l*25.2%
associate-*r/25.5%
*-commutative25.5%
associate-/l*24.3%
Simplified24.3%
associate-/r/29.6%
pow229.6%
Applied egg-rr29.6%
Taylor expanded in z around -inf 96.5%
+-commutative96.5%
mul-1-neg96.5%
unsub-neg96.5%
associate-*r/98.3%
Simplified98.3%
if -1.75e82 < z < 2.4999999999999999e34Initial program 80.9%
associate-*l/78.4%
Simplified78.4%
if 2.4999999999999999e34 < z Initial program 51.6%
Taylor expanded in z around inf 97.6%
Final simplification88.3%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= z -3.2e+52) (* x (* (/ z (- (* 0.5 (* a (/ t z))) z)) y)) (if (<= z 1.4e+32) (/ (* y (* z x)) (sqrt (- (* z z) (* a t)))) (* x y))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.2e+52) {
tmp = x * ((z / ((0.5 * (a * (t / z))) - z)) * y);
} else if (z <= 1.4e+32) {
tmp = (y * (z * x)) / sqrt(((z * z) - (a * t)));
} else {
tmp = x * y;
}
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 <= (-3.2d+52)) then
tmp = x * ((z / ((0.5d0 * (a * (t / z))) - z)) * y)
else if (z <= 1.4d+32) then
tmp = (y * (z * x)) / sqrt(((z * z) - (a * t)))
else
tmp = x * y
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 <= -3.2e+52) {
tmp = x * ((z / ((0.5 * (a * (t / z))) - z)) * y);
} else if (z <= 1.4e+32) {
tmp = (y * (z * x)) / Math.sqrt(((z * z) - (a * t)));
} else {
tmp = x * y;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a): tmp = 0 if z <= -3.2e+52: tmp = x * ((z / ((0.5 * (a * (t / z))) - z)) * y) elif z <= 1.4e+32: tmp = (y * (z * x)) / math.sqrt(((z * z) - (a * t))) else: tmp = x * y return tmp
x, y = sort([x, y]) function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.2e+52) tmp = Float64(x * Float64(Float64(z / Float64(Float64(0.5 * Float64(a * Float64(t / z))) - z)) * y)); elseif (z <= 1.4e+32) tmp = Float64(Float64(y * Float64(z * x)) / sqrt(Float64(Float64(z * z) - Float64(a * t)))); else tmp = Float64(x * y); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (z <= -3.2e+52)
tmp = x * ((z / ((0.5 * (a * (t / z))) - z)) * y);
elseif (z <= 1.4e+32)
tmp = (y * (z * x)) / sqrt(((z * z) - (a * t)));
else
tmp = x * y;
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, -3.2e+52], N[(x * N[(N[(z / N[(N[(0.5 * N[(a * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e+32], N[(N[(y * N[(z * x), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+52}:\\
\;\;\;\;x \cdot \left(\frac{z}{0.5 \cdot \left(a \cdot \frac{t}{z}\right) - z} \cdot y\right)\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+32}:\\
\;\;\;\;\frac{y \cdot \left(z \cdot x\right)}{\sqrt{z \cdot z - a \cdot t}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -3.2e52Initial program 35.6%
associate-*l*33.8%
associate-*r/35.5%
*-commutative35.5%
associate-/l*35.9%
Simplified35.9%
associate-/r/40.4%
pow240.4%
Applied egg-rr40.4%
Taylor expanded in z around -inf 94.3%
+-commutative94.3%
mul-1-neg94.3%
unsub-neg94.3%
associate-*r/95.8%
Simplified95.8%
if -3.2e52 < z < 1.4e32Initial program 80.9%
associate-/l*80.8%
*-commutative80.8%
associate-/l*80.9%
associate-*l*79.6%
Simplified79.6%
if 1.4e32 < z Initial program 51.6%
Taylor expanded in z around inf 97.6%
Final simplification88.9%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= z -1.3e-92) (* x (- y)) (if (<= z 6.4e-83) (* x (* y (/ z (sqrt (* a (- t)))))) (* x y))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.3e-92) {
tmp = x * -y;
} else if (z <= 6.4e-83) {
tmp = x * (y * (z / sqrt((a * -t))));
} else {
tmp = x * y;
}
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 <= (-1.3d-92)) then
tmp = x * -y
else if (z <= 6.4d-83) then
tmp = x * (y * (z / sqrt((a * -t))))
else
tmp = x * y
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 <= -1.3e-92) {
tmp = x * -y;
} else if (z <= 6.4e-83) {
tmp = x * (y * (z / Math.sqrt((a * -t))));
} else {
tmp = x * y;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a): tmp = 0 if z <= -1.3e-92: tmp = x * -y elif z <= 6.4e-83: tmp = x * (y * (z / math.sqrt((a * -t)))) else: tmp = x * y return tmp
x, y = sort([x, y]) function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.3e-92) tmp = Float64(x * Float64(-y)); elseif (z <= 6.4e-83) tmp = Float64(x * Float64(y * Float64(z / sqrt(Float64(a * Float64(-t)))))); else tmp = Float64(x * y); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (z <= -1.3e-92)
tmp = x * -y;
elseif (z <= 6.4e-83)
tmp = x * (y * (z / sqrt((a * -t))));
else
tmp = x * y;
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, -1.3e-92], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, 6.4e-83], N[(x * N[(y * N[(z / N[Sqrt[N[(a * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{-92}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{elif}\;z \leq 6.4 \cdot 10^{-83}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{z}{\sqrt{a \cdot \left(-t\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -1.3e-92Initial program 51.7%
Taylor expanded in z around -inf 86.3%
mul-1-neg86.3%
distribute-rgt-neg-out86.3%
Simplified86.3%
if -1.3e-92 < z < 6.4000000000000002e-83Initial program 74.0%
associate-*l*76.3%
associate-*r/76.1%
*-commutative76.1%
associate-/l*71.3%
Simplified71.3%
associate-/r/77.0%
pow277.0%
Applied egg-rr77.0%
Taylor expanded in z around 0 66.6%
mul-1-neg66.6%
distribute-rgt-neg-out66.6%
Simplified66.6%
if 6.4000000000000002e-83 < z Initial program 60.9%
Taylor expanded in z around inf 90.2%
Final simplification82.6%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= z -1.75e-88) (* x (- y)) (if (<= z 9.5e-81) (/ (* y (* z x)) (sqrt (* a (- t)))) (* x y))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.75e-88) {
tmp = x * -y;
} else if (z <= 9.5e-81) {
tmp = (y * (z * x)) / sqrt((a * -t));
} else {
tmp = x * y;
}
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 <= (-1.75d-88)) then
tmp = x * -y
else if (z <= 9.5d-81) then
tmp = (y * (z * x)) / sqrt((a * -t))
else
tmp = x * y
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 <= -1.75e-88) {
tmp = x * -y;
} else if (z <= 9.5e-81) {
tmp = (y * (z * x)) / Math.sqrt((a * -t));
} else {
tmp = x * y;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a): tmp = 0 if z <= -1.75e-88: tmp = x * -y elif z <= 9.5e-81: tmp = (y * (z * x)) / math.sqrt((a * -t)) else: tmp = x * y return tmp
x, y = sort([x, y]) function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.75e-88) tmp = Float64(x * Float64(-y)); elseif (z <= 9.5e-81) tmp = Float64(Float64(y * Float64(z * x)) / sqrt(Float64(a * Float64(-t)))); else tmp = Float64(x * y); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (z <= -1.75e-88)
tmp = x * -y;
elseif (z <= 9.5e-81)
tmp = (y * (z * x)) / sqrt((a * -t));
else
tmp = x * y;
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, -1.75e-88], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, 9.5e-81], N[(N[(y * N[(z * x), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(a * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{-88}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{-81}:\\
\;\;\;\;\frac{y \cdot \left(z \cdot x\right)}{\sqrt{a \cdot \left(-t\right)}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -1.7500000000000001e-88Initial program 51.7%
Taylor expanded in z around -inf 86.3%
mul-1-neg86.3%
distribute-rgt-neg-out86.3%
Simplified86.3%
if -1.7500000000000001e-88 < z < 9.49999999999999917e-81Initial program 74.0%
associate-/l*73.9%
*-commutative73.9%
associate-/l*74.0%
associate-*l*72.2%
Simplified72.2%
Taylor expanded in z around 0 64.7%
associate-*r*64.7%
neg-mul-164.7%
*-commutative64.7%
Simplified64.7%
if 9.49999999999999917e-81 < z Initial program 60.9%
Taylor expanded in z around inf 90.2%
Final simplification82.1%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= z -2.3e-164) (* x (- y)) (if (<= z 9.6e-181) (* 2.0 (/ (* z x) (* (/ a z) (/ t y)))) (* x y))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.3e-164) {
tmp = x * -y;
} else if (z <= 9.6e-181) {
tmp = 2.0 * ((z * x) / ((a / z) * (t / y)));
} else {
tmp = x * y;
}
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 <= (-2.3d-164)) then
tmp = x * -y
else if (z <= 9.6d-181) then
tmp = 2.0d0 * ((z * x) / ((a / z) * (t / y)))
else
tmp = x * y
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 <= -2.3e-164) {
tmp = x * -y;
} else if (z <= 9.6e-181) {
tmp = 2.0 * ((z * x) / ((a / z) * (t / y)));
} else {
tmp = x * y;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a): tmp = 0 if z <= -2.3e-164: tmp = x * -y elif z <= 9.6e-181: tmp = 2.0 * ((z * x) / ((a / z) * (t / y))) else: tmp = x * y return tmp
x, y = sort([x, y]) function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.3e-164) tmp = Float64(x * Float64(-y)); elseif (z <= 9.6e-181) tmp = Float64(2.0 * Float64(Float64(z * x) / Float64(Float64(a / z) * Float64(t / y)))); else tmp = Float64(x * y); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (z <= -2.3e-164)
tmp = x * -y;
elseif (z <= 9.6e-181)
tmp = 2.0 * ((z * x) / ((a / z) * (t / y)));
else
tmp = x * y;
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, -2.3e-164], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, 9.6e-181], N[(2.0 * N[(N[(z * x), $MachinePrecision] / N[(N[(a / z), $MachinePrecision] * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{-164}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{elif}\;z \leq 9.6 \cdot 10^{-181}:\\
\;\;\;\;2 \cdot \frac{z \cdot x}{\frac{a}{z} \cdot \frac{t}{y}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -2.29999999999999985e-164Initial program 55.7%
Taylor expanded in z around -inf 80.5%
mul-1-neg80.5%
distribute-rgt-neg-out80.5%
Simplified80.5%
if -2.29999999999999985e-164 < z < 9.6000000000000005e-181Initial program 70.1%
associate-*l*70.0%
associate-*r/69.4%
*-commutative69.4%
associate-/l*65.0%
Simplified65.0%
Taylor expanded in z around -inf 43.2%
Taylor expanded in z around 0 42.5%
associate-*r/42.5%
*-commutative42.5%
*-commutative42.5%
times-frac39.8%
*-commutative39.8%
Simplified39.8%
frac-times42.5%
*-commutative42.5%
Applied egg-rr42.5%
associate-*r/42.4%
frac-2neg42.4%
*-commutative42.4%
*-un-lft-identity42.4%
times-frac42.4%
metadata-eval42.4%
*-commutative42.4%
Applied egg-rr42.4%
neg-mul-142.4%
distribute-lft-neg-in42.4%
metadata-eval42.4%
times-frac42.4%
metadata-eval42.4%
*-commutative42.4%
times-frac40.3%
Simplified40.3%
if 9.6000000000000005e-181 < z Initial program 63.1%
Taylor expanded in z around inf 83.9%
Final simplification76.3%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= z -2.7e-171) (* x (- y)) (if (<= z 6.8e-176) (* x (* (* z 2.0) (* (/ z a) (/ y t)))) (* x y))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.7e-171) {
tmp = x * -y;
} else if (z <= 6.8e-176) {
tmp = x * ((z * 2.0) * ((z / a) * (y / t)));
} else {
tmp = x * y;
}
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 <= (-2.7d-171)) then
tmp = x * -y
else if (z <= 6.8d-176) then
tmp = x * ((z * 2.0d0) * ((z / a) * (y / t)))
else
tmp = x * y
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 <= -2.7e-171) {
tmp = x * -y;
} else if (z <= 6.8e-176) {
tmp = x * ((z * 2.0) * ((z / a) * (y / t)));
} else {
tmp = x * y;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a): tmp = 0 if z <= -2.7e-171: tmp = x * -y elif z <= 6.8e-176: tmp = x * ((z * 2.0) * ((z / a) * (y / t))) else: tmp = x * y return tmp
x, y = sort([x, y]) function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.7e-171) tmp = Float64(x * Float64(-y)); elseif (z <= 6.8e-176) tmp = Float64(x * Float64(Float64(z * 2.0) * Float64(Float64(z / a) * Float64(y / t)))); else tmp = Float64(x * y); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (z <= -2.7e-171)
tmp = x * -y;
elseif (z <= 6.8e-176)
tmp = x * ((z * 2.0) * ((z / a) * (y / t)));
else
tmp = x * y;
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, -2.7e-171], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, 6.8e-176], N[(x * N[(N[(z * 2.0), $MachinePrecision] * N[(N[(z / a), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{-171}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-176}:\\
\;\;\;\;x \cdot \left(\left(z \cdot 2\right) \cdot \left(\frac{z}{a} \cdot \frac{y}{t}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -2.70000000000000014e-171Initial program 55.7%
Taylor expanded in z around -inf 80.5%
mul-1-neg80.5%
distribute-rgt-neg-out80.5%
Simplified80.5%
if -2.70000000000000014e-171 < z < 6.7999999999999994e-176Initial program 70.1%
associate-*l*70.0%
associate-*r/69.4%
*-commutative69.4%
associate-/l*65.0%
Simplified65.0%
Taylor expanded in z around -inf 43.2%
Taylor expanded in z around 0 42.5%
associate-*r/42.5%
*-commutative42.5%
*-commutative42.5%
times-frac39.8%
*-commutative39.8%
Simplified39.8%
add-sqr-sqrt23.1%
times-frac23.0%
associate-/l*23.2%
Applied egg-rr23.2%
*-commutative23.2%
associate-*l/23.2%
associate-*r/23.2%
rem-square-sqrt40.2%
*-lft-identity40.2%
associate-*l/40.2%
associate-/r/40.2%
metadata-eval40.2%
associate-/r/37.6%
Simplified37.6%
if 6.7999999999999994e-176 < z Initial program 63.1%
Taylor expanded in z around inf 83.9%
Final simplification75.9%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= z -1.15e-161) (* x (- y)) (if (<= z 6.5e-178) (* x (/ z (* t (* (/ 0.5 y) (/ a z))))) (* x y))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.15e-161) {
tmp = x * -y;
} else if (z <= 6.5e-178) {
tmp = x * (z / (t * ((0.5 / y) * (a / z))));
} else {
tmp = x * y;
}
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 <= (-1.15d-161)) then
tmp = x * -y
else if (z <= 6.5d-178) then
tmp = x * (z / (t * ((0.5d0 / y) * (a / z))))
else
tmp = x * y
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 <= -1.15e-161) {
tmp = x * -y;
} else if (z <= 6.5e-178) {
tmp = x * (z / (t * ((0.5 / y) * (a / z))));
} else {
tmp = x * y;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a): tmp = 0 if z <= -1.15e-161: tmp = x * -y elif z <= 6.5e-178: tmp = x * (z / (t * ((0.5 / y) * (a / z)))) else: tmp = x * y return tmp
x, y = sort([x, y]) function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.15e-161) tmp = Float64(x * Float64(-y)); elseif (z <= 6.5e-178) tmp = Float64(x * Float64(z / Float64(t * Float64(Float64(0.5 / y) * Float64(a / z))))); else tmp = Float64(x * y); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (z <= -1.15e-161)
tmp = x * -y;
elseif (z <= 6.5e-178)
tmp = x * (z / (t * ((0.5 / y) * (a / z))));
else
tmp = x * y;
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, -1.15e-161], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, 6.5e-178], N[(x * N[(z / N[(t * N[(N[(0.5 / y), $MachinePrecision] * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{-161}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-178}:\\
\;\;\;\;x \cdot \frac{z}{t \cdot \left(\frac{0.5}{y} \cdot \frac{a}{z}\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -1.15e-161Initial program 55.7%
Taylor expanded in z around -inf 80.5%
mul-1-neg80.5%
distribute-rgt-neg-out80.5%
Simplified80.5%
if -1.15e-161 < z < 6.5000000000000002e-178Initial program 70.1%
associate-*l*70.0%
associate-*r/69.4%
*-commutative69.4%
associate-/l*65.0%
Simplified65.0%
Taylor expanded in z around -inf 43.2%
Taylor expanded in z around 0 42.5%
associate-*r/42.5%
*-commutative42.5%
*-commutative42.5%
times-frac39.8%
*-commutative39.8%
Simplified39.8%
frac-times42.5%
*-commutative42.5%
Applied egg-rr42.5%
Taylor expanded in t around 0 42.5%
associate-*r/42.5%
associate-*r*42.5%
*-commutative42.5%
*-commutative42.5%
*-commutative42.5%
associate-*r/40.8%
*-commutative40.8%
*-commutative40.8%
times-frac40.9%
Simplified40.9%
if 6.5000000000000002e-178 < z Initial program 63.1%
Taylor expanded in z around inf 83.9%
Final simplification76.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 -1.95e-167) (* x (- y)) (* x (* y (/ z (+ z (* (* a (/ t z)) -0.5)))))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.95e-167) {
tmp = x * -y;
} else {
tmp = x * (y * (z / (z + ((a * (t / z)) * -0.5))));
}
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 <= (-1.95d-167)) then
tmp = x * -y
else
tmp = x * (y * (z / (z + ((a * (t / z)) * (-0.5d0)))))
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 <= -1.95e-167) {
tmp = x * -y;
} else {
tmp = x * (y * (z / (z + ((a * (t / z)) * -0.5))));
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a): tmp = 0 if z <= -1.95e-167: tmp = x * -y else: tmp = x * (y * (z / (z + ((a * (t / z)) * -0.5)))) return tmp
x, y = sort([x, y]) function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.95e-167) tmp = Float64(x * Float64(-y)); else tmp = Float64(x * Float64(y * Float64(z / Float64(z + Float64(Float64(a * Float64(t / z)) * -0.5))))); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (z <= -1.95e-167)
tmp = x * -y;
else
tmp = x * (y * (z / (z + ((a * (t / z)) * -0.5))));
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, -1.95e-167], N[(x * (-y)), $MachinePrecision], N[(x * N[(y * N[(z / N[(z + N[(N[(a * N[(t / z), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{-167}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{z}{z + \left(a \cdot \frac{t}{z}\right) \cdot -0.5}\right)\\
\end{array}
\end{array}
if z < -1.94999999999999992e-167Initial program 55.7%
Taylor expanded in z around -inf 80.5%
mul-1-neg80.5%
distribute-rgt-neg-out80.5%
Simplified80.5%
if -1.94999999999999992e-167 < z Initial program 64.8%
associate-*l*62.0%
associate-*r/63.3%
*-commutative63.3%
associate-/l*62.4%
Simplified62.4%
associate-/r/67.1%
pow267.1%
Applied egg-rr67.1%
Taylor expanded in z around inf 71.8%
associate-*r/74.5%
Simplified74.5%
Final simplification77.1%
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 (* a (/ t z))))
(if (<= z 1e-253)
(* x (* (/ z (- (* 0.5 t_1) z)) y))
(* x (* y (/ z (+ z (* t_1 -0.5))))))))assert(x < y);
double code(double x, double y, double z, double t, double a) {
double t_1 = a * (t / z);
double tmp;
if (z <= 1e-253) {
tmp = x * ((z / ((0.5 * t_1) - z)) * y);
} else {
tmp = x * (y * (z / (z + (t_1 * -0.5))));
}
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 = a * (t / z)
if (z <= 1d-253) then
tmp = x * ((z / ((0.5d0 * t_1) - z)) * y)
else
tmp = x * (y * (z / (z + (t_1 * (-0.5d0)))))
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 = a * (t / z);
double tmp;
if (z <= 1e-253) {
tmp = x * ((z / ((0.5 * t_1) - z)) * y);
} else {
tmp = x * (y * (z / (z + (t_1 * -0.5))));
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a): t_1 = a * (t / z) tmp = 0 if z <= 1e-253: tmp = x * ((z / ((0.5 * t_1) - z)) * y) else: tmp = x * (y * (z / (z + (t_1 * -0.5)))) return tmp
x, y = sort([x, y]) function code(x, y, z, t, a) t_1 = Float64(a * Float64(t / z)) tmp = 0.0 if (z <= 1e-253) tmp = Float64(x * Float64(Float64(z / Float64(Float64(0.5 * t_1) - z)) * y)); else tmp = Float64(x * Float64(y * Float64(z / Float64(z + Float64(t_1 * -0.5))))); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
t_1 = a * (t / z);
tmp = 0.0;
if (z <= 1e-253)
tmp = x * ((z / ((0.5 * t_1) - z)) * y);
else
tmp = x * (y * (z / (z + (t_1 * -0.5))));
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[(a * N[(t / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, 1e-253], N[(x * N[(N[(z / N[(N[(0.5 * t$95$1), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * N[(z / N[(z + N[(t$95$1 * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := a \cdot \frac{t}{z}\\
\mathbf{if}\;z \leq 10^{-253}:\\
\;\;\;\;x \cdot \left(\frac{z}{0.5 \cdot t_1 - z} \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{z}{z + t_1 \cdot -0.5}\right)\\
\end{array}
\end{array}
if z < 1.0000000000000001e-253Initial program 58.4%
associate-*l*58.8%
associate-*r/59.7%
*-commutative59.7%
associate-/l*57.9%
Simplified57.9%
associate-/r/62.3%
pow262.3%
Applied egg-rr62.3%
Taylor expanded in z around -inf 75.5%
+-commutative75.5%
mul-1-neg75.5%
unsub-neg75.5%
associate-*r/75.6%
Simplified75.6%
if 1.0000000000000001e-253 < z Initial program 63.6%
associate-*l*59.5%
associate-*r/61.0%
*-commutative61.0%
associate-/l*61.4%
Simplified61.4%
associate-/r/65.4%
pow265.4%
Applied egg-rr65.4%
Taylor expanded in z around inf 76.4%
associate-*r/79.6%
Simplified79.6%
Final simplification77.5%
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 (* a (/ t z))))
(if (<= z 1.85e-281)
(* x (* (/ z (- (* 0.5 t_1) z)) y))
(* y (* x (/ z (+ z (* t_1 -0.5))))))))assert(x < y);
double code(double x, double y, double z, double t, double a) {
double t_1 = a * (t / z);
double tmp;
if (z <= 1.85e-281) {
tmp = x * ((z / ((0.5 * t_1) - z)) * y);
} else {
tmp = y * (x * (z / (z + (t_1 * -0.5))));
}
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 = a * (t / z)
if (z <= 1.85d-281) then
tmp = x * ((z / ((0.5d0 * t_1) - z)) * y)
else
tmp = y * (x * (z / (z + (t_1 * (-0.5d0)))))
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 = a * (t / z);
double tmp;
if (z <= 1.85e-281) {
tmp = x * ((z / ((0.5 * t_1) - z)) * y);
} else {
tmp = y * (x * (z / (z + (t_1 * -0.5))));
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a): t_1 = a * (t / z) tmp = 0 if z <= 1.85e-281: tmp = x * ((z / ((0.5 * t_1) - z)) * y) else: tmp = y * (x * (z / (z + (t_1 * -0.5)))) return tmp
x, y = sort([x, y]) function code(x, y, z, t, a) t_1 = Float64(a * Float64(t / z)) tmp = 0.0 if (z <= 1.85e-281) tmp = Float64(x * Float64(Float64(z / Float64(Float64(0.5 * t_1) - z)) * y)); else tmp = Float64(y * Float64(x * Float64(z / Float64(z + Float64(t_1 * -0.5))))); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
t_1 = a * (t / z);
tmp = 0.0;
if (z <= 1.85e-281)
tmp = x * ((z / ((0.5 * t_1) - z)) * y);
else
tmp = y * (x * (z / (z + (t_1 * -0.5))));
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[(a * N[(t / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, 1.85e-281], N[(x * N[(N[(z / N[(N[(0.5 * t$95$1), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], N[(y * N[(x * N[(z / N[(z + N[(t$95$1 * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := a \cdot \frac{t}{z}\\
\mathbf{if}\;z \leq 1.85 \cdot 10^{-281}:\\
\;\;\;\;x \cdot \left(\frac{z}{0.5 \cdot t_1 - z} \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(x \cdot \frac{z}{z + t_1 \cdot -0.5}\right)\\
\end{array}
\end{array}
if z < 1.84999999999999996e-281Initial program 57.9%
associate-*l*58.3%
associate-*r/59.2%
*-commutative59.2%
associate-/l*57.3%
Simplified57.3%
associate-/r/61.9%
pow261.9%
Applied egg-rr61.9%
Taylor expanded in z around -inf 76.2%
+-commutative76.2%
mul-1-neg76.2%
unsub-neg76.2%
associate-*r/76.4%
Simplified76.4%
if 1.84999999999999996e-281 < z Initial program 63.9%
associate-*l/63.7%
associate-/l*60.7%
associate-*l/59.6%
associate-*r/61.9%
associate-/r/65.7%
associate-*r*67.9%
pow267.9%
Applied egg-rr67.9%
Taylor expanded in z around inf 75.7%
associate-*r/78.7%
Simplified78.7%
Final simplification77.6%
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 (* a (/ t z))))
(if (<= z 1.85e-281)
(* y (* x (/ z (- (* 0.5 t_1) z))))
(* y (* x (/ z (+ z (* t_1 -0.5))))))))assert(x < y);
double code(double x, double y, double z, double t, double a) {
double t_1 = a * (t / z);
double tmp;
if (z <= 1.85e-281) {
tmp = y * (x * (z / ((0.5 * t_1) - z)));
} else {
tmp = y * (x * (z / (z + (t_1 * -0.5))));
}
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 = a * (t / z)
if (z <= 1.85d-281) then
tmp = y * (x * (z / ((0.5d0 * t_1) - z)))
else
tmp = y * (x * (z / (z + (t_1 * (-0.5d0)))))
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 = a * (t / z);
double tmp;
if (z <= 1.85e-281) {
tmp = y * (x * (z / ((0.5 * t_1) - z)));
} else {
tmp = y * (x * (z / (z + (t_1 * -0.5))));
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a): t_1 = a * (t / z) tmp = 0 if z <= 1.85e-281: tmp = y * (x * (z / ((0.5 * t_1) - z))) else: tmp = y * (x * (z / (z + (t_1 * -0.5)))) return tmp
x, y = sort([x, y]) function code(x, y, z, t, a) t_1 = Float64(a * Float64(t / z)) tmp = 0.0 if (z <= 1.85e-281) tmp = Float64(y * Float64(x * Float64(z / Float64(Float64(0.5 * t_1) - z)))); else tmp = Float64(y * Float64(x * Float64(z / Float64(z + Float64(t_1 * -0.5))))); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
t_1 = a * (t / z);
tmp = 0.0;
if (z <= 1.85e-281)
tmp = y * (x * (z / ((0.5 * t_1) - z)));
else
tmp = y * (x * (z / (z + (t_1 * -0.5))));
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[(a * N[(t / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, 1.85e-281], N[(y * N[(x * N[(z / N[(N[(0.5 * t$95$1), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(x * N[(z / N[(z + N[(t$95$1 * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := a \cdot \frac{t}{z}\\
\mathbf{if}\;z \leq 1.85 \cdot 10^{-281}:\\
\;\;\;\;y \cdot \left(x \cdot \frac{z}{0.5 \cdot t_1 - z}\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(x \cdot \frac{z}{z + t_1 \cdot -0.5}\right)\\
\end{array}
\end{array}
if z < 1.84999999999999996e-281Initial program 57.9%
associate-*l/56.5%
associate-/l*53.5%
associate-*l/56.8%
associate-*r/57.3%
associate-/r/61.9%
associate-*r*61.2%
pow261.2%
Applied egg-rr61.2%
Taylor expanded in z around -inf 76.2%
+-commutative76.2%
mul-1-neg76.2%
unsub-neg76.2%
associate-*r/76.4%
Simplified76.4%
if 1.84999999999999996e-281 < z Initial program 63.9%
associate-*l/63.7%
associate-/l*60.7%
associate-*l/59.6%
associate-*r/61.9%
associate-/r/65.7%
associate-*r*67.9%
pow267.9%
Applied egg-rr67.9%
Taylor expanded in z around inf 75.7%
associate-*r/78.7%
Simplified78.7%
Final simplification77.5%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= z -1e-199) (* x (- y)) (if (<= z 1.4e-175) (* (* z x) (/ y z)) (* x y))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1e-199) {
tmp = x * -y;
} else if (z <= 1.4e-175) {
tmp = (z * x) * (y / z);
} else {
tmp = x * y;
}
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 <= (-1d-199)) then
tmp = x * -y
else if (z <= 1.4d-175) then
tmp = (z * x) * (y / z)
else
tmp = x * y
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 <= -1e-199) {
tmp = x * -y;
} else if (z <= 1.4e-175) {
tmp = (z * x) * (y / z);
} else {
tmp = x * y;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a): tmp = 0 if z <= -1e-199: tmp = x * -y elif z <= 1.4e-175: tmp = (z * x) * (y / z) else: tmp = x * y return tmp
x, y = sort([x, y]) function code(x, y, z, t, a) tmp = 0.0 if (z <= -1e-199) tmp = Float64(x * Float64(-y)); elseif (z <= 1.4e-175) tmp = Float64(Float64(z * x) * Float64(y / z)); else tmp = Float64(x * y); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (z <= -1e-199)
tmp = x * -y;
elseif (z <= 1.4e-175)
tmp = (z * x) * (y / z);
else
tmp = x * y;
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, -1e-199], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, 1.4e-175], N[(N[(z * x), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{-199}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-175}:\\
\;\;\;\;\left(z \cdot x\right) \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -9.99999999999999982e-200Initial program 56.7%
Taylor expanded in z around -inf 79.3%
mul-1-neg79.3%
distribute-rgt-neg-out79.3%
Simplified79.3%
if -9.99999999999999982e-200 < z < 1.4e-175Initial program 68.1%
associate-*l*68.0%
*-commutative68.0%
associate-*l*64.9%
associate-*r/61.8%
*-commutative61.8%
Simplified61.8%
Taylor expanded in z around inf 20.8%
if 1.4e-175 < z Initial program 63.1%
Taylor expanded in z around inf 83.9%
Final simplification73.8%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= z -2.7e-198) (* x (- y)) (if (<= z 1.6e-174) (/ (* x (* z y)) z) (* x y))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.7e-198) {
tmp = x * -y;
} else if (z <= 1.6e-174) {
tmp = (x * (z * y)) / z;
} else {
tmp = x * y;
}
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 <= (-2.7d-198)) then
tmp = x * -y
else if (z <= 1.6d-174) then
tmp = (x * (z * y)) / z
else
tmp = x * y
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 <= -2.7e-198) {
tmp = x * -y;
} else if (z <= 1.6e-174) {
tmp = (x * (z * y)) / z;
} else {
tmp = x * y;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a): tmp = 0 if z <= -2.7e-198: tmp = x * -y elif z <= 1.6e-174: tmp = (x * (z * y)) / z else: tmp = x * y return tmp
x, y = sort([x, y]) function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.7e-198) tmp = Float64(x * Float64(-y)); elseif (z <= 1.6e-174) tmp = Float64(Float64(x * Float64(z * y)) / z); else tmp = Float64(x * y); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (z <= -2.7e-198)
tmp = x * -y;
elseif (z <= 1.6e-174)
tmp = (x * (z * y)) / z;
else
tmp = x * y;
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, -2.7e-198], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, 1.6e-174], N[(N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{-198}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-174}:\\
\;\;\;\;\frac{x \cdot \left(z \cdot y\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -2.7000000000000002e-198Initial program 56.7%
Taylor expanded in z around -inf 79.3%
mul-1-neg79.3%
distribute-rgt-neg-out79.3%
Simplified79.3%
if -2.7000000000000002e-198 < z < 1.6e-174Initial program 68.1%
associate-*l*68.0%
*-commutative68.0%
associate-*l*64.9%
associate-*r/61.8%
*-commutative61.8%
Simplified61.8%
Taylor expanded in z around inf 20.8%
expm1-log1p-u20.0%
expm1-udef28.4%
Applied egg-rr28.4%
expm1-def20.0%
expm1-log1p20.8%
associate-*l/35.9%
*-commutative35.9%
associate-*r*35.9%
*-commutative35.9%
Simplified35.9%
if 1.6e-174 < z Initial program 63.1%
Taylor expanded in z around inf 83.9%
Final simplification75.7%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= z -2.2e-197) (* x (- y)) (if (<= z 2.8e-95) (/ (* y (* z x)) z) (* x y))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.2e-197) {
tmp = x * -y;
} else if (z <= 2.8e-95) {
tmp = (y * (z * x)) / z;
} else {
tmp = x * y;
}
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 <= (-2.2d-197)) then
tmp = x * -y
else if (z <= 2.8d-95) then
tmp = (y * (z * x)) / z
else
tmp = x * y
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 <= -2.2e-197) {
tmp = x * -y;
} else if (z <= 2.8e-95) {
tmp = (y * (z * x)) / z;
} else {
tmp = x * y;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a): tmp = 0 if z <= -2.2e-197: tmp = x * -y elif z <= 2.8e-95: tmp = (y * (z * x)) / z else: tmp = x * y return tmp
x, y = sort([x, y]) function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.2e-197) tmp = Float64(x * Float64(-y)); elseif (z <= 2.8e-95) tmp = Float64(Float64(y * Float64(z * x)) / z); else tmp = Float64(x * y); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (z <= -2.2e-197)
tmp = x * -y;
elseif (z <= 2.8e-95)
tmp = (y * (z * x)) / z;
else
tmp = x * y;
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, -2.2e-197], N[(x * (-y)), $MachinePrecision], If[LessEqual[z, 2.8e-95], N[(N[(y * N[(z * x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(x * y), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{-197}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-95}:\\
\;\;\;\;\frac{y \cdot \left(z \cdot x\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < -2.2e-197Initial program 56.7%
Taylor expanded in z around -inf 79.3%
mul-1-neg79.3%
distribute-rgt-neg-out79.3%
Simplified79.3%
if -2.2e-197 < z < 2.7999999999999999e-95Initial program 69.5%
associate-/l*69.6%
*-commutative69.6%
associate-/l*69.5%
associate-*l*65.1%
Simplified65.1%
Taylor expanded in z around inf 38.9%
if 2.7999999999999999e-95 < z Initial program 61.7%
Taylor expanded in z around inf 88.4%
Final simplification75.3%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= z 1.7e-292) (* x (- y)) (* x y)))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= 1.7e-292) {
tmp = x * -y;
} else {
tmp = x * y;
}
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 <= 1.7d-292) then
tmp = x * -y
else
tmp = x * y
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 <= 1.7e-292) {
tmp = x * -y;
} else {
tmp = x * y;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a): tmp = 0 if z <= 1.7e-292: tmp = x * -y else: tmp = x * y return tmp
x, y = sort([x, y]) function code(x, y, z, t, a) tmp = 0.0 if (z <= 1.7e-292) tmp = Float64(x * Float64(-y)); else tmp = Float64(x * y); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (z <= 1.7e-292)
tmp = x * -y;
else
tmp = x * y;
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, 1.7e-292], N[(x * (-y)), $MachinePrecision], N[(x * y), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.7 \cdot 10^{-292}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if z < 1.70000000000000009e-292Initial program 57.6%
Taylor expanded in z around -inf 71.9%
mul-1-neg71.9%
distribute-rgt-neg-out71.9%
Simplified71.9%
if 1.70000000000000009e-292 < z Initial program 64.2%
Taylor expanded in z around inf 73.9%
Final simplification72.9%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (* x y))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
return x * y;
}
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 = x * y
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a) {
return x * y;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a): return x * y
x, y = sort([x, y]) function code(x, y, z, t, a) return Float64(x * y) end
x, y = num2cell(sort([x, y])){:}
function tmp = code(x, y, z, t, a)
tmp = x * y;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := N[(x * y), $MachinePrecision]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
x \cdot y
\end{array}
Initial program 60.9%
Taylor expanded in z around inf 41.9%
Final simplification41.9%
(FPCore (x y z t a)
:precision binary64
(if (< z -3.1921305903852764e+46)
(- (* y x))
(if (< z 5.976268120920894e+90)
(/ (* x z) (/ (sqrt (- (* z z) (* a t))) y))
(* y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z < -3.1921305903852764e+46) {
tmp = -(y * x);
} else if (z < 5.976268120920894e+90) {
tmp = (x * z) / (sqrt(((z * z) - (a * t))) / y);
} else {
tmp = y * x;
}
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) :: tmp
if (z < (-3.1921305903852764d+46)) then
tmp = -(y * x)
else if (z < 5.976268120920894d+90) then
tmp = (x * z) / (sqrt(((z * z) - (a * t))) / y)
else
tmp = y * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z < -3.1921305903852764e+46) {
tmp = -(y * x);
} else if (z < 5.976268120920894e+90) {
tmp = (x * z) / (Math.sqrt(((z * z) - (a * t))) / y);
} else {
tmp = y * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z < -3.1921305903852764e+46: tmp = -(y * x) elif z < 5.976268120920894e+90: tmp = (x * z) / (math.sqrt(((z * z) - (a * t))) / y) else: tmp = y * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z < -3.1921305903852764e+46) tmp = Float64(-Float64(y * x)); elseif (z < 5.976268120920894e+90) tmp = Float64(Float64(x * z) / Float64(sqrt(Float64(Float64(z * z) - Float64(a * t))) / y)); else tmp = Float64(y * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z < -3.1921305903852764e+46) tmp = -(y * x); elseif (z < 5.976268120920894e+90) tmp = (x * z) / (sqrt(((z * z) - (a * t))) / y); else tmp = y * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Less[z, -3.1921305903852764e+46], (-N[(y * x), $MachinePrecision]), If[Less[z, 5.976268120920894e+90], N[(N[(x * z), $MachinePrecision] / N[(N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z < -3.1921305903852764 \cdot 10^{+46}:\\
\;\;\;\;-y \cdot x\\
\mathbf{elif}\;z < 5.976268120920894 \cdot 10^{+90}:\\
\;\;\;\;\frac{x \cdot z}{\frac{\sqrt{z \cdot z - a \cdot t}}{y}}\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
herbie shell --seed 2023320
(FPCore (x y z t a)
:name "Statistics.Math.RootFinding:ridders from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(if (< z -3.1921305903852764e+46) (- (* y x)) (if (< z 5.976268120920894e+90) (/ (* x z) (/ (sqrt (- (* z z) (* a t))) y)) (* y x)))
(/ (* (* x y) z) (sqrt (- (* z z) (* t a)))))