
(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 20 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: x, y, z, 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(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return (x / (t - z)) / (y - z);
}
NOTE: x, y, z, 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 x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return (x / (t - z)) / (y - z);
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return (x / (t - z)) / (y - z)
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(Float64(x / Float64(t - z)) / Float64(y - z)) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = (x / (t - z)) / (y - z);
end
NOTE: x, y, z, 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}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{\frac{x}{t - z}}{y - z}
\end{array}
Initial program 82.4%
associate-/l/97.7%
Simplified97.7%
Final simplification97.7%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x t) y)))
(if (<= t -2.1e-168)
t_1
(if (<= t 2.15e-156)
(/ (- x) (* z y))
(if (<= t 1.6e-8)
(/ (/ x y) t)
(if (or (<= t 3.35e+270) (not (<= t 4.1e+304)))
(/ (/ x t) (- z))
t_1))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / t) / y;
double tmp;
if (t <= -2.1e-168) {
tmp = t_1;
} else if (t <= 2.15e-156) {
tmp = -x / (z * y);
} else if (t <= 1.6e-8) {
tmp = (x / y) / t;
} else if ((t <= 3.35e+270) || !(t <= 4.1e+304)) {
tmp = (x / t) / -z;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, 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 / t) / y
if (t <= (-2.1d-168)) then
tmp = t_1
else if (t <= 2.15d-156) then
tmp = -x / (z * y)
else if (t <= 1.6d-8) then
tmp = (x / y) / t
else if ((t <= 3.35d+270) .or. (.not. (t <= 4.1d+304))) then
tmp = (x / t) / -z
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / t) / y;
double tmp;
if (t <= -2.1e-168) {
tmp = t_1;
} else if (t <= 2.15e-156) {
tmp = -x / (z * y);
} else if (t <= 1.6e-8) {
tmp = (x / y) / t;
} else if ((t <= 3.35e+270) || !(t <= 4.1e+304)) {
tmp = (x / t) / -z;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = (x / t) / y tmp = 0 if t <= -2.1e-168: tmp = t_1 elif t <= 2.15e-156: tmp = -x / (z * y) elif t <= 1.6e-8: tmp = (x / y) / t elif (t <= 3.35e+270) or not (t <= 4.1e+304): tmp = (x / t) / -z else: tmp = t_1 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / t) / y) tmp = 0.0 if (t <= -2.1e-168) tmp = t_1; elseif (t <= 2.15e-156) tmp = Float64(Float64(-x) / Float64(z * y)); elseif (t <= 1.6e-8) tmp = Float64(Float64(x / y) / t); elseif ((t <= 3.35e+270) || !(t <= 4.1e+304)) tmp = Float64(Float64(x / t) / Float64(-z)); else tmp = t_1; end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / t) / y;
tmp = 0.0;
if (t <= -2.1e-168)
tmp = t_1;
elseif (t <= 2.15e-156)
tmp = -x / (z * y);
elseif (t <= 1.6e-8)
tmp = (x / y) / t;
elseif ((t <= 3.35e+270) || ~((t <= 4.1e+304)))
tmp = (x / t) / -z;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t, -2.1e-168], t$95$1, If[LessEqual[t, 2.15e-156], N[((-x) / N[(z * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.6e-8], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[Or[LessEqual[t, 3.35e+270], N[Not[LessEqual[t, 4.1e+304]], $MachinePrecision]], N[(N[(x / t), $MachinePrecision] / (-z)), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{t}}{y}\\
\mathbf{if}\;t \leq -2.1 \cdot 10^{-168}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.15 \cdot 10^{-156}:\\
\;\;\;\;\frac{-x}{z \cdot y}\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-8}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;t \leq 3.35 \cdot 10^{+270} \lor \neg \left(t \leq 4.1 \cdot 10^{+304}\right):\\
\;\;\;\;\frac{\frac{x}{t}}{-z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.09999999999999994e-168 or 3.35e270 < t < 4.09999999999999985e304Initial program 84.8%
Taylor expanded in z around 0 49.8%
associate-/r*56.2%
div-inv56.2%
Applied egg-rr56.2%
un-div-inv56.2%
Applied egg-rr56.2%
if -2.09999999999999994e-168 < t < 2.14999999999999989e-156Initial program 90.3%
associate-/r*97.1%
div-inv97.0%
Applied egg-rr97.0%
Taylor expanded in t around 0 91.3%
Taylor expanded in y around inf 57.4%
associate-*r/57.4%
neg-mul-157.4%
Simplified57.4%
if 2.14999999999999989e-156 < t < 1.6000000000000001e-8Initial program 78.6%
Taylor expanded in z around 0 32.3%
associate-/r*32.3%
div-inv32.2%
Applied egg-rr32.2%
associate-*l/42.2%
un-div-inv42.3%
Applied egg-rr42.3%
if 1.6000000000000001e-8 < t < 3.35e270 or 4.09999999999999985e304 < t Initial program 69.9%
associate-/r*99.8%
div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in t around inf 83.9%
Taylor expanded in y around 0 45.9%
mul-1-neg45.9%
associate-/r*56.7%
distribute-neg-frac256.7%
Simplified56.7%
Final simplification55.2%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= t -6e-168)
(* (/ x t) (/ 1.0 y))
(if (<= t 1.2e-160)
(/ (- x) (* z y))
(if (<= t 9.8e+125)
(/ x (* t (+ z y)))
(if (or (<= t 1.95e+270) (not (<= t 1.85e+301)))
(/ (/ x t) (- z))
(/ (/ x t) y))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -6e-168) {
tmp = (x / t) * (1.0 / y);
} else if (t <= 1.2e-160) {
tmp = -x / (z * y);
} else if (t <= 9.8e+125) {
tmp = x / (t * (z + y));
} else if ((t <= 1.95e+270) || !(t <= 1.85e+301)) {
tmp = (x / t) / -z;
} else {
tmp = (x / t) / y;
}
return tmp;
}
NOTE: x, y, z, 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 (t <= (-6d-168)) then
tmp = (x / t) * (1.0d0 / y)
else if (t <= 1.2d-160) then
tmp = -x / (z * y)
else if (t <= 9.8d+125) then
tmp = x / (t * (z + y))
else if ((t <= 1.95d+270) .or. (.not. (t <= 1.85d+301))) then
tmp = (x / t) / -z
else
tmp = (x / t) / y
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -6e-168) {
tmp = (x / t) * (1.0 / y);
} else if (t <= 1.2e-160) {
tmp = -x / (z * y);
} else if (t <= 9.8e+125) {
tmp = x / (t * (z + y));
} else if ((t <= 1.95e+270) || !(t <= 1.85e+301)) {
tmp = (x / t) / -z;
} else {
tmp = (x / t) / y;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -6e-168: tmp = (x / t) * (1.0 / y) elif t <= 1.2e-160: tmp = -x / (z * y) elif t <= 9.8e+125: tmp = x / (t * (z + y)) elif (t <= 1.95e+270) or not (t <= 1.85e+301): tmp = (x / t) / -z else: tmp = (x / t) / y return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -6e-168) tmp = Float64(Float64(x / t) * Float64(1.0 / y)); elseif (t <= 1.2e-160) tmp = Float64(Float64(-x) / Float64(z * y)); elseif (t <= 9.8e+125) tmp = Float64(x / Float64(t * Float64(z + y))); elseif ((t <= 1.95e+270) || !(t <= 1.85e+301)) tmp = Float64(Float64(x / t) / Float64(-z)); else tmp = Float64(Float64(x / t) / y); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -6e-168)
tmp = (x / t) * (1.0 / y);
elseif (t <= 1.2e-160)
tmp = -x / (z * y);
elseif (t <= 9.8e+125)
tmp = x / (t * (z + y));
elseif ((t <= 1.95e+270) || ~((t <= 1.85e+301)))
tmp = (x / t) / -z;
else
tmp = (x / t) / y;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -6e-168], N[(N[(x / t), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.2e-160], N[((-x) / N[(z * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.8e+125], N[(x / N[(t * N[(z + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 1.95e+270], N[Not[LessEqual[t, 1.85e+301]], $MachinePrecision]], N[(N[(x / t), $MachinePrecision] / (-z)), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6 \cdot 10^{-168}:\\
\;\;\;\;\frac{x}{t} \cdot \frac{1}{y}\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{-160}:\\
\;\;\;\;\frac{-x}{z \cdot y}\\
\mathbf{elif}\;t \leq 9.8 \cdot 10^{+125}:\\
\;\;\;\;\frac{x}{t \cdot \left(z + y\right)}\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{+270} \lor \neg \left(t \leq 1.85 \cdot 10^{+301}\right):\\
\;\;\;\;\frac{\frac{x}{t}}{-z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if t < -5.99999999999999983e-168Initial program 84.4%
Taylor expanded in z around 0 46.4%
associate-/r*52.5%
div-inv52.5%
Applied egg-rr52.5%
if -5.99999999999999983e-168 < t < 1.19999999999999995e-160Initial program 90.3%
associate-/r*97.1%
div-inv97.0%
Applied egg-rr97.0%
Taylor expanded in t around 0 91.3%
Taylor expanded in y around inf 57.4%
associate-*r/57.4%
neg-mul-157.4%
Simplified57.4%
if 1.19999999999999995e-160 < t < 9.80000000000000032e125Initial program 80.5%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around inf 57.0%
div-inv56.8%
associate-/l*55.1%
sub-neg55.1%
add-sqr-sqrt29.9%
sqrt-unprod57.9%
sqr-neg57.9%
sqrt-unprod20.3%
add-sqr-sqrt46.2%
Applied egg-rr46.2%
associate-/r*44.3%
associate-*r/44.3%
associate-*l/44.3%
*-rgt-identity44.3%
+-commutative44.3%
Simplified44.3%
if 9.80000000000000032e125 < t < 1.95e270 or 1.85e301 < t Initial program 60.7%
associate-/r*99.8%
div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in t around inf 85.1%
Taylor expanded in y around 0 45.0%
mul-1-neg45.0%
associate-/r*63.4%
distribute-neg-frac263.4%
Simplified63.4%
if 1.95e270 < t < 1.85e301Initial program 89.4%
Taylor expanded in z around 0 89.4%
associate-/r*99.8%
div-inv99.7%
Applied egg-rr99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Final simplification55.1%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- t z) (- y z))))
(if (<= t_1 (- INFINITY))
(* (/ x (- y z)) (/ 1.0 t))
(if (<= t_1 1e+297) (/ x t_1) (* (/ x (- t z)) (/ -1.0 z))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = (t - z) * (y - z);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (x / (y - z)) * (1.0 / t);
} else if (t_1 <= 1e+297) {
tmp = x / t_1;
} else {
tmp = (x / (t - z)) * (-1.0 / z);
}
return tmp;
}
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (t - z) * (y - z);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = (x / (y - z)) * (1.0 / t);
} else if (t_1 <= 1e+297) {
tmp = x / t_1;
} else {
tmp = (x / (t - z)) * (-1.0 / z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = (t - z) * (y - z) tmp = 0 if t_1 <= -math.inf: tmp = (x / (y - z)) * (1.0 / t) elif t_1 <= 1e+297: tmp = x / t_1 else: tmp = (x / (t - z)) * (-1.0 / z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(t - z) * Float64(y - z)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(x / Float64(y - z)) * Float64(1.0 / t)); elseif (t_1 <= 1e+297) tmp = Float64(x / t_1); else tmp = Float64(Float64(x / Float64(t - z)) * Float64(-1.0 / z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (t - z) * (y - z);
tmp = 0.0;
if (t_1 <= -Inf)
tmp = (x / (y - z)) * (1.0 / t);
elseif (t_1 <= 1e+297)
tmp = x / t_1;
else
tmp = (x / (t - z)) * (-1.0 / z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t - z), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+297], N[(x / t$95$1), $MachinePrecision], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \left(t - z\right) \cdot \left(y - z\right)\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{x}{y - z} \cdot \frac{1}{t}\\
\mathbf{elif}\;t\_1 \leq 10^{+297}:\\
\;\;\;\;\frac{x}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t - z} \cdot \frac{-1}{z}\\
\end{array}
\end{array}
if (*.f64 (-.f64 y z) (-.f64 t z)) < -inf.0Initial program 55.8%
associate-/r*99.8%
div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in t around inf 77.8%
if -inf.0 < (*.f64 (-.f64 y z) (-.f64 t z)) < 1e297Initial program 99.7%
if 1e297 < (*.f64 (-.f64 y z) (-.f64 t z)) Initial program 63.6%
associate-/l/99.8%
div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 83.5%
Final simplification91.6%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (/ x z) (/ -1.0 t))))
(if (<= z -4400000000.0)
t_1
(if (<= z -1.05e-40)
(/ (/ x y) t)
(if (<= z -1.34e-79)
(/ (/ x t) (- z))
(if (<= z 7.8e-8) (/ (/ x t) y) t_1))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / z) * (-1.0 / t);
double tmp;
if (z <= -4400000000.0) {
tmp = t_1;
} else if (z <= -1.05e-40) {
tmp = (x / y) / t;
} else if (z <= -1.34e-79) {
tmp = (x / t) / -z;
} else if (z <= 7.8e-8) {
tmp = (x / t) / y;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, 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) * ((-1.0d0) / t)
if (z <= (-4400000000.0d0)) then
tmp = t_1
else if (z <= (-1.05d-40)) then
tmp = (x / y) / t
else if (z <= (-1.34d-79)) then
tmp = (x / t) / -z
else if (z <= 7.8d-8) then
tmp = (x / t) / y
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / z) * (-1.0 / t);
double tmp;
if (z <= -4400000000.0) {
tmp = t_1;
} else if (z <= -1.05e-40) {
tmp = (x / y) / t;
} else if (z <= -1.34e-79) {
tmp = (x / t) / -z;
} else if (z <= 7.8e-8) {
tmp = (x / t) / y;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = (x / z) * (-1.0 / t) tmp = 0 if z <= -4400000000.0: tmp = t_1 elif z <= -1.05e-40: tmp = (x / y) / t elif z <= -1.34e-79: tmp = (x / t) / -z elif z <= 7.8e-8: tmp = (x / t) / y else: tmp = t_1 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) * Float64(-1.0 / t)) tmp = 0.0 if (z <= -4400000000.0) tmp = t_1; elseif (z <= -1.05e-40) tmp = Float64(Float64(x / y) / t); elseif (z <= -1.34e-79) tmp = Float64(Float64(x / t) / Float64(-z)); elseif (z <= 7.8e-8) tmp = Float64(Float64(x / t) / y); else tmp = t_1; end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / z) * (-1.0 / t);
tmp = 0.0;
if (z <= -4400000000.0)
tmp = t_1;
elseif (z <= -1.05e-40)
tmp = (x / y) / t;
elseif (z <= -1.34e-79)
tmp = (x / t) / -z;
elseif (z <= 7.8e-8)
tmp = (x / t) / y;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, 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] * N[(-1.0 / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4400000000.0], t$95$1, If[LessEqual[z, -1.05e-40], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, -1.34e-79], N[(N[(x / t), $MachinePrecision] / (-z)), $MachinePrecision], If[LessEqual[z, 7.8e-8], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{z} \cdot \frac{-1}{t}\\
\mathbf{if}\;z \leq -4400000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{-40}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;z \leq -1.34 \cdot 10^{-79}:\\
\;\;\;\;\frac{\frac{x}{t}}{-z}\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{-8}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.4e9 or 7.7999999999999997e-8 < z Initial program 72.9%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around inf 38.7%
Taylor expanded in y around 0 31.5%
associate-*r/31.5%
neg-mul-131.5%
Simplified31.5%
neg-mul-131.5%
times-frac40.7%
Applied egg-rr40.7%
if -4.4e9 < z < -1.05000000000000009e-40Initial program 71.7%
Taylor expanded in z around 0 24.4%
associate-/r*62.0%
div-inv62.1%
Applied egg-rr62.1%
associate-*l/52.5%
un-div-inv52.7%
Applied egg-rr52.7%
if -1.05000000000000009e-40 < z < -1.34e-79Initial program 99.5%
associate-/r*100.0%
div-inv99.5%
Applied egg-rr99.5%
Taylor expanded in t around inf 33.9%
Taylor expanded in y around 0 35.8%
mul-1-neg35.8%
associate-/r*36.3%
distribute-neg-frac236.3%
Simplified36.3%
if -1.34e-79 < z < 7.7999999999999997e-8Initial program 94.7%
Taylor expanded in z around 0 63.9%
associate-/r*67.4%
div-inv67.3%
Applied egg-rr67.3%
un-div-inv67.4%
Applied egg-rr67.4%
Final simplification52.0%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (/ x z) (/ -1.0 t))))
(if (<= z -900000000.0)
t_1
(if (<= z -7.5e-38)
(* (/ 1.0 t) (/ x y))
(if (<= z -1.2e-75)
(/ (/ x t) (- z))
(if (<= z 2.76e-5) (/ (/ x t) y) t_1))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / z) * (-1.0 / t);
double tmp;
if (z <= -900000000.0) {
tmp = t_1;
} else if (z <= -7.5e-38) {
tmp = (1.0 / t) * (x / y);
} else if (z <= -1.2e-75) {
tmp = (x / t) / -z;
} else if (z <= 2.76e-5) {
tmp = (x / t) / y;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, 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) * ((-1.0d0) / t)
if (z <= (-900000000.0d0)) then
tmp = t_1
else if (z <= (-7.5d-38)) then
tmp = (1.0d0 / t) * (x / y)
else if (z <= (-1.2d-75)) then
tmp = (x / t) / -z
else if (z <= 2.76d-5) then
tmp = (x / t) / y
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / z) * (-1.0 / t);
double tmp;
if (z <= -900000000.0) {
tmp = t_1;
} else if (z <= -7.5e-38) {
tmp = (1.0 / t) * (x / y);
} else if (z <= -1.2e-75) {
tmp = (x / t) / -z;
} else if (z <= 2.76e-5) {
tmp = (x / t) / y;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = (x / z) * (-1.0 / t) tmp = 0 if z <= -900000000.0: tmp = t_1 elif z <= -7.5e-38: tmp = (1.0 / t) * (x / y) elif z <= -1.2e-75: tmp = (x / t) / -z elif z <= 2.76e-5: tmp = (x / t) / y else: tmp = t_1 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) * Float64(-1.0 / t)) tmp = 0.0 if (z <= -900000000.0) tmp = t_1; elseif (z <= -7.5e-38) tmp = Float64(Float64(1.0 / t) * Float64(x / y)); elseif (z <= -1.2e-75) tmp = Float64(Float64(x / t) / Float64(-z)); elseif (z <= 2.76e-5) tmp = Float64(Float64(x / t) / y); else tmp = t_1; end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / z) * (-1.0 / t);
tmp = 0.0;
if (z <= -900000000.0)
tmp = t_1;
elseif (z <= -7.5e-38)
tmp = (1.0 / t) * (x / y);
elseif (z <= -1.2e-75)
tmp = (x / t) / -z;
elseif (z <= 2.76e-5)
tmp = (x / t) / y;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, 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] * N[(-1.0 / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -900000000.0], t$95$1, If[LessEqual[z, -7.5e-38], N[(N[(1.0 / t), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.2e-75], N[(N[(x / t), $MachinePrecision] / (-z)), $MachinePrecision], If[LessEqual[z, 2.76e-5], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{z} \cdot \frac{-1}{t}\\
\mathbf{if}\;z \leq -900000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{-38}:\\
\;\;\;\;\frac{1}{t} \cdot \frac{x}{y}\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{-75}:\\
\;\;\;\;\frac{\frac{x}{t}}{-z}\\
\mathbf{elif}\;z \leq 2.76 \cdot 10^{-5}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -9e8 or 2.76e-5 < z Initial program 72.9%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around inf 38.7%
Taylor expanded in y around 0 31.5%
associate-*r/31.5%
neg-mul-131.5%
Simplified31.5%
neg-mul-131.5%
times-frac40.7%
Applied egg-rr40.7%
if -9e8 < z < -7.5e-38Initial program 71.7%
Taylor expanded in z around 0 24.4%
*-un-lft-identity24.4%
times-frac52.3%
Applied egg-rr52.3%
if -7.5e-38 < z < -1.2000000000000001e-75Initial program 99.5%
associate-/r*100.0%
div-inv99.5%
Applied egg-rr99.5%
Taylor expanded in t around inf 33.9%
Taylor expanded in y around 0 35.8%
mul-1-neg35.8%
associate-/r*36.3%
distribute-neg-frac236.3%
Simplified36.3%
if -1.2000000000000001e-75 < z < 2.76e-5Initial program 94.7%
Taylor expanded in z around 0 63.9%
associate-/r*67.4%
div-inv67.3%
Applied egg-rr67.3%
un-div-inv67.4%
Applied egg-rr67.4%
Final simplification52.0%
NOTE: x, y, z, 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))))
(if (<= y -8.8e+14)
(/ (/ x y) (- t z))
(if (<= y -5000.0)
t_1
(if (<= y -1.02e-16)
(/ x (* (- t z) y))
(if (<= y 2.8e-235) t_1 (/ (/ x t) (- y z))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / z) / (z - t);
double tmp;
if (y <= -8.8e+14) {
tmp = (x / y) / (t - z);
} else if (y <= -5000.0) {
tmp = t_1;
} else if (y <= -1.02e-16) {
tmp = x / ((t - z) * y);
} else if (y <= 2.8e-235) {
tmp = t_1;
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: x, y, z, 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 - t)
if (y <= (-8.8d+14)) then
tmp = (x / y) / (t - z)
else if (y <= (-5000.0d0)) then
tmp = t_1
else if (y <= (-1.02d-16)) then
tmp = x / ((t - z) * y)
else if (y <= 2.8d-235) then
tmp = t_1
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / z) / (z - t);
double tmp;
if (y <= -8.8e+14) {
tmp = (x / y) / (t - z);
} else if (y <= -5000.0) {
tmp = t_1;
} else if (y <= -1.02e-16) {
tmp = x / ((t - z) * y);
} else if (y <= 2.8e-235) {
tmp = t_1;
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = (x / z) / (z - t) tmp = 0 if y <= -8.8e+14: tmp = (x / y) / (t - z) elif y <= -5000.0: tmp = t_1 elif y <= -1.02e-16: tmp = x / ((t - z) * y) elif y <= 2.8e-235: tmp = t_1 else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) / Float64(z - t)) tmp = 0.0 if (y <= -8.8e+14) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (y <= -5000.0) tmp = t_1; elseif (y <= -1.02e-16) tmp = Float64(x / Float64(Float64(t - z) * y)); elseif (y <= 2.8e-235) tmp = t_1; else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / z) / (z - t);
tmp = 0.0;
if (y <= -8.8e+14)
tmp = (x / y) / (t - z);
elseif (y <= -5000.0)
tmp = t_1;
elseif (y <= -1.02e-16)
tmp = x / ((t - z) * y);
elseif (y <= 2.8e-235)
tmp = t_1;
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, 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] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8.8e+14], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5000.0], t$95$1, If[LessEqual[y, -1.02e-16], N[(x / N[(N[(t - z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.8e-235], t$95$1, N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z - t}\\
\mathbf{if}\;y \leq -8.8 \cdot 10^{+14}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;y \leq -5000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.02 \cdot 10^{-16}:\\
\;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{-235}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -8.8e14Initial program 77.6%
Taylor expanded in x around 0 77.6%
associate-/l/96.6%
Simplified96.6%
Taylor expanded in y around inf 91.9%
if -8.8e14 < y < -5e3 or -1.0200000000000001e-16 < y < 2.79999999999999995e-235Initial program 81.2%
Taylor expanded in x around 0 81.2%
associate-/l/98.4%
Simplified98.4%
Taylor expanded in y around 0 86.5%
associate-*r/86.5%
neg-mul-186.5%
Simplified86.5%
if -5e3 < y < -1.0200000000000001e-16Initial program 100.0%
Taylor expanded in y around inf 81.3%
*-commutative81.3%
Simplified81.3%
if 2.79999999999999995e-235 < y Initial program 84.7%
associate-/l/97.4%
Simplified97.4%
Taylor expanded in t around inf 52.4%
Final simplification71.5%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x t) y)))
(if (<= t -6e-168)
t_1
(if (<= t 6e-157)
(/ (- x) (* z y))
(if (<= t 2.4e-8)
(/ (/ x y) t)
(if (<= t 2.1e+192) (/ x (* z (- t))) t_1))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / t) / y;
double tmp;
if (t <= -6e-168) {
tmp = t_1;
} else if (t <= 6e-157) {
tmp = -x / (z * y);
} else if (t <= 2.4e-8) {
tmp = (x / y) / t;
} else if (t <= 2.1e+192) {
tmp = x / (z * -t);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, 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 / t) / y
if (t <= (-6d-168)) then
tmp = t_1
else if (t <= 6d-157) then
tmp = -x / (z * y)
else if (t <= 2.4d-8) then
tmp = (x / y) / t
else if (t <= 2.1d+192) then
tmp = x / (z * -t)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / t) / y;
double tmp;
if (t <= -6e-168) {
tmp = t_1;
} else if (t <= 6e-157) {
tmp = -x / (z * y);
} else if (t <= 2.4e-8) {
tmp = (x / y) / t;
} else if (t <= 2.1e+192) {
tmp = x / (z * -t);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = (x / t) / y tmp = 0 if t <= -6e-168: tmp = t_1 elif t <= 6e-157: tmp = -x / (z * y) elif t <= 2.4e-8: tmp = (x / y) / t elif t <= 2.1e+192: tmp = x / (z * -t) else: tmp = t_1 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / t) / y) tmp = 0.0 if (t <= -6e-168) tmp = t_1; elseif (t <= 6e-157) tmp = Float64(Float64(-x) / Float64(z * y)); elseif (t <= 2.4e-8) tmp = Float64(Float64(x / y) / t); elseif (t <= 2.1e+192) tmp = Float64(x / Float64(z * Float64(-t))); else tmp = t_1; end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / t) / y;
tmp = 0.0;
if (t <= -6e-168)
tmp = t_1;
elseif (t <= 6e-157)
tmp = -x / (z * y);
elseif (t <= 2.4e-8)
tmp = (x / y) / t;
elseif (t <= 2.1e+192)
tmp = x / (z * -t);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t, -6e-168], t$95$1, If[LessEqual[t, 6e-157], N[((-x) / N[(z * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.4e-8], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 2.1e+192], N[(x / N[(z * (-t)), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{t}}{y}\\
\mathbf{if}\;t \leq -6 \cdot 10^{-168}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-157}:\\
\;\;\;\;\frac{-x}{z \cdot y}\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{-8}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{+192}:\\
\;\;\;\;\frac{x}{z \cdot \left(-t\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.99999999999999983e-168 or 2.09999999999999995e192 < t Initial program 79.9%
Taylor expanded in z around 0 46.3%
associate-/r*56.7%
div-inv56.7%
Applied egg-rr56.7%
un-div-inv56.7%
Applied egg-rr56.7%
if -5.99999999999999983e-168 < t < 6e-157Initial program 90.3%
associate-/r*97.1%
div-inv97.0%
Applied egg-rr97.0%
Taylor expanded in t around 0 91.3%
Taylor expanded in y around inf 57.4%
associate-*r/57.4%
neg-mul-157.4%
Simplified57.4%
if 6e-157 < t < 2.39999999999999998e-8Initial program 78.6%
Taylor expanded in z around 0 32.3%
associate-/r*32.3%
div-inv32.2%
Applied egg-rr32.2%
associate-*l/42.2%
un-div-inv42.3%
Applied egg-rr42.3%
if 2.39999999999999998e-8 < t < 2.09999999999999995e192Initial program 80.7%
associate-/l/99.7%
Simplified99.7%
Taylor expanded in t around inf 80.5%
Taylor expanded in y around 0 52.2%
associate-*r/52.2%
neg-mul-152.2%
Simplified52.2%
Final simplification54.8%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x z) (+ t z))))
(if (<= z -4.8e+31)
t_1
(if (<= z 1.95e-57)
(/ (/ x y) (- t z))
(if (<= z 2.4e+39) (/ x (* t (- y z))) t_1)))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / z) / (t + z);
double tmp;
if (z <= -4.8e+31) {
tmp = t_1;
} else if (z <= 1.95e-57) {
tmp = (x / y) / (t - z);
} else if (z <= 2.4e+39) {
tmp = x / (t * (y - z));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, 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) / (t + z)
if (z <= (-4.8d+31)) then
tmp = t_1
else if (z <= 1.95d-57) then
tmp = (x / y) / (t - z)
else if (z <= 2.4d+39) then
tmp = x / (t * (y - z))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / z) / (t + z);
double tmp;
if (z <= -4.8e+31) {
tmp = t_1;
} else if (z <= 1.95e-57) {
tmp = (x / y) / (t - z);
} else if (z <= 2.4e+39) {
tmp = x / (t * (y - z));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = (x / z) / (t + z) tmp = 0 if z <= -4.8e+31: tmp = t_1 elif z <= 1.95e-57: tmp = (x / y) / (t - z) elif z <= 2.4e+39: tmp = x / (t * (y - z)) else: tmp = t_1 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) / Float64(t + z)) tmp = 0.0 if (z <= -4.8e+31) tmp = t_1; elseif (z <= 1.95e-57) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (z <= 2.4e+39) tmp = Float64(x / Float64(t * Float64(y - z))); else tmp = t_1; end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / z) / (t + z);
tmp = 0.0;
if (z <= -4.8e+31)
tmp = t_1;
elseif (z <= 1.95e-57)
tmp = (x / y) / (t - z);
elseif (z <= 2.4e+39)
tmp = x / (t * (y - z));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, 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] / N[(t + z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.8e+31], t$95$1, If[LessEqual[z, 1.95e-57], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.4e+39], N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{t + z}\\
\mathbf{if}\;z \leq -4.8 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{-57}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{+39}:\\
\;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.79999999999999965e31 or 2.4000000000000001e39 < z Initial program 70.8%
associate-/l/99.8%
div-inv99.7%
Applied egg-rr99.7%
associate-*l/99.7%
div-inv99.8%
div-inv99.7%
clear-num99.6%
frac-times98.0%
metadata-eval98.0%
sub-neg98.0%
add-sqr-sqrt45.9%
sqrt-unprod69.0%
sqr-neg69.0%
sqrt-unprod34.2%
add-sqr-sqrt68.6%
sub-neg68.6%
add-sqr-sqrt34.3%
sqrt-unprod67.9%
sqr-neg67.9%
sqrt-unprod42.2%
add-sqr-sqrt84.4%
Applied egg-rr84.4%
Taylor expanded in y around 0 64.8%
associate-/r*80.6%
Simplified80.6%
if -4.79999999999999965e31 < z < 1.95000000000000003e-57Initial program 91.5%
Taylor expanded in x around 0 91.5%
associate-/l/95.7%
Simplified95.7%
Taylor expanded in y around inf 75.7%
if 1.95000000000000003e-57 < z < 2.4000000000000001e39Initial program 99.7%
Taylor expanded in t around inf 63.5%
Final simplification76.9%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x z) (+ t z))))
(if (<= z -4.6e+31)
t_1
(if (<= z 1.7e-7)
(/ (/ x y) (- t z))
(if (<= z 3e+137) (/ x (* z (- z t))) t_1)))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / z) / (t + z);
double tmp;
if (z <= -4.6e+31) {
tmp = t_1;
} else if (z <= 1.7e-7) {
tmp = (x / y) / (t - z);
} else if (z <= 3e+137) {
tmp = x / (z * (z - t));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, 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) / (t + z)
if (z <= (-4.6d+31)) then
tmp = t_1
else if (z <= 1.7d-7) then
tmp = (x / y) / (t - z)
else if (z <= 3d+137) then
tmp = x / (z * (z - t))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / z) / (t + z);
double tmp;
if (z <= -4.6e+31) {
tmp = t_1;
} else if (z <= 1.7e-7) {
tmp = (x / y) / (t - z);
} else if (z <= 3e+137) {
tmp = x / (z * (z - t));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = (x / z) / (t + z) tmp = 0 if z <= -4.6e+31: tmp = t_1 elif z <= 1.7e-7: tmp = (x / y) / (t - z) elif z <= 3e+137: tmp = x / (z * (z - t)) else: tmp = t_1 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) / Float64(t + z)) tmp = 0.0 if (z <= -4.6e+31) tmp = t_1; elseif (z <= 1.7e-7) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (z <= 3e+137) tmp = Float64(x / Float64(z * Float64(z - t))); else tmp = t_1; end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / z) / (t + z);
tmp = 0.0;
if (z <= -4.6e+31)
tmp = t_1;
elseif (z <= 1.7e-7)
tmp = (x / y) / (t - z);
elseif (z <= 3e+137)
tmp = x / (z * (z - t));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, 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] / N[(t + z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.6e+31], t$95$1, If[LessEqual[z, 1.7e-7], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e+137], N[(x / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{t + z}\\
\mathbf{if}\;z \leq -4.6 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-7}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+137}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.5999999999999999e31 or 3.0000000000000001e137 < z Initial program 70.5%
associate-/l/99.8%
div-inv99.7%
Applied egg-rr99.7%
associate-*l/99.7%
div-inv99.8%
div-inv99.8%
clear-num99.6%
frac-times97.7%
metadata-eval97.7%
sub-neg97.7%
add-sqr-sqrt54.9%
sqrt-unprod71.5%
sqr-neg71.5%
sqrt-unprod29.9%
add-sqr-sqrt71.0%
sub-neg71.0%
add-sqr-sqrt41.1%
sqrt-unprod67.8%
sqr-neg67.8%
sqrt-unprod37.1%
add-sqr-sqrt87.5%
Applied egg-rr87.5%
Taylor expanded in y around 0 65.0%
associate-/r*84.0%
Simplified84.0%
if -4.5999999999999999e31 < z < 1.69999999999999987e-7Initial program 92.4%
Taylor expanded in x around 0 92.4%
associate-/l/96.1%
Simplified96.1%
Taylor expanded in y around inf 75.4%
if 1.69999999999999987e-7 < z < 3.0000000000000001e137Initial program 82.1%
Taylor expanded in y around 0 64.2%
associate-*r/64.2%
neg-mul-164.2%
Simplified64.2%
Final simplification77.5%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t -2e-204) (/ (/ x y) (- t z)) (if (<= t 1.1e-16) (* (/ x (- y z)) (/ -1.0 z)) (/ (/ x t) (- y z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2e-204) {
tmp = (x / y) / (t - z);
} else if (t <= 1.1e-16) {
tmp = (x / (y - z)) * (-1.0 / z);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: x, y, z, 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 (t <= (-2d-204)) then
tmp = (x / y) / (t - z)
else if (t <= 1.1d-16) then
tmp = (x / (y - z)) * ((-1.0d0) / z)
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2e-204) {
tmp = (x / y) / (t - z);
} else if (t <= 1.1e-16) {
tmp = (x / (y - z)) * (-1.0 / z);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -2e-204: tmp = (x / y) / (t - z) elif t <= 1.1e-16: tmp = (x / (y - z)) * (-1.0 / z) else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -2e-204) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (t <= 1.1e-16) tmp = Float64(Float64(x / Float64(y - z)) * Float64(-1.0 / z)); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -2e-204)
tmp = (x / y) / (t - z);
elseif (t <= 1.1e-16)
tmp = (x / (y - z)) * (-1.0 / z);
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -2e-204], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.1e-16], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / z), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-204}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{-16}:\\
\;\;\;\;\frac{x}{y - z} \cdot \frac{-1}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -2e-204Initial program 85.2%
Taylor expanded in x around 0 85.2%
associate-/l/96.3%
Simplified96.3%
Taylor expanded in y around inf 61.4%
if -2e-204 < t < 1.1e-16Initial program 85.7%
associate-/r*98.9%
div-inv98.8%
Applied egg-rr98.8%
Taylor expanded in t around 0 89.9%
if 1.1e-16 < t Initial program 73.1%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around inf 86.5%
Final simplification76.8%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t -3.4e-186) (* (/ x t) (/ 1.0 y)) (if (<= t 5.5e-161) (/ (- x) (* z y)) (/ x (* t (- y z))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -3.4e-186) {
tmp = (x / t) * (1.0 / y);
} else if (t <= 5.5e-161) {
tmp = -x / (z * y);
} else {
tmp = x / (t * (y - z));
}
return tmp;
}
NOTE: x, y, z, 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 (t <= (-3.4d-186)) then
tmp = (x / t) * (1.0d0 / y)
else if (t <= 5.5d-161) then
tmp = -x / (z * y)
else
tmp = x / (t * (y - z))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -3.4e-186) {
tmp = (x / t) * (1.0 / y);
} else if (t <= 5.5e-161) {
tmp = -x / (z * y);
} else {
tmp = x / (t * (y - z));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -3.4e-186: tmp = (x / t) * (1.0 / y) elif t <= 5.5e-161: tmp = -x / (z * y) else: tmp = x / (t * (y - z)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -3.4e-186) tmp = Float64(Float64(x / t) * Float64(1.0 / y)); elseif (t <= 5.5e-161) tmp = Float64(Float64(-x) / Float64(z * y)); else tmp = Float64(x / Float64(t * Float64(y - z))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -3.4e-186)
tmp = (x / t) * (1.0 / y);
elseif (t <= 5.5e-161)
tmp = -x / (z * y);
else
tmp = x / (t * (y - z));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -3.4e-186], N[(N[(x / t), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.5e-161], N[((-x) / N[(z * y), $MachinePrecision]), $MachinePrecision], N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.4 \cdot 10^{-186}:\\
\;\;\;\;\frac{x}{t} \cdot \frac{1}{y}\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{-161}:\\
\;\;\;\;\frac{-x}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\
\end{array}
\end{array}
if t < -3.3999999999999999e-186Initial program 85.1%
Taylor expanded in z around 0 46.3%
associate-/r*52.1%
div-inv52.1%
Applied egg-rr52.1%
if -3.3999999999999999e-186 < t < 5.5e-161Initial program 89.5%
associate-/r*98.5%
div-inv98.4%
Applied egg-rr98.4%
Taylor expanded in t around 0 93.9%
Taylor expanded in y around inf 60.3%
associate-*r/60.3%
neg-mul-160.3%
Simplified60.3%
if 5.5e-161 < t Initial program 74.5%
Taylor expanded in t around inf 59.5%
Final simplification56.5%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t -3e-235) (/ (/ x y) (- t z)) (if (<= t 1.3e-16) (/ (/ x z) (- z y)) (/ (/ x t) (- y z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -3e-235) {
tmp = (x / y) / (t - z);
} else if (t <= 1.3e-16) {
tmp = (x / z) / (z - y);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: x, y, z, 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 (t <= (-3d-235)) then
tmp = (x / y) / (t - z)
else if (t <= 1.3d-16) then
tmp = (x / z) / (z - y)
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -3e-235) {
tmp = (x / y) / (t - z);
} else if (t <= 1.3e-16) {
tmp = (x / z) / (z - y);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -3e-235: tmp = (x / y) / (t - z) elif t <= 1.3e-16: tmp = (x / z) / (z - y) else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -3e-235) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (t <= 1.3e-16) tmp = Float64(Float64(x / z) / Float64(z - y)); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -3e-235)
tmp = (x / y) / (t - z);
elseif (t <= 1.3e-16)
tmp = (x / z) / (z - y);
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -3e-235], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.3e-16], N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3 \cdot 10^{-235}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{-16}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -2.9999999999999999e-235Initial program 85.9%
Taylor expanded in x around 0 85.9%
associate-/l/96.5%
Simplified96.5%
Taylor expanded in y around inf 62.3%
if -2.9999999999999999e-235 < t < 1.2999999999999999e-16Initial program 84.8%
associate-/l/96.2%
Simplified96.2%
Taylor expanded in t around 0 88.9%
associate-*r/88.9%
neg-mul-188.9%
Simplified88.9%
if 1.2999999999999999e-16 < t Initial program 73.1%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around inf 86.5%
Final simplification76.3%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y -4.5e-54) (/ (/ x y) t) (if (<= y 100.0) (/ x (* z (- t))) (/ (/ x t) y))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.5e-54) {
tmp = (x / y) / t;
} else if (y <= 100.0) {
tmp = x / (z * -t);
} else {
tmp = (x / t) / y;
}
return tmp;
}
NOTE: x, y, z, 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.5d-54)) then
tmp = (x / y) / t
else if (y <= 100.0d0) then
tmp = x / (z * -t)
else
tmp = (x / t) / y
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.5e-54) {
tmp = (x / y) / t;
} else if (y <= 100.0) {
tmp = x / (z * -t);
} else {
tmp = (x / t) / y;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= -4.5e-54: tmp = (x / y) / t elif y <= 100.0: tmp = x / (z * -t) else: tmp = (x / t) / y return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -4.5e-54) tmp = Float64(Float64(x / y) / t); elseif (y <= 100.0) tmp = Float64(x / Float64(z * Float64(-t))); else tmp = Float64(Float64(x / t) / y); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -4.5e-54)
tmp = (x / y) / t;
elseif (y <= 100.0)
tmp = x / (z * -t);
else
tmp = (x / t) / y;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -4.5e-54], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[y, 100.0], N[(x / N[(z * (-t)), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.5 \cdot 10^{-54}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;y \leq 100:\\
\;\;\;\;\frac{x}{z \cdot \left(-t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if y < -4.4999999999999998e-54Initial program 78.3%
Taylor expanded in z around 0 51.3%
associate-/r*58.5%
div-inv58.4%
Applied egg-rr58.4%
associate-*l/59.7%
un-div-inv59.8%
Applied egg-rr59.8%
if -4.4999999999999998e-54 < y < 100Initial program 85.6%
associate-/l/98.4%
Simplified98.4%
Taylor expanded in t around inf 60.7%
Taylor expanded in y around 0 44.6%
associate-*r/44.6%
neg-mul-144.6%
Simplified44.6%
if 100 < y Initial program 81.9%
Taylor expanded in z around 0 39.1%
associate-/r*45.1%
div-inv45.1%
Applied egg-rr45.1%
un-div-inv45.1%
Applied egg-rr45.1%
Final simplification49.3%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -4.6e+31) (not (<= z 17000000.0))) (/ x (* t z)) (/ x (* t y))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4.6e+31) || !(z <= 17000000.0)) {
tmp = x / (t * z);
} else {
tmp = x / (t * y);
}
return tmp;
}
NOTE: x, y, z, 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 <= (-4.6d+31)) .or. (.not. (z <= 17000000.0d0))) then
tmp = x / (t * z)
else
tmp = x / (t * y)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4.6e+31) || !(z <= 17000000.0)) {
tmp = x / (t * z);
} else {
tmp = x / (t * y);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if (z <= -4.6e+31) or not (z <= 17000000.0): tmp = x / (t * z) else: tmp = x / (t * y) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -4.6e+31) || !(z <= 17000000.0)) tmp = Float64(x / Float64(t * z)); else tmp = Float64(x / Float64(t * y)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -4.6e+31) || ~((z <= 17000000.0)))
tmp = x / (t * z);
else
tmp = x / (t * y);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -4.6e+31], N[Not[LessEqual[z, 17000000.0]], $MachinePrecision]], N[(x / N[(t * z), $MachinePrecision]), $MachinePrecision], N[(x / N[(t * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.6 \cdot 10^{+31} \lor \neg \left(z \leq 17000000\right):\\
\;\;\;\;\frac{x}{t \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t \cdot y}\\
\end{array}
\end{array}
if z < -4.5999999999999999e31 or 1.7e7 < z Initial program 72.6%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around inf 38.0%
Taylor expanded in y around 0 31.2%
associate-*r/31.2%
neg-mul-131.2%
Simplified31.2%
add-sqr-sqrt16.0%
sqrt-unprod39.2%
sqr-neg39.2%
sqrt-unprod15.1%
add-sqr-sqrt31.3%
div-inv31.3%
*-commutative31.3%
Applied egg-rr31.3%
associate-*r/31.3%
*-commutative31.3%
*-rgt-identity31.3%
Simplified31.3%
if -4.5999999999999999e31 < z < 1.7e7Initial program 92.6%
Taylor expanded in z around 0 55.5%
Final simplification43.2%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -3.2e+79) (not (<= z 1.9e+162))) (/ x (* t z)) (/ (/ x t) y)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.2e+79) || !(z <= 1.9e+162)) {
tmp = x / (t * z);
} else {
tmp = (x / t) / y;
}
return tmp;
}
NOTE: x, y, z, 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.2d+79)) .or. (.not. (z <= 1.9d+162))) then
tmp = x / (t * z)
else
tmp = (x / t) / y
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.2e+79) || !(z <= 1.9e+162)) {
tmp = x / (t * z);
} else {
tmp = (x / t) / y;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if (z <= -3.2e+79) or not (z <= 1.9e+162): tmp = x / (t * z) else: tmp = (x / t) / y return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -3.2e+79) || !(z <= 1.9e+162)) tmp = Float64(x / Float64(t * z)); else tmp = Float64(Float64(x / t) / y); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -3.2e+79) || ~((z <= 1.9e+162)))
tmp = x / (t * z);
else
tmp = (x / t) / y;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -3.2e+79], N[Not[LessEqual[z, 1.9e+162]], $MachinePrecision]], N[(x / N[(t * z), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+79} \lor \neg \left(z \leq 1.9 \cdot 10^{+162}\right):\\
\;\;\;\;\frac{x}{t \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -3.20000000000000003e79 or 1.90000000000000012e162 < z Initial program 69.4%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around inf 36.3%
Taylor expanded in y around 0 35.1%
associate-*r/35.1%
neg-mul-135.1%
Simplified35.1%
add-sqr-sqrt20.0%
sqrt-unprod39.7%
sqr-neg39.7%
sqrt-unprod15.0%
add-sqr-sqrt35.1%
div-inv35.1%
*-commutative35.1%
Applied egg-rr35.1%
associate-*r/35.1%
*-commutative35.1%
*-rgt-identity35.1%
Simplified35.1%
if -3.20000000000000003e79 < z < 1.90000000000000012e162Initial program 89.0%
Taylor expanded in z around 0 47.2%
associate-/r*54.3%
div-inv54.3%
Applied egg-rr54.3%
un-div-inv54.3%
Applied egg-rr54.3%
Final simplification47.8%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t 3.1e-55) (/ x (* (- t z) y)) (/ x (* t (- y z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 3.1e-55) {
tmp = x / ((t - z) * y);
} else {
tmp = x / (t * (y - z));
}
return tmp;
}
NOTE: x, y, z, 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 (t <= 3.1d-55) then
tmp = x / ((t - z) * y)
else
tmp = x / (t * (y - z))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= 3.1e-55) {
tmp = x / ((t - z) * y);
} else {
tmp = x / (t * (y - z));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= 3.1e-55: tmp = x / ((t - z) * y) else: tmp = x / (t * (y - z)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= 3.1e-55) tmp = Float64(x / Float64(Float64(t - z) * y)); else tmp = Float64(x / Float64(t * Float64(y - z))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= 3.1e-55)
tmp = x / ((t - z) * y);
else
tmp = x / (t * (y - z));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, 3.1e-55], N[(x / N[(N[(t - z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.1 \cdot 10^{-55}:\\
\;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\
\end{array}
\end{array}
if t < 3.09999999999999997e-55Initial program 85.1%
Taylor expanded in y around inf 58.9%
*-commutative58.9%
Simplified58.9%
if 3.09999999999999997e-55 < t Initial program 74.7%
Taylor expanded in t around inf 67.9%
Final simplification61.3%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t 1.45e-55) (/ x (* (- t z) y)) (/ (/ x t) (- y z))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 1.45e-55) {
tmp = x / ((t - z) * y);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: x, y, z, 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 (t <= 1.45d-55) then
tmp = x / ((t - z) * y)
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= 1.45e-55) {
tmp = x / ((t - z) * y);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= 1.45e-55: tmp = x / ((t - z) * y) else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= 1.45e-55) tmp = Float64(x / Float64(Float64(t - z) * y)); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= 1.45e-55)
tmp = x / ((t - z) * y);
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, 1.45e-55], N[(x / N[(N[(t - z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.45 \cdot 10^{-55}:\\
\;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < 1.45e-55Initial program 85.1%
Taylor expanded in y around inf 58.9%
*-commutative58.9%
Simplified58.9%
if 1.45e-55 < t Initial program 74.7%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around inf 83.3%
Final simplification65.3%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t 2.95e-55) (/ (/ x y) (- t z)) (/ (/ x t) (- y z))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 2.95e-55) {
tmp = (x / y) / (t - z);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: x, y, z, 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 (t <= 2.95d-55) then
tmp = (x / y) / (t - z)
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= 2.95e-55) {
tmp = (x / y) / (t - z);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= 2.95e-55: tmp = (x / y) / (t - z) else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= 2.95e-55) tmp = Float64(Float64(x / y) / Float64(t - z)); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= 2.95e-55)
tmp = (x / y) / (t - z);
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, 2.95e-55], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.95 \cdot 10^{-55}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < 2.9499999999999999e-55Initial program 85.1%
Taylor expanded in x around 0 85.1%
associate-/l/97.4%
Simplified97.4%
Taylor expanded in y around inf 63.2%
if 2.9499999999999999e-55 < t Initial program 74.7%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around inf 83.3%
Final simplification68.5%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (/ x (* t y)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return x / (t * y);
}
NOTE: x, y, z, 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 * y)
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return x / (t * y);
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return x / (t * y)
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(x / Float64(t * y)) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = x / (t * y);
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(x / N[(t * y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{x}{t \cdot y}
\end{array}
Initial program 82.4%
Taylor expanded in z around 0 35.6%
Final simplification35.6%
(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 2024071
(FPCore (x y z t)
:name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
:precision binary64
:alt
(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))))