
(FPCore (x y z t) :precision binary64 (/ x (* (- y z) (- t z))))
double code(double x, double y, double z, double t) {
return x / ((y - z) * (t - z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x / ((y - z) * (t - z))
end function
public static double code(double x, double y, double z, double t) {
return x / ((y - z) * (t - z));
}
def code(x, y, z, t): return x / ((y - z) * (t - z))
function code(x, y, z, t) return Float64(x / Float64(Float64(y - z) * Float64(t - z))) end
function tmp = code(x, y, z, t) tmp = x / ((y - z) * (t - z)); end
code[x_, y_, z_, t_] := N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (/ x (* (- y z) (- t z))))
double code(double x, double y, double z, double t) {
return x / ((y - z) * (t - z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x / ((y - z) * (t - z))
end function
public static double code(double x, double y, double z, double t) {
return x / ((y - z) * (t - z));
}
def code(x, y, z, t): return x / ((y - z) * (t - z))
function code(x, y, z, t) return Float64(x / Float64(Float64(y - z) * Float64(t - z))) end
function tmp = code(x, y, z, t) tmp = x / ((y - z) * (t - z)); end
code[x_, y_, z_, t_] := N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}
\end{array}
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (/ 1.0 (* (- y z) (/ (- t z) x))))
assert(y < t);
double code(double x, double y, double z, double t) {
return 1.0 / ((y - z) * ((t - z) / x));
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = 1.0d0 / ((y - z) * ((t - z) / x))
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
return 1.0 / ((y - z) * ((t - z) / x));
}
[y, t] = sort([y, t]) def code(x, y, z, t): return 1.0 / ((y - z) * ((t - z) / x))
y, t = sort([y, t]) function code(x, y, z, t) return Float64(1.0 / Float64(Float64(y - z) * Float64(Float64(t - z) / x))) end
y, t = num2cell(sort([y, t])){:}
function tmp = code(x, y, z, t)
tmp = 1.0 / ((y - z) * ((t - z) / x));
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(1.0 / N[(N[(y - z), $MachinePrecision] * N[(N[(t - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\frac{1}{\left(y - z\right) \cdot \frac{t - z}{x}}
\end{array}
Initial program 90.4%
associate-/l/95.8%
Simplified95.8%
clear-num95.7%
inv-pow95.7%
Applied egg-rr95.7%
div-inv95.6%
unpow-195.6%
associate-*l/96.2%
*-un-lft-identity96.2%
associate-/l*97.5%
clear-num97.2%
inv-pow97.2%
*-un-lft-identity97.2%
times-frac95.8%
clear-num95.8%
/-rgt-identity95.8%
Applied egg-rr95.8%
unpow-195.8%
Simplified95.8%
Final simplification95.8%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- y z) (- t z))))
(if (<= t_1 (- INFINITY))
(/ (/ x t) (- y z))
(if (<= t_1 5e+299) (/ x t_1) (/ (/ (- x) z) (- y z))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (x / t) / (y - z);
} else if (t_1 <= 5e+299) {
tmp = x / t_1;
} else {
tmp = (-x / z) / (y - z);
}
return tmp;
}
assert y < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = (x / t) / (y - z);
} else if (t_1 <= 5e+299) {
tmp = x / t_1;
} else {
tmp = (-x / z) / (y - z);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = (y - z) * (t - z) tmp = 0 if t_1 <= -math.inf: tmp = (x / t) / (y - z) elif t_1 <= 5e+299: tmp = x / t_1 else: tmp = (-x / z) / (y - z) return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(y - z) * Float64(t - z)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(x / t) / Float64(y - z)); elseif (t_1 <= 5e+299) tmp = Float64(x / t_1); else tmp = Float64(Float64(Float64(-x) / z) / Float64(y - z)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (y - z) * (t - z);
tmp = 0.0;
if (t_1 <= -Inf)
tmp = (x / t) / (y - z);
elseif (t_1 <= 5e+299)
tmp = x / t_1;
else
tmp = (-x / z) / (y - z);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+299], N[(x / t$95$1), $MachinePrecision], N[(N[((-x) / z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+299}:\\
\;\;\;\;\frac{x}{t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{-x}{z}}{y - z}\\
\end{array}
\end{array}
if (*.f64 (-.f64 y z) (-.f64 t z)) < -inf.0Initial program 61.3%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in t around inf 87.9%
if -inf.0 < (*.f64 (-.f64 y z) (-.f64 t z)) < 5.0000000000000003e299Initial program 98.5%
if 5.0000000000000003e299 < (*.f64 (-.f64 y z) (-.f64 t z)) Initial program 83.5%
Taylor expanded in t around 0 77.6%
associate-*r/77.6%
neg-mul-177.6%
*-commutative77.6%
associate-/r*92.7%
Simplified92.7%
Final simplification95.7%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x z) z)) (t_2 (/ x (* y (- z)))))
(if (<= z -1.85e+43)
t_1
(if (<= z -420000000000.0)
t_2
(if (<= z -3.6e-50)
t_1
(if (<= z 2.5e-135) (/ x (* y t)) (if (<= z 1.16e+36) t_2 t_1)))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double t_2 = x / (y * -z);
double tmp;
if (z <= -1.85e+43) {
tmp = t_1;
} else if (z <= -420000000000.0) {
tmp = t_2;
} else if (z <= -3.6e-50) {
tmp = t_1;
} else if (z <= 2.5e-135) {
tmp = x / (y * t);
} else if (z <= 1.16e+36) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x / z) / z
t_2 = x / (y * -z)
if (z <= (-1.85d+43)) then
tmp = t_1
else if (z <= (-420000000000.0d0)) then
tmp = t_2
else if (z <= (-3.6d-50)) then
tmp = t_1
else if (z <= 2.5d-135) then
tmp = x / (y * t)
else if (z <= 1.16d+36) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double t_2 = x / (y * -z);
double tmp;
if (z <= -1.85e+43) {
tmp = t_1;
} else if (z <= -420000000000.0) {
tmp = t_2;
} else if (z <= -3.6e-50) {
tmp = t_1;
} else if (z <= 2.5e-135) {
tmp = x / (y * t);
} else if (z <= 1.16e+36) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = (x / z) / z t_2 = x / (y * -z) tmp = 0 if z <= -1.85e+43: tmp = t_1 elif z <= -420000000000.0: tmp = t_2 elif z <= -3.6e-50: tmp = t_1 elif z <= 2.5e-135: tmp = x / (y * t) elif z <= 1.16e+36: tmp = t_2 else: tmp = t_1 return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) / z) t_2 = Float64(x / Float64(y * Float64(-z))) tmp = 0.0 if (z <= -1.85e+43) tmp = t_1; elseif (z <= -420000000000.0) tmp = t_2; elseif (z <= -3.6e-50) tmp = t_1; elseif (z <= 2.5e-135) tmp = Float64(x / Float64(y * t)); elseif (z <= 1.16e+36) tmp = t_2; else tmp = t_1; end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / z) / z;
t_2 = x / (y * -z);
tmp = 0.0;
if (z <= -1.85e+43)
tmp = t_1;
elseif (z <= -420000000000.0)
tmp = t_2;
elseif (z <= -3.6e-50)
tmp = t_1;
elseif (z <= 2.5e-135)
tmp = x / (y * t);
elseif (z <= 1.16e+36)
tmp = t_2;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(y * (-z)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.85e+43], t$95$1, If[LessEqual[z, -420000000000.0], t$95$2, If[LessEqual[z, -3.6e-50], t$95$1, If[LessEqual[z, 2.5e-135], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.16e+36], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z}\\
t_2 := \frac{x}{y \cdot \left(-z\right)}\\
\mathbf{if}\;z \leq -1.85 \cdot 10^{+43}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -420000000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{-50}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-135}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\mathbf{elif}\;z \leq 1.16 \cdot 10^{+36}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.85e43 or -4.2e11 < z < -3.59999999999999979e-50 or 1.15999999999999998e36 < z Initial program 86.4%
Taylor expanded in z around inf 75.9%
unpow275.9%
associate-/r*80.7%
Simplified80.7%
if -1.85e43 < z < -4.2e11 or 2.5000000000000001e-135 < z < 1.15999999999999998e36Initial program 97.4%
Taylor expanded in y around inf 56.2%
*-commutative56.2%
Simplified56.2%
Taylor expanded in t around 0 37.5%
mul-1-neg37.5%
distribute-rgt-neg-out37.5%
Simplified37.5%
if -3.59999999999999979e-50 < z < 2.5000000000000001e-135Initial program 93.0%
Taylor expanded in z around 0 67.3%
Final simplification69.2%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x z) z)) (t_2 (/ x (* y (- z)))))
(if (<= z -5.6e+44)
t_1
(if (<= z -310000000.0)
t_2
(if (<= z -1.02e-61)
(/ (- x) (* z t))
(if (<= z 1.06e-106) (/ x (* y t)) (if (<= z 9e+35) t_2 t_1)))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double t_2 = x / (y * -z);
double tmp;
if (z <= -5.6e+44) {
tmp = t_1;
} else if (z <= -310000000.0) {
tmp = t_2;
} else if (z <= -1.02e-61) {
tmp = -x / (z * t);
} else if (z <= 1.06e-106) {
tmp = x / (y * t);
} else if (z <= 9e+35) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x / z) / z
t_2 = x / (y * -z)
if (z <= (-5.6d+44)) then
tmp = t_1
else if (z <= (-310000000.0d0)) then
tmp = t_2
else if (z <= (-1.02d-61)) then
tmp = -x / (z * t)
else if (z <= 1.06d-106) then
tmp = x / (y * t)
else if (z <= 9d+35) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double t_2 = x / (y * -z);
double tmp;
if (z <= -5.6e+44) {
tmp = t_1;
} else if (z <= -310000000.0) {
tmp = t_2;
} else if (z <= -1.02e-61) {
tmp = -x / (z * t);
} else if (z <= 1.06e-106) {
tmp = x / (y * t);
} else if (z <= 9e+35) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = (x / z) / z t_2 = x / (y * -z) tmp = 0 if z <= -5.6e+44: tmp = t_1 elif z <= -310000000.0: tmp = t_2 elif z <= -1.02e-61: tmp = -x / (z * t) elif z <= 1.06e-106: tmp = x / (y * t) elif z <= 9e+35: tmp = t_2 else: tmp = t_1 return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) / z) t_2 = Float64(x / Float64(y * Float64(-z))) tmp = 0.0 if (z <= -5.6e+44) tmp = t_1; elseif (z <= -310000000.0) tmp = t_2; elseif (z <= -1.02e-61) tmp = Float64(Float64(-x) / Float64(z * t)); elseif (z <= 1.06e-106) tmp = Float64(x / Float64(y * t)); elseif (z <= 9e+35) tmp = t_2; else tmp = t_1; end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / z) / z;
t_2 = x / (y * -z);
tmp = 0.0;
if (z <= -5.6e+44)
tmp = t_1;
elseif (z <= -310000000.0)
tmp = t_2;
elseif (z <= -1.02e-61)
tmp = -x / (z * t);
elseif (z <= 1.06e-106)
tmp = x / (y * t);
elseif (z <= 9e+35)
tmp = t_2;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(y * (-z)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.6e+44], t$95$1, If[LessEqual[z, -310000000.0], t$95$2, If[LessEqual[z, -1.02e-61], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.06e-106], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9e+35], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z}\\
t_2 := \frac{x}{y \cdot \left(-z\right)}\\
\mathbf{if}\;z \leq -5.6 \cdot 10^{+44}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -310000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -1.02 \cdot 10^{-61}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\mathbf{elif}\;z \leq 1.06 \cdot 10^{-106}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\mathbf{elif}\;z \leq 9 \cdot 10^{+35}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -5.6000000000000002e44 or 8.9999999999999993e35 < z Initial program 84.6%
Taylor expanded in z around inf 80.9%
unpow280.9%
associate-/r*86.3%
Simplified86.3%
if -5.6000000000000002e44 < z < -3.1e8 or 1.06e-106 < z < 8.9999999999999993e35Initial program 97.5%
Taylor expanded in y around inf 57.2%
*-commutative57.2%
Simplified57.2%
Taylor expanded in t around 0 36.7%
mul-1-neg36.7%
distribute-rgt-neg-out36.7%
Simplified36.7%
if -3.1e8 < z < -1.02e-61Initial program 99.6%
Taylor expanded in y around 0 59.2%
mul-1-neg59.2%
distribute-frac-neg59.2%
associate-/r*59.2%
Simplified59.2%
Taylor expanded in z around 0 29.8%
associate-*r/29.8%
neg-mul-129.8%
*-commutative29.8%
Simplified29.8%
if -1.02e-61 < z < 1.06e-106Initial program 92.8%
Taylor expanded in z around 0 67.6%
Final simplification68.3%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x z) z)) (t_2 (/ x (* y (- z)))))
(if (<= z -1.3e+45)
t_1
(if (<= z -220.0)
t_2
(if (<= z -2.65e-58)
(/ (/ (- x) t) z)
(if (<= z 1.55e-108) (/ x (* y t)) (if (<= z 2.9e+38) t_2 t_1)))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double t_2 = x / (y * -z);
double tmp;
if (z <= -1.3e+45) {
tmp = t_1;
} else if (z <= -220.0) {
tmp = t_2;
} else if (z <= -2.65e-58) {
tmp = (-x / t) / z;
} else if (z <= 1.55e-108) {
tmp = x / (y * t);
} else if (z <= 2.9e+38) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x / z) / z
t_2 = x / (y * -z)
if (z <= (-1.3d+45)) then
tmp = t_1
else if (z <= (-220.0d0)) then
tmp = t_2
else if (z <= (-2.65d-58)) then
tmp = (-x / t) / z
else if (z <= 1.55d-108) then
tmp = x / (y * t)
else if (z <= 2.9d+38) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double t_2 = x / (y * -z);
double tmp;
if (z <= -1.3e+45) {
tmp = t_1;
} else if (z <= -220.0) {
tmp = t_2;
} else if (z <= -2.65e-58) {
tmp = (-x / t) / z;
} else if (z <= 1.55e-108) {
tmp = x / (y * t);
} else if (z <= 2.9e+38) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = (x / z) / z t_2 = x / (y * -z) tmp = 0 if z <= -1.3e+45: tmp = t_1 elif z <= -220.0: tmp = t_2 elif z <= -2.65e-58: tmp = (-x / t) / z elif z <= 1.55e-108: tmp = x / (y * t) elif z <= 2.9e+38: tmp = t_2 else: tmp = t_1 return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) / z) t_2 = Float64(x / Float64(y * Float64(-z))) tmp = 0.0 if (z <= -1.3e+45) tmp = t_1; elseif (z <= -220.0) tmp = t_2; elseif (z <= -2.65e-58) tmp = Float64(Float64(Float64(-x) / t) / z); elseif (z <= 1.55e-108) tmp = Float64(x / Float64(y * t)); elseif (z <= 2.9e+38) tmp = t_2; else tmp = t_1; end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / z) / z;
t_2 = x / (y * -z);
tmp = 0.0;
if (z <= -1.3e+45)
tmp = t_1;
elseif (z <= -220.0)
tmp = t_2;
elseif (z <= -2.65e-58)
tmp = (-x / t) / z;
elseif (z <= 1.55e-108)
tmp = x / (y * t);
elseif (z <= 2.9e+38)
tmp = t_2;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(y * (-z)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.3e+45], t$95$1, If[LessEqual[z, -220.0], t$95$2, If[LessEqual[z, -2.65e-58], N[(N[((-x) / t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 1.55e-108], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.9e+38], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z}\\
t_2 := \frac{x}{y \cdot \left(-z\right)}\\
\mathbf{if}\;z \leq -1.3 \cdot 10^{+45}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -220:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -2.65 \cdot 10^{-58}:\\
\;\;\;\;\frac{\frac{-x}{t}}{z}\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-108}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{+38}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.30000000000000004e45 or 2.90000000000000007e38 < z Initial program 84.6%
Taylor expanded in z around inf 80.9%
unpow280.9%
associate-/r*86.3%
Simplified86.3%
if -1.30000000000000004e45 < z < -220 or 1.55000000000000007e-108 < z < 2.90000000000000007e38Initial program 97.5%
Taylor expanded in y around inf 57.2%
*-commutative57.2%
Simplified57.2%
Taylor expanded in t around 0 36.7%
mul-1-neg36.7%
distribute-rgt-neg-out36.7%
Simplified36.7%
if -220 < z < -2.6500000000000002e-58Initial program 99.6%
Taylor expanded in y around 0 59.2%
mul-1-neg59.2%
distribute-frac-neg59.2%
associate-/r*59.2%
Simplified59.2%
Taylor expanded in z around 0 29.8%
associate-*r/29.8%
neg-mul-129.8%
*-commutative29.8%
Simplified29.8%
Taylor expanded in x around 0 29.8%
mul-1-neg29.8%
associate-/r*29.7%
distribute-neg-frac29.7%
Simplified29.7%
if -2.6500000000000002e-58 < z < 1.55000000000000007e-108Initial program 92.8%
Taylor expanded in z around 0 67.6%
Final simplification68.3%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x z) z)))
(if (<= z -2.6e+46)
t_1
(if (<= z -8.8)
(/ (/ (- x) y) z)
(if (<= z -1.5e-64)
(/ (/ (- x) t) z)
(if (<= z 4.2e-106)
(/ x (* y t))
(if (<= z 1.65e+34) (/ x (* y (- z))) t_1)))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double tmp;
if (z <= -2.6e+46) {
tmp = t_1;
} else if (z <= -8.8) {
tmp = (-x / y) / z;
} else if (z <= -1.5e-64) {
tmp = (-x / t) / z;
} else if (z <= 4.2e-106) {
tmp = x / (y * t);
} else if (z <= 1.65e+34) {
tmp = x / (y * -z);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x / z) / z
if (z <= (-2.6d+46)) then
tmp = t_1
else if (z <= (-8.8d0)) then
tmp = (-x / y) / z
else if (z <= (-1.5d-64)) then
tmp = (-x / t) / z
else if (z <= 4.2d-106) then
tmp = x / (y * t)
else if (z <= 1.65d+34) then
tmp = x / (y * -z)
else
tmp = t_1
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double tmp;
if (z <= -2.6e+46) {
tmp = t_1;
} else if (z <= -8.8) {
tmp = (-x / y) / z;
} else if (z <= -1.5e-64) {
tmp = (-x / t) / z;
} else if (z <= 4.2e-106) {
tmp = x / (y * t);
} else if (z <= 1.65e+34) {
tmp = x / (y * -z);
} else {
tmp = t_1;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = (x / z) / z tmp = 0 if z <= -2.6e+46: tmp = t_1 elif z <= -8.8: tmp = (-x / y) / z elif z <= -1.5e-64: tmp = (-x / t) / z elif z <= 4.2e-106: tmp = x / (y * t) elif z <= 1.65e+34: tmp = x / (y * -z) else: tmp = t_1 return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) / z) tmp = 0.0 if (z <= -2.6e+46) tmp = t_1; elseif (z <= -8.8) tmp = Float64(Float64(Float64(-x) / y) / z); elseif (z <= -1.5e-64) tmp = Float64(Float64(Float64(-x) / t) / z); elseif (z <= 4.2e-106) tmp = Float64(x / Float64(y * t)); elseif (z <= 1.65e+34) tmp = Float64(x / Float64(y * Float64(-z))); else tmp = t_1; end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / z) / z;
tmp = 0.0;
if (z <= -2.6e+46)
tmp = t_1;
elseif (z <= -8.8)
tmp = (-x / y) / z;
elseif (z <= -1.5e-64)
tmp = (-x / t) / z;
elseif (z <= 4.2e-106)
tmp = x / (y * t);
elseif (z <= 1.65e+34)
tmp = x / (y * -z);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -2.6e+46], t$95$1, If[LessEqual[z, -8.8], N[(N[((-x) / y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -1.5e-64], N[(N[((-x) / t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 4.2e-106], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e+34], N[(x / N[(y * (-z)), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z}\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{+46}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -8.8:\\
\;\;\;\;\frac{\frac{-x}{y}}{z}\\
\mathbf{elif}\;z \leq -1.5 \cdot 10^{-64}:\\
\;\;\;\;\frac{\frac{-x}{t}}{z}\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-106}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{+34}:\\
\;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.60000000000000013e46 or 1.64999999999999994e34 < z Initial program 84.6%
Taylor expanded in z around inf 80.9%
unpow280.9%
associate-/r*86.3%
Simplified86.3%
if -2.60000000000000013e46 < z < -8.8000000000000007Initial program 88.1%
Taylor expanded in y around inf 64.4%
*-commutative64.4%
Simplified64.4%
Taylor expanded in t around 0 49.6%
mul-1-neg49.6%
associate-/r*49.6%
distribute-neg-frac49.6%
distribute-neg-frac49.6%
Simplified49.6%
if -8.8000000000000007 < z < -1.5e-64Initial program 99.6%
Taylor expanded in y around 0 59.2%
mul-1-neg59.2%
distribute-frac-neg59.2%
associate-/r*59.2%
Simplified59.2%
Taylor expanded in z around 0 29.8%
associate-*r/29.8%
neg-mul-129.8%
*-commutative29.8%
Simplified29.8%
Taylor expanded in x around 0 29.8%
mul-1-neg29.8%
associate-/r*29.7%
distribute-neg-frac29.7%
Simplified29.7%
if -1.5e-64 < z < 4.20000000000000007e-106Initial program 92.8%
Taylor expanded in z around 0 67.6%
if 4.20000000000000007e-106 < z < 1.64999999999999994e34Initial program 99.6%
Taylor expanded in y around inf 55.6%
*-commutative55.6%
Simplified55.6%
Taylor expanded in t around 0 33.8%
mul-1-neg33.8%
distribute-rgt-neg-out33.8%
Simplified33.8%
Final simplification68.3%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x z) z)))
(if (<= z -3.2e+45)
t_1
(if (<= z -2.4)
(/ (/ (- x) y) z)
(if (<= z -4.7e-58)
(/ (/ (- x) t) z)
(if (<= z 1e-106)
(/ 1.0 (/ y (/ x t)))
(if (<= z 1.7e+38) (/ x (* y (- z))) t_1)))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double tmp;
if (z <= -3.2e+45) {
tmp = t_1;
} else if (z <= -2.4) {
tmp = (-x / y) / z;
} else if (z <= -4.7e-58) {
tmp = (-x / t) / z;
} else if (z <= 1e-106) {
tmp = 1.0 / (y / (x / t));
} else if (z <= 1.7e+38) {
tmp = x / (y * -z);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x / z) / z
if (z <= (-3.2d+45)) then
tmp = t_1
else if (z <= (-2.4d0)) then
tmp = (-x / y) / z
else if (z <= (-4.7d-58)) then
tmp = (-x / t) / z
else if (z <= 1d-106) then
tmp = 1.0d0 / (y / (x / t))
else if (z <= 1.7d+38) then
tmp = x / (y * -z)
else
tmp = t_1
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double tmp;
if (z <= -3.2e+45) {
tmp = t_1;
} else if (z <= -2.4) {
tmp = (-x / y) / z;
} else if (z <= -4.7e-58) {
tmp = (-x / t) / z;
} else if (z <= 1e-106) {
tmp = 1.0 / (y / (x / t));
} else if (z <= 1.7e+38) {
tmp = x / (y * -z);
} else {
tmp = t_1;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = (x / z) / z tmp = 0 if z <= -3.2e+45: tmp = t_1 elif z <= -2.4: tmp = (-x / y) / z elif z <= -4.7e-58: tmp = (-x / t) / z elif z <= 1e-106: tmp = 1.0 / (y / (x / t)) elif z <= 1.7e+38: tmp = x / (y * -z) else: tmp = t_1 return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) / z) tmp = 0.0 if (z <= -3.2e+45) tmp = t_1; elseif (z <= -2.4) tmp = Float64(Float64(Float64(-x) / y) / z); elseif (z <= -4.7e-58) tmp = Float64(Float64(Float64(-x) / t) / z); elseif (z <= 1e-106) tmp = Float64(1.0 / Float64(y / Float64(x / t))); elseif (z <= 1.7e+38) tmp = Float64(x / Float64(y * Float64(-z))); else tmp = t_1; end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / z) / z;
tmp = 0.0;
if (z <= -3.2e+45)
tmp = t_1;
elseif (z <= -2.4)
tmp = (-x / y) / z;
elseif (z <= -4.7e-58)
tmp = (-x / t) / z;
elseif (z <= 1e-106)
tmp = 1.0 / (y / (x / t));
elseif (z <= 1.7e+38)
tmp = x / (y * -z);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -3.2e+45], t$95$1, If[LessEqual[z, -2.4], N[(N[((-x) / y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -4.7e-58], N[(N[((-x) / t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 1e-106], N[(1.0 / N[(y / N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.7e+38], N[(x / N[(y * (-z)), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z}\\
\mathbf{if}\;z \leq -3.2 \cdot 10^{+45}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.4:\\
\;\;\;\;\frac{\frac{-x}{y}}{z}\\
\mathbf{elif}\;z \leq -4.7 \cdot 10^{-58}:\\
\;\;\;\;\frac{\frac{-x}{t}}{z}\\
\mathbf{elif}\;z \leq 10^{-106}:\\
\;\;\;\;\frac{1}{\frac{y}{\frac{x}{t}}}\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{+38}:\\
\;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -3.2000000000000003e45 or 1.69999999999999998e38 < z Initial program 84.6%
Taylor expanded in z around inf 80.9%
unpow280.9%
associate-/r*86.3%
Simplified86.3%
if -3.2000000000000003e45 < z < -2.39999999999999991Initial program 88.1%
Taylor expanded in y around inf 64.4%
*-commutative64.4%
Simplified64.4%
Taylor expanded in t around 0 49.6%
mul-1-neg49.6%
associate-/r*49.6%
distribute-neg-frac49.6%
distribute-neg-frac49.6%
Simplified49.6%
if -2.39999999999999991 < z < -4.69999999999999994e-58Initial program 99.6%
Taylor expanded in y around 0 59.2%
mul-1-neg59.2%
distribute-frac-neg59.2%
associate-/r*59.2%
Simplified59.2%
Taylor expanded in z around 0 29.8%
associate-*r/29.8%
neg-mul-129.8%
*-commutative29.8%
Simplified29.8%
Taylor expanded in x around 0 29.8%
mul-1-neg29.8%
associate-/r*29.7%
distribute-neg-frac29.7%
Simplified29.7%
if -4.69999999999999994e-58 < z < 9.99999999999999941e-107Initial program 92.8%
associate-/l/89.3%
Simplified89.3%
clear-num89.2%
inv-pow89.2%
Applied egg-rr89.2%
div-inv89.2%
unpow-189.2%
associate-*l/89.9%
*-un-lft-identity89.9%
associate-/l*92.8%
clear-num92.9%
inv-pow92.9%
*-un-lft-identity92.9%
times-frac89.8%
clear-num89.8%
/-rgt-identity89.8%
Applied egg-rr89.8%
unpow-189.8%
Simplified89.8%
Taylor expanded in z around 0 67.6%
associate-/l*67.2%
Simplified67.2%
if 9.99999999999999941e-107 < z < 1.69999999999999998e38Initial program 99.6%
Taylor expanded in y around inf 55.6%
*-commutative55.6%
Simplified55.6%
Taylor expanded in t around 0 33.8%
mul-1-neg33.8%
distribute-rgt-neg-out33.8%
Simplified33.8%
Final simplification68.2%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x z) z)))
(if (<= z -2.5e+43)
t_1
(if (<= z -1020000000.0)
(/ (/ (- x) y) z)
(if (or (<= z -3.5e-11) (not (<= z 9.8e+32)))
t_1
(/ x (* (- y z) t)))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double tmp;
if (z <= -2.5e+43) {
tmp = t_1;
} else if (z <= -1020000000.0) {
tmp = (-x / y) / z;
} else if ((z <= -3.5e-11) || !(z <= 9.8e+32)) {
tmp = t_1;
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x / z) / z
if (z <= (-2.5d+43)) then
tmp = t_1
else if (z <= (-1020000000.0d0)) then
tmp = (-x / y) / z
else if ((z <= (-3.5d-11)) .or. (.not. (z <= 9.8d+32))) then
tmp = t_1
else
tmp = x / ((y - z) * t)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double tmp;
if (z <= -2.5e+43) {
tmp = t_1;
} else if (z <= -1020000000.0) {
tmp = (-x / y) / z;
} else if ((z <= -3.5e-11) || !(z <= 9.8e+32)) {
tmp = t_1;
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = (x / z) / z tmp = 0 if z <= -2.5e+43: tmp = t_1 elif z <= -1020000000.0: tmp = (-x / y) / z elif (z <= -3.5e-11) or not (z <= 9.8e+32): tmp = t_1 else: tmp = x / ((y - z) * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) / z) tmp = 0.0 if (z <= -2.5e+43) tmp = t_1; elseif (z <= -1020000000.0) tmp = Float64(Float64(Float64(-x) / y) / z); elseif ((z <= -3.5e-11) || !(z <= 9.8e+32)) tmp = t_1; else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / z) / z;
tmp = 0.0;
if (z <= -2.5e+43)
tmp = t_1;
elseif (z <= -1020000000.0)
tmp = (-x / y) / z;
elseif ((z <= -3.5e-11) || ~((z <= 9.8e+32)))
tmp = t_1;
else
tmp = x / ((y - z) * t);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -2.5e+43], t$95$1, If[LessEqual[z, -1020000000.0], N[(N[((-x) / y), $MachinePrecision] / z), $MachinePrecision], If[Or[LessEqual[z, -3.5e-11], N[Not[LessEqual[z, 9.8e+32]], $MachinePrecision]], t$95$1, N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z}\\
\mathbf{if}\;z \leq -2.5 \cdot 10^{+43}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1020000000:\\
\;\;\;\;\frac{\frac{-x}{y}}{z}\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-11} \lor \neg \left(z \leq 9.8 \cdot 10^{+32}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if z < -2.5000000000000002e43 or -1.02e9 < z < -3.50000000000000019e-11 or 9.8000000000000003e32 < z Initial program 85.4%
Taylor expanded in z around inf 79.5%
unpow279.5%
associate-/r*84.6%
Simplified84.6%
if -2.5000000000000002e43 < z < -1.02e9Initial program 86.7%
Taylor expanded in y around inf 59.6%
*-commutative59.6%
Simplified59.6%
Taylor expanded in t around 0 56.2%
mul-1-neg56.2%
associate-/r*56.2%
distribute-neg-frac56.2%
distribute-neg-frac56.2%
Simplified56.2%
if -3.50000000000000019e-11 < z < 9.8000000000000003e32Initial program 95.3%
Taylor expanded in t around inf 70.8%
Final simplification77.0%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x z) z)))
(if (<= z -8.6e+44)
t_1
(if (<= z -118000000.0)
(/ (/ (- x) y) z)
(if (<= z -7.5e-59)
(/ (/ (- x) t) z)
(if (<= z 1.75e+24) (/ 1.0 (/ t (/ x y))) t_1))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double tmp;
if (z <= -8.6e+44) {
tmp = t_1;
} else if (z <= -118000000.0) {
tmp = (-x / y) / z;
} else if (z <= -7.5e-59) {
tmp = (-x / t) / z;
} else if (z <= 1.75e+24) {
tmp = 1.0 / (t / (x / y));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x / z) / z
if (z <= (-8.6d+44)) then
tmp = t_1
else if (z <= (-118000000.0d0)) then
tmp = (-x / y) / z
else if (z <= (-7.5d-59)) then
tmp = (-x / t) / z
else if (z <= 1.75d+24) then
tmp = 1.0d0 / (t / (x / y))
else
tmp = t_1
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double tmp;
if (z <= -8.6e+44) {
tmp = t_1;
} else if (z <= -118000000.0) {
tmp = (-x / y) / z;
} else if (z <= -7.5e-59) {
tmp = (-x / t) / z;
} else if (z <= 1.75e+24) {
tmp = 1.0 / (t / (x / y));
} else {
tmp = t_1;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = (x / z) / z tmp = 0 if z <= -8.6e+44: tmp = t_1 elif z <= -118000000.0: tmp = (-x / y) / z elif z <= -7.5e-59: tmp = (-x / t) / z elif z <= 1.75e+24: tmp = 1.0 / (t / (x / y)) else: tmp = t_1 return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) / z) tmp = 0.0 if (z <= -8.6e+44) tmp = t_1; elseif (z <= -118000000.0) tmp = Float64(Float64(Float64(-x) / y) / z); elseif (z <= -7.5e-59) tmp = Float64(Float64(Float64(-x) / t) / z); elseif (z <= 1.75e+24) tmp = Float64(1.0 / Float64(t / Float64(x / y))); else tmp = t_1; end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / z) / z;
tmp = 0.0;
if (z <= -8.6e+44)
tmp = t_1;
elseif (z <= -118000000.0)
tmp = (-x / y) / z;
elseif (z <= -7.5e-59)
tmp = (-x / t) / z;
elseif (z <= 1.75e+24)
tmp = 1.0 / (t / (x / y));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -8.6e+44], t$95$1, If[LessEqual[z, -118000000.0], N[(N[((-x) / y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -7.5e-59], N[(N[((-x) / t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 1.75e+24], N[(1.0 / N[(t / N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z}\\
\mathbf{if}\;z \leq -8.6 \cdot 10^{+44}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -118000000:\\
\;\;\;\;\frac{\frac{-x}{y}}{z}\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{-59}:\\
\;\;\;\;\frac{\frac{-x}{t}}{z}\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{+24}:\\
\;\;\;\;\frac{1}{\frac{t}{\frac{x}{y}}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -8.59999999999999965e44 or 1.7500000000000001e24 < z Initial program 85.1%
Taylor expanded in z around inf 79.1%
unpow279.1%
associate-/r*84.3%
Simplified84.3%
if -8.59999999999999965e44 < z < -1.18e8Initial program 88.1%
Taylor expanded in y around inf 64.4%
*-commutative64.4%
Simplified64.4%
Taylor expanded in t around 0 49.6%
mul-1-neg49.6%
associate-/r*49.6%
distribute-neg-frac49.6%
distribute-neg-frac49.6%
Simplified49.6%
if -1.18e8 < z < -7.50000000000000019e-59Initial program 99.6%
Taylor expanded in y around 0 59.2%
mul-1-neg59.2%
distribute-frac-neg59.2%
associate-/r*59.2%
Simplified59.2%
Taylor expanded in z around 0 29.8%
associate-*r/29.8%
neg-mul-129.8%
*-commutative29.8%
Simplified29.8%
Taylor expanded in x around 0 29.8%
mul-1-neg29.8%
associate-/r*29.7%
distribute-neg-frac29.7%
Simplified29.7%
if -7.50000000000000019e-59 < z < 1.7500000000000001e24Initial program 94.7%
Taylor expanded in z around 0 59.0%
clear-num59.0%
inv-pow59.0%
*-commutative59.0%
Applied egg-rr59.0%
unpow-159.0%
associate-/l*62.2%
Simplified62.2%
Final simplification69.9%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x y) (- t z))))
(if (<= y -1.35e+145)
t_1
(if (<= y -9.8e+48)
(/ x (* y (- t z)))
(if (<= y -4.8e-26)
t_1
(if (<= y 3.4e-98) (/ x (* z (- z t))) (/ x (* (- y z) t))))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / y) / (t - z);
double tmp;
if (y <= -1.35e+145) {
tmp = t_1;
} else if (y <= -9.8e+48) {
tmp = x / (y * (t - z));
} else if (y <= -4.8e-26) {
tmp = t_1;
} else if (y <= 3.4e-98) {
tmp = x / (z * (z - t));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x / y) / (t - z)
if (y <= (-1.35d+145)) then
tmp = t_1
else if (y <= (-9.8d+48)) then
tmp = x / (y * (t - z))
else if (y <= (-4.8d-26)) then
tmp = t_1
else if (y <= 3.4d-98) then
tmp = x / (z * (z - t))
else
tmp = x / ((y - z) * t)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / y) / (t - z);
double tmp;
if (y <= -1.35e+145) {
tmp = t_1;
} else if (y <= -9.8e+48) {
tmp = x / (y * (t - z));
} else if (y <= -4.8e-26) {
tmp = t_1;
} else if (y <= 3.4e-98) {
tmp = x / (z * (z - t));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = (x / y) / (t - z) tmp = 0 if y <= -1.35e+145: tmp = t_1 elif y <= -9.8e+48: tmp = x / (y * (t - z)) elif y <= -4.8e-26: tmp = t_1 elif y <= 3.4e-98: tmp = x / (z * (z - t)) else: tmp = x / ((y - z) * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / y) / Float64(t - z)) tmp = 0.0 if (y <= -1.35e+145) tmp = t_1; elseif (y <= -9.8e+48) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (y <= -4.8e-26) tmp = t_1; elseif (y <= 3.4e-98) tmp = Float64(x / Float64(z * Float64(z - t))); else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / y) / (t - z);
tmp = 0.0;
if (y <= -1.35e+145)
tmp = t_1;
elseif (y <= -9.8e+48)
tmp = x / (y * (t - z));
elseif (y <= -4.8e-26)
tmp = t_1;
elseif (y <= 3.4e-98)
tmp = x / (z * (z - t));
else
tmp = x / ((y - z) * t);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.35e+145], t$95$1, If[LessEqual[y, -9.8e+48], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.8e-26], t$95$1, If[LessEqual[y, 3.4e-98], N[(x / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{y}}{t - z}\\
\mathbf{if}\;y \leq -1.35 \cdot 10^{+145}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -9.8 \cdot 10^{+48}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;y \leq -4.8 \cdot 10^{-26}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{-98}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if y < -1.35000000000000011e145 or -9.80000000000000059e48 < y < -4.8000000000000002e-26Initial program 84.7%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in y around inf 90.1%
if -1.35000000000000011e145 < y < -9.80000000000000059e48Initial program 84.6%
Taylor expanded in y around inf 79.4%
*-commutative79.4%
Simplified79.4%
if -4.8000000000000002e-26 < y < 3.4000000000000001e-98Initial program 94.1%
associate-/l/95.6%
Simplified95.6%
clear-num95.5%
inv-pow95.5%
Applied egg-rr95.5%
div-inv95.5%
unpow-195.5%
associate-*l/95.6%
*-un-lft-identity95.6%
associate-/l*97.5%
clear-num96.7%
inv-pow96.7%
*-un-lft-identity96.7%
times-frac94.6%
clear-num94.7%
/-rgt-identity94.7%
Applied egg-rr94.7%
unpow-194.7%
Simplified94.7%
frac-2neg94.7%
div-inv94.6%
add-sqr-sqrt51.3%
sqrt-unprod52.0%
sqr-neg52.0%
sqrt-unprod13.2%
add-sqr-sqrt33.5%
frac-2neg33.5%
metadata-eval33.5%
add-sqr-sqrt20.2%
sqrt-unprod50.9%
sqr-neg50.9%
sqrt-unprod43.2%
add-sqr-sqrt94.6%
Applied egg-rr94.6%
Taylor expanded in y around 0 88.4%
if 3.4000000000000001e-98 < y Initial program 92.5%
Taylor expanded in t around inf 57.0%
Final simplification78.6%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y -7.6e-25) (/ (/ x (- t z)) y) (if (<= y 6.5e-97) (/ (/ (- x) z) (- t z)) (/ x (* (- y z) t)))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.6e-25) {
tmp = (x / (t - z)) / y;
} else if (y <= 6.5e-97) {
tmp = (-x / z) / (t - z);
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-7.6d-25)) then
tmp = (x / (t - z)) / y
else if (y <= 6.5d-97) then
tmp = (-x / z) / (t - z)
else
tmp = x / ((y - z) * t)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.6e-25) {
tmp = (x / (t - z)) / y;
} else if (y <= 6.5e-97) {
tmp = (-x / z) / (t - z);
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if y <= -7.6e-25: tmp = (x / (t - z)) / y elif y <= 6.5e-97: tmp = (-x / z) / (t - z) else: tmp = x / ((y - z) * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -7.6e-25) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (y <= 6.5e-97) tmp = Float64(Float64(Float64(-x) / z) / Float64(t - z)); else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -7.6e-25)
tmp = (x / (t - z)) / y;
elseif (y <= 6.5e-97)
tmp = (-x / z) / (t - z);
else
tmp = x / ((y - z) * t);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -7.6e-25], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 6.5e-97], N[(N[((-x) / z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.6 \cdot 10^{-25}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{-97}:\\
\;\;\;\;\frac{\frac{-x}{z}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if y < -7.5999999999999996e-25Initial program 84.7%
Taylor expanded in y around inf 81.3%
*-commutative81.3%
associate-/r*83.8%
Simplified83.8%
if -7.5999999999999996e-25 < y < 6.5000000000000004e-97Initial program 94.1%
Taylor expanded in y around 0 88.4%
mul-1-neg88.4%
distribute-frac-neg88.4%
associate-/r*91.0%
Simplified91.0%
if 6.5000000000000004e-97 < y Initial program 92.5%
Taylor expanded in t around inf 57.0%
Final simplification78.2%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y -3.4e-25) (/ x (* y (- t z))) (if (<= y 7.5e-305) (/ (/ x z) z) (/ x (* (- y z) t)))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.4e-25) {
tmp = x / (y * (t - z));
} else if (y <= 7.5e-305) {
tmp = (x / z) / z;
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-3.4d-25)) then
tmp = x / (y * (t - z))
else if (y <= 7.5d-305) then
tmp = (x / z) / z
else
tmp = x / ((y - z) * t)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.4e-25) {
tmp = x / (y * (t - z));
} else if (y <= 7.5e-305) {
tmp = (x / z) / z;
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if y <= -3.4e-25: tmp = x / (y * (t - z)) elif y <= 7.5e-305: tmp = (x / z) / z else: tmp = x / ((y - z) * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -3.4e-25) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (y <= 7.5e-305) tmp = Float64(Float64(x / z) / z); else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -3.4e-25)
tmp = x / (y * (t - z));
elseif (y <= 7.5e-305)
tmp = (x / z) / z;
else
tmp = x / ((y - z) * t);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -3.4e-25], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.5e-305], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.4 \cdot 10^{-25}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{-305}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if y < -3.40000000000000002e-25Initial program 84.7%
Taylor expanded in y around inf 81.3%
*-commutative81.3%
Simplified81.3%
if -3.40000000000000002e-25 < y < 7.5000000000000003e-305Initial program 93.9%
Taylor expanded in z around inf 68.9%
unpow268.9%
associate-/r*73.3%
Simplified73.3%
if 7.5000000000000003e-305 < y Initial program 93.1%
Taylor expanded in t around inf 58.9%
Final simplification69.7%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y -4.2e-25) (/ x (* y (- t z))) (if (<= y 1.5e-99) (/ x (* z (- z t))) (/ x (* (- y z) t)))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.2e-25) {
tmp = x / (y * (t - z));
} else if (y <= 1.5e-99) {
tmp = x / (z * (z - t));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-4.2d-25)) then
tmp = x / (y * (t - z))
else if (y <= 1.5d-99) then
tmp = x / (z * (z - t))
else
tmp = x / ((y - z) * t)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.2e-25) {
tmp = x / (y * (t - z));
} else if (y <= 1.5e-99) {
tmp = x / (z * (z - t));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if y <= -4.2e-25: tmp = x / (y * (t - z)) elif y <= 1.5e-99: tmp = x / (z * (z - t)) else: tmp = x / ((y - z) * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -4.2e-25) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (y <= 1.5e-99) tmp = Float64(x / Float64(z * Float64(z - t))); else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -4.2e-25)
tmp = x / (y * (t - z));
elseif (y <= 1.5e-99)
tmp = x / (z * (z - t));
else
tmp = x / ((y - z) * t);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -4.2e-25], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e-99], N[(x / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{-25}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{-99}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if y < -4.20000000000000005e-25Initial program 84.7%
Taylor expanded in y around inf 81.3%
*-commutative81.3%
Simplified81.3%
if -4.20000000000000005e-25 < y < 1.50000000000000003e-99Initial program 94.1%
associate-/l/95.6%
Simplified95.6%
clear-num95.5%
inv-pow95.5%
Applied egg-rr95.5%
div-inv95.5%
unpow-195.5%
associate-*l/95.6%
*-un-lft-identity95.6%
associate-/l*97.5%
clear-num96.7%
inv-pow96.7%
*-un-lft-identity96.7%
times-frac94.6%
clear-num94.7%
/-rgt-identity94.7%
Applied egg-rr94.7%
unpow-194.7%
Simplified94.7%
frac-2neg94.7%
div-inv94.6%
add-sqr-sqrt51.3%
sqrt-unprod52.0%
sqr-neg52.0%
sqrt-unprod13.2%
add-sqr-sqrt33.5%
frac-2neg33.5%
metadata-eval33.5%
add-sqr-sqrt20.2%
sqrt-unprod50.9%
sqr-neg50.9%
sqrt-unprod43.2%
add-sqr-sqrt94.6%
Applied egg-rr94.6%
Taylor expanded in y around 0 88.4%
if 1.50000000000000003e-99 < y Initial program 92.5%
Taylor expanded in t around inf 57.0%
Final simplification76.4%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y -4.6e-26) (/ (/ x (- t z)) y) (if (<= y 1.32e-99) (/ x (* z (- z t))) (/ x (* (- y z) t)))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.6e-26) {
tmp = (x / (t - z)) / y;
} else if (y <= 1.32e-99) {
tmp = x / (z * (z - t));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-4.6d-26)) then
tmp = (x / (t - z)) / y
else if (y <= 1.32d-99) then
tmp = x / (z * (z - t))
else
tmp = x / ((y - z) * t)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.6e-26) {
tmp = (x / (t - z)) / y;
} else if (y <= 1.32e-99) {
tmp = x / (z * (z - t));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if y <= -4.6e-26: tmp = (x / (t - z)) / y elif y <= 1.32e-99: tmp = x / (z * (z - t)) else: tmp = x / ((y - z) * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -4.6e-26) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (y <= 1.32e-99) tmp = Float64(x / Float64(z * Float64(z - t))); else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -4.6e-26)
tmp = (x / (t - z)) / y;
elseif (y <= 1.32e-99)
tmp = x / (z * (z - t));
else
tmp = x / ((y - z) * t);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -4.6e-26], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 1.32e-99], N[(x / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.6 \cdot 10^{-26}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;y \leq 1.32 \cdot 10^{-99}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if y < -4.60000000000000018e-26Initial program 84.7%
Taylor expanded in y around inf 81.3%
*-commutative81.3%
associate-/r*83.8%
Simplified83.8%
if -4.60000000000000018e-26 < y < 1.31999999999999999e-99Initial program 94.1%
associate-/l/95.6%
Simplified95.6%
clear-num95.5%
inv-pow95.5%
Applied egg-rr95.5%
div-inv95.5%
unpow-195.5%
associate-*l/95.6%
*-un-lft-identity95.6%
associate-/l*97.5%
clear-num96.7%
inv-pow96.7%
*-un-lft-identity96.7%
times-frac94.6%
clear-num94.7%
/-rgt-identity94.7%
Applied egg-rr94.7%
unpow-194.7%
Simplified94.7%
frac-2neg94.7%
div-inv94.6%
add-sqr-sqrt51.3%
sqrt-unprod52.0%
sqr-neg52.0%
sqrt-unprod13.2%
add-sqr-sqrt33.5%
frac-2neg33.5%
metadata-eval33.5%
add-sqr-sqrt20.2%
sqrt-unprod50.9%
sqr-neg50.9%
sqrt-unprod43.2%
add-sqr-sqrt94.6%
Applied egg-rr94.6%
Taylor expanded in y around 0 88.4%
if 1.31999999999999999e-99 < y Initial program 92.5%
Taylor expanded in t around inf 57.0%
Final simplification77.3%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -3.6e-50) (not (<= z 0.017))) (/ x (* z z)) (/ x (* y t))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.6e-50) || !(z <= 0.017)) {
tmp = x / (z * z);
} else {
tmp = x / (y * t);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-3.6d-50)) .or. (.not. (z <= 0.017d0))) then
tmp = x / (z * z)
else
tmp = x / (y * t)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.6e-50) || !(z <= 0.017)) {
tmp = x / (z * z);
} else {
tmp = x / (y * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -3.6e-50) or not (z <= 0.017): tmp = x / (z * z) else: tmp = x / (y * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -3.6e-50) || !(z <= 0.017)) tmp = Float64(x / Float64(z * z)); else tmp = Float64(x / Float64(y * t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -3.6e-50) || ~((z <= 0.017)))
tmp = x / (z * z);
else
tmp = x / (y * t);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -3.6e-50], N[Not[LessEqual[z, 0.017]], $MachinePrecision]], N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{-50} \lor \neg \left(z \leq 0.017\right):\\
\;\;\;\;\frac{x}{z \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -3.59999999999999979e-50 or 0.017000000000000001 < z Initial program 87.6%
Taylor expanded in z around inf 69.0%
unpow269.0%
Simplified69.0%
if -3.59999999999999979e-50 < z < 0.017000000000000001Initial program 94.4%
Taylor expanded in z around 0 62.4%
Final simplification66.3%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -2.6e-50) (not (<= z 0.000325))) (/ (/ x z) z) (/ x (* y t))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.6e-50) || !(z <= 0.000325)) {
tmp = (x / z) / z;
} else {
tmp = x / (y * t);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-2.6d-50)) .or. (.not. (z <= 0.000325d0))) then
tmp = (x / z) / z
else
tmp = x / (y * t)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.6e-50) || !(z <= 0.000325)) {
tmp = (x / z) / z;
} else {
tmp = x / (y * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -2.6e-50) or not (z <= 0.000325): tmp = (x / z) / z else: tmp = x / (y * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -2.6e-50) || !(z <= 0.000325)) tmp = Float64(Float64(x / z) / z); else tmp = Float64(x / Float64(y * t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -2.6e-50) || ~((z <= 0.000325)))
tmp = (x / z) / z;
else
tmp = x / (y * t);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -2.6e-50], N[Not[LessEqual[z, 0.000325]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{-50} \lor \neg \left(z \leq 0.000325\right):\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -2.6000000000000001e-50 or 3.2499999999999999e-4 < z Initial program 87.6%
Taylor expanded in z around inf 69.0%
unpow269.0%
associate-/r*73.1%
Simplified73.1%
if -2.6000000000000001e-50 < z < 3.2499999999999999e-4Initial program 94.4%
Taylor expanded in z around 0 62.4%
Final simplification68.8%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (/ (/ x (- t z)) (- y z)))
assert(y < t);
double code(double x, double y, double z, double t) {
return (x / (t - z)) / (y - z);
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x / (t - z)) / (y - z)
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
return (x / (t - z)) / (y - z);
}
[y, t] = sort([y, t]) def code(x, y, z, t): return (x / (t - z)) / (y - z)
y, t = sort([y, t]) function code(x, y, z, t) return Float64(Float64(x / Float64(t - z)) / Float64(y - z)) end
y, t = num2cell(sort([y, t])){:}
function tmp = code(x, y, z, t)
tmp = (x / (t - z)) / (y - z);
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\frac{\frac{x}{t - z}}{y - z}
\end{array}
Initial program 90.4%
associate-/l/95.8%
Simplified95.8%
Final simplification95.8%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (/ x (* y t)))
assert(y < t);
double code(double x, double y, double z, double t) {
return x / (y * t);
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x / (y * t)
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
return x / (y * t);
}
[y, t] = sort([y, t]) def code(x, y, z, t): return x / (y * t)
y, t = sort([y, t]) function code(x, y, z, t) return Float64(x / Float64(y * t)) end
y, t = num2cell(sort([y, t])){:}
function tmp = code(x, y, z, t)
tmp = x / (y * t);
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\frac{x}{y \cdot t}
\end{array}
Initial program 90.4%
Taylor expanded in z around 0 36.8%
Final simplification36.8%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* (- y z) (- t z)))) (if (< (/ x t_1) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if ((x / t_1) < 0.0) {
tmp = (x / (y - z)) / (t - z);
} else {
tmp = x * (1.0 / t_1);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (y - z) * (t - z)
if ((x / t_1) < 0.0d0) then
tmp = (x / (y - z)) / (t - z)
else
tmp = x * (1.0d0 / t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y - z) * (t - z);
double tmp;
if ((x / t_1) < 0.0) {
tmp = (x / (y - z)) / (t - z);
} else {
tmp = x * (1.0 / t_1);
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - z) * (t - z) tmp = 0 if (x / t_1) < 0.0: tmp = (x / (y - z)) / (t - z) else: tmp = x * (1.0 / t_1) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - z) * Float64(t - z)) tmp = 0.0 if (Float64(x / t_1) < 0.0) tmp = Float64(Float64(x / Float64(y - z)) / Float64(t - z)); else tmp = Float64(x * Float64(1.0 / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - z) * (t - z); tmp = 0.0; if ((x / t_1) < 0.0) tmp = (x / (y - z)) / (t - z); else tmp = x * (1.0 / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[Less[N[(x / t$95$1), $MachinePrecision], 0.0], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
\mathbf{if}\;\frac{x}{t_1} < 0:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{1}{t_1}\\
\end{array}
\end{array}
herbie shell --seed 2023224
(FPCore (x y z t)
:name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
:precision binary64
:herbie-target
(if (< (/ x (* (- y z) (- t z))) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 (* (- y z) (- t z)))))
(/ x (* (- y z) (- t z))))