
(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 19 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 (if (<= t 4.5e+255) (/ (/ x (- t z)) (- y z)) (* (/ x (- y z)) (/ 1.0 (- t z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 4.5e+255) {
tmp = (x / (t - z)) / (y - z);
} else {
tmp = (x / (y - z)) * (1.0 / (t - 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 <= 4.5d+255) then
tmp = (x / (t - z)) / (y - z)
else
tmp = (x / (y - z)) * (1.0d0 / (t - 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 <= 4.5e+255) {
tmp = (x / (t - z)) / (y - z);
} else {
tmp = (x / (y - z)) * (1.0 / (t - z));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= 4.5e+255: tmp = (x / (t - z)) / (y - z) else: tmp = (x / (y - z)) * (1.0 / (t - z)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= 4.5e+255) tmp = Float64(Float64(x / Float64(t - z)) / Float64(y - z)); else tmp = Float64(Float64(x / Float64(y - z)) * Float64(1.0 / Float64(t - 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 <= 4.5e+255)
tmp = (x / (t - z)) / (y - z);
else
tmp = (x / (y - z)) * (1.0 / (t - 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, 4.5e+255], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 4.5 \cdot 10^{+255}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y - z} \cdot \frac{1}{t - z}\\
\end{array}
\end{array}
if t < 4.49999999999999964e255Initial program 90.1%
add-sqr-sqrt43.9%
times-frac47.8%
Applied egg-rr47.8%
frac-times43.9%
add-sqr-sqrt90.1%
*-commutative90.1%
associate-/r*98.1%
Applied egg-rr98.1%
if 4.49999999999999964e255 < t Initial program 78.9%
associate-/r*99.8%
div-inv99.6%
Applied egg-rr99.6%
Final simplification98.2%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (* (/ (sqrt x) (- y z)) (/ (sqrt x) (- t z))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return (sqrt(x) / (y - z)) * (sqrt(x) / (t - 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 = (sqrt(x) / (y - z)) * (sqrt(x) / (t - z))
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return (Math.sqrt(x) / (y - z)) * (Math.sqrt(x) / (t - z));
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return (math.sqrt(x) / (y - z)) * (math.sqrt(x) / (t - z))
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(Float64(sqrt(x) / Float64(y - z)) * Float64(sqrt(x) / Float64(t - z))) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = (sqrt(x) / (y - z)) * (sqrt(x) / (t - 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[(N[Sqrt[x], $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[x], $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{\sqrt{x}}{y - z} \cdot \frac{\sqrt{x}}{t - z}
\end{array}
Initial program 89.5%
add-sqr-sqrt44.1%
times-frac48.2%
Applied egg-rr48.2%
Final simplification48.2%
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 (* (- y z) (- t z))))
(if (<= t_1 (- INFINITY))
(/ (/ x t) (- y z))
(if (<= t_1 2e+290) (/ x t_1) (/ (/ (- x) z) (- y z))))))assert(x < y && y < z && z < 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 <= 2e+290) {
tmp = x / t_1;
} else {
tmp = (-x / z) / (y - 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 = (y - z) * (t - z);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = (x / t) / (y - z);
} else if (t_1 <= 2e+290) {
tmp = x / t_1;
} else {
tmp = (-x / z) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, 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 <= 2e+290: tmp = x / t_1 else: tmp = (-x / z) / (y - z) return tmp
x, y, z, t = sort([x, y, z, 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 <= 2e+290) tmp = Float64(x / t_1); else tmp = Float64(Float64(Float64(-x) / z) / 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 = (y - z) * (t - z);
tmp = 0.0;
if (t_1 <= -Inf)
tmp = (x / t) / (y - z);
elseif (t_1 <= 2e+290)
tmp = x / t_1;
else
tmp = (-x / z) / (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[(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, 2e+290], N[(x / t$95$1), $MachinePrecision], N[(N[((-x) / z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, 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 2 \cdot 10^{+290}:\\
\;\;\;\;\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 56.3%
add-sqr-sqrt28.2%
times-frac47.3%
Applied egg-rr47.3%
frac-times28.2%
add-sqr-sqrt56.3%
*-commutative56.3%
associate-/r*99.8%
Applied egg-rr99.8%
Taylor expanded in t around inf 56.3%
associate-/r*95.4%
Simplified95.4%
if -inf.0 < (*.f64 (-.f64 y z) (-.f64 t z)) < 2.00000000000000012e290Initial program 98.6%
if 2.00000000000000012e290 < (*.f64 (-.f64 y z) (-.f64 t z)) Initial program 76.0%
add-sqr-sqrt36.0%
times-frac47.6%
Applied egg-rr47.6%
Taylor expanded in t around 0 73.2%
mul-1-neg73.2%
associate-/r*88.7%
distribute-neg-frac88.7%
distribute-frac-neg88.7%
Simplified88.7%
Final simplification95.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 (* (- y z) (- t z))))
(if (<= t_1 (- INFINITY))
(/ (/ x t) (- y z))
(if (<= t_1 2e+290) (/ x t_1) (/ (/ -1.0 z) (/ (- y z) x))))))assert(x < y && y < z && z < 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 <= 2e+290) {
tmp = x / t_1;
} else {
tmp = (-1.0 / z) / ((y - z) / x);
}
return tmp;
}
assert x < y && y < z && z < 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 <= 2e+290) {
tmp = x / t_1;
} else {
tmp = (-1.0 / z) / ((y - z) / x);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, 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 <= 2e+290: tmp = x / t_1 else: tmp = (-1.0 / z) / ((y - z) / x) return tmp
x, y, z, t = sort([x, y, z, 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 <= 2e+290) tmp = Float64(x / t_1); else tmp = Float64(Float64(-1.0 / z) / Float64(Float64(y - z) / x)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, 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 <= 2e+290)
tmp = x / t_1;
else
tmp = (-1.0 / z) / ((y - z) / x);
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[(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, 2e+290], N[(x / t$95$1), $MachinePrecision], N[(N[(-1.0 / z), $MachinePrecision] / N[(N[(y - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, 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 2 \cdot 10^{+290}:\\
\;\;\;\;\frac{x}{t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{-1}{z}}{\frac{y - z}{x}}\\
\end{array}
\end{array}
if (*.f64 (-.f64 y z) (-.f64 t z)) < -inf.0Initial program 56.3%
add-sqr-sqrt28.2%
times-frac47.3%
Applied egg-rr47.3%
frac-times28.2%
add-sqr-sqrt56.3%
*-commutative56.3%
associate-/r*99.8%
Applied egg-rr99.8%
Taylor expanded in t around inf 56.3%
associate-/r*95.4%
Simplified95.4%
if -inf.0 < (*.f64 (-.f64 y z) (-.f64 t z)) < 2.00000000000000012e290Initial program 98.6%
if 2.00000000000000012e290 < (*.f64 (-.f64 y z) (-.f64 t z)) Initial program 76.0%
clear-num76.0%
associate-/r/76.0%
Applied egg-rr76.0%
Taylor expanded in t around 0 73.2%
associate-/r*72.9%
Simplified72.9%
associate-*l/88.7%
associate-/l*90.0%
Applied egg-rr90.0%
Final simplification96.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 (/ x (* (- y z) (- t z))))) (if (<= t_1 0.0) (/ (/ x (- t z)) (- 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 / ((y - z) * (t - z));
double tmp;
if (t_1 <= 0.0) {
tmp = (x / (t - z)) / (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 / ((y - z) * (t - z))
if (t_1 <= 0.0d0) then
tmp = (x / (t - z)) / (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 / ((y - z) * (t - z));
double tmp;
if (t_1 <= 0.0) {
tmp = (x / (t - z)) / (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 / ((y - z) * (t - z)) tmp = 0 if t_1 <= 0.0: tmp = (x / (t - z)) / (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(x / Float64(Float64(y - z) * Float64(t - z))) tmp = 0.0 if (t_1 <= 0.0) tmp = Float64(Float64(x / Float64(t - z)) / 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 / ((y - z) * (t - z));
tmp = 0.0;
if (t_1 <= 0.0)
tmp = (x / (t - z)) / (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[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], t$95$1]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\
\mathbf{if}\;t_1 \leq 0:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z))) < -0.0Initial program 84.6%
add-sqr-sqrt38.8%
times-frac45.4%
Applied egg-rr45.4%
frac-times38.8%
add-sqr-sqrt84.6%
*-commutative84.6%
associate-/r*98.1%
Applied egg-rr98.1%
if -0.0 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z))) Initial program 99.5%
Final simplification98.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)) (t_2 (/ (- x) (* z t))))
(if (<= t -4.6e-38)
(/ x (* y t))
(if (<= t 4.5e-91)
(/ (- x) (* y z))
(if (<= t 1.9e+91)
t_1
(if (<= t 1.05e+133)
t_2
(if (<= t 3.3e+218)
t_1
(if (<= t 1.3e+251) t_2 (/ (/ x y) t)))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / t) / y;
double t_2 = -x / (z * t);
double tmp;
if (t <= -4.6e-38) {
tmp = x / (y * t);
} else if (t <= 4.5e-91) {
tmp = -x / (y * z);
} else if (t <= 1.9e+91) {
tmp = t_1;
} else if (t <= 1.05e+133) {
tmp = t_2;
} else if (t <= 3.3e+218) {
tmp = t_1;
} else if (t <= 1.3e+251) {
tmp = t_2;
} else {
tmp = (x / y) / t;
}
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) :: t_2
real(8) :: tmp
t_1 = (x / t) / y
t_2 = -x / (z * t)
if (t <= (-4.6d-38)) then
tmp = x / (y * t)
else if (t <= 4.5d-91) then
tmp = -x / (y * z)
else if (t <= 1.9d+91) then
tmp = t_1
else if (t <= 1.05d+133) then
tmp = t_2
else if (t <= 3.3d+218) then
tmp = t_1
else if (t <= 1.3d+251) then
tmp = t_2
else
tmp = (x / y) / t
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 t_2 = -x / (z * t);
double tmp;
if (t <= -4.6e-38) {
tmp = x / (y * t);
} else if (t <= 4.5e-91) {
tmp = -x / (y * z);
} else if (t <= 1.9e+91) {
tmp = t_1;
} else if (t <= 1.05e+133) {
tmp = t_2;
} else if (t <= 3.3e+218) {
tmp = t_1;
} else if (t <= 1.3e+251) {
tmp = t_2;
} else {
tmp = (x / y) / t;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = (x / t) / y t_2 = -x / (z * t) tmp = 0 if t <= -4.6e-38: tmp = x / (y * t) elif t <= 4.5e-91: tmp = -x / (y * z) elif t <= 1.9e+91: tmp = t_1 elif t <= 1.05e+133: tmp = t_2 elif t <= 3.3e+218: tmp = t_1 elif t <= 1.3e+251: tmp = t_2 else: tmp = (x / y) / t return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / t) / y) t_2 = Float64(Float64(-x) / Float64(z * t)) tmp = 0.0 if (t <= -4.6e-38) tmp = Float64(x / Float64(y * t)); elseif (t <= 4.5e-91) tmp = Float64(Float64(-x) / Float64(y * z)); elseif (t <= 1.9e+91) tmp = t_1; elseif (t <= 1.05e+133) tmp = t_2; elseif (t <= 3.3e+218) tmp = t_1; elseif (t <= 1.3e+251) tmp = t_2; else tmp = Float64(Float64(x / y) / t); 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;
t_2 = -x / (z * t);
tmp = 0.0;
if (t <= -4.6e-38)
tmp = x / (y * t);
elseif (t <= 4.5e-91)
tmp = -x / (y * z);
elseif (t <= 1.9e+91)
tmp = t_1;
elseif (t <= 1.05e+133)
tmp = t_2;
elseif (t <= 3.3e+218)
tmp = t_1;
elseif (t <= 1.3e+251)
tmp = t_2;
else
tmp = (x / y) / t;
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]}, Block[{t$95$2 = N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.6e-38], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.5e-91], N[((-x) / N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e+91], t$95$1, If[LessEqual[t, 1.05e+133], t$95$2, If[LessEqual[t, 3.3e+218], t$95$1, If[LessEqual[t, 1.3e+251], t$95$2, N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{t}}{y}\\
t_2 := \frac{-x}{z \cdot t}\\
\mathbf{if}\;t \leq -4.6 \cdot 10^{-38}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{-91}:\\
\;\;\;\;\frac{-x}{y \cdot z}\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{+91}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{+133}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{+218}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{+251}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\end{array}
\end{array}
if t < -4.60000000000000003e-38Initial program 90.1%
Taylor expanded in z around 0 58.2%
if -4.60000000000000003e-38 < t < 4.49999999999999976e-91Initial program 93.4%
Taylor expanded in y around inf 60.1%
*-commutative60.1%
associate-/r*63.8%
Simplified63.8%
Taylor expanded in t around 0 54.9%
associate-*r/54.9%
neg-mul-154.9%
*-commutative54.9%
Simplified54.9%
if 4.49999999999999976e-91 < t < 1.8999999999999999e91 or 1.05e133 < t < 3.29999999999999998e218Initial program 83.0%
Taylor expanded in y around inf 65.7%
*-commutative65.7%
associate-/r*70.5%
Simplified70.5%
Taylor expanded in t around inf 55.7%
if 1.8999999999999999e91 < t < 1.05e133 or 3.29999999999999998e218 < t < 1.3000000000000001e251Initial program 93.4%
Taylor expanded in z around 0 92.9%
distribute-lft-out92.9%
mul-1-neg92.9%
distribute-rgt-neg-in92.9%
unsub-neg92.9%
Simplified92.9%
Taylor expanded in y around 0 86.8%
associate-*r/86.8%
neg-mul-186.8%
Simplified86.8%
if 1.3000000000000001e251 < t Initial program 80.3%
Taylor expanded in z around 0 52.1%
associate-/r*61.3%
div-inv61.4%
Applied egg-rr61.4%
associate-*l/57.9%
un-div-inv58.2%
Applied egg-rr58.2%
Final simplification57.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 t) y)) (t_2 (/ (- x) (* z t))))
(if (<= t -9.5e-37)
(/ x (* y t))
(if (<= t 3.1e-93)
(/ (/ (- x) z) y)
(if (<= t 1.1e+91)
t_1
(if (<= t 1.15e+133)
t_2
(if (<= t 2.7e+213)
t_1
(if (<= t 1.1e+251) t_2 (/ (/ x y) t)))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / t) / y;
double t_2 = -x / (z * t);
double tmp;
if (t <= -9.5e-37) {
tmp = x / (y * t);
} else if (t <= 3.1e-93) {
tmp = (-x / z) / y;
} else if (t <= 1.1e+91) {
tmp = t_1;
} else if (t <= 1.15e+133) {
tmp = t_2;
} else if (t <= 2.7e+213) {
tmp = t_1;
} else if (t <= 1.1e+251) {
tmp = t_2;
} else {
tmp = (x / y) / t;
}
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) :: t_2
real(8) :: tmp
t_1 = (x / t) / y
t_2 = -x / (z * t)
if (t <= (-9.5d-37)) then
tmp = x / (y * t)
else if (t <= 3.1d-93) then
tmp = (-x / z) / y
else if (t <= 1.1d+91) then
tmp = t_1
else if (t <= 1.15d+133) then
tmp = t_2
else if (t <= 2.7d+213) then
tmp = t_1
else if (t <= 1.1d+251) then
tmp = t_2
else
tmp = (x / y) / t
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 t_2 = -x / (z * t);
double tmp;
if (t <= -9.5e-37) {
tmp = x / (y * t);
} else if (t <= 3.1e-93) {
tmp = (-x / z) / y;
} else if (t <= 1.1e+91) {
tmp = t_1;
} else if (t <= 1.15e+133) {
tmp = t_2;
} else if (t <= 2.7e+213) {
tmp = t_1;
} else if (t <= 1.1e+251) {
tmp = t_2;
} else {
tmp = (x / y) / t;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = (x / t) / y t_2 = -x / (z * t) tmp = 0 if t <= -9.5e-37: tmp = x / (y * t) elif t <= 3.1e-93: tmp = (-x / z) / y elif t <= 1.1e+91: tmp = t_1 elif t <= 1.15e+133: tmp = t_2 elif t <= 2.7e+213: tmp = t_1 elif t <= 1.1e+251: tmp = t_2 else: tmp = (x / y) / t return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / t) / y) t_2 = Float64(Float64(-x) / Float64(z * t)) tmp = 0.0 if (t <= -9.5e-37) tmp = Float64(x / Float64(y * t)); elseif (t <= 3.1e-93) tmp = Float64(Float64(Float64(-x) / z) / y); elseif (t <= 1.1e+91) tmp = t_1; elseif (t <= 1.15e+133) tmp = t_2; elseif (t <= 2.7e+213) tmp = t_1; elseif (t <= 1.1e+251) tmp = t_2; else tmp = Float64(Float64(x / y) / t); 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;
t_2 = -x / (z * t);
tmp = 0.0;
if (t <= -9.5e-37)
tmp = x / (y * t);
elseif (t <= 3.1e-93)
tmp = (-x / z) / y;
elseif (t <= 1.1e+91)
tmp = t_1;
elseif (t <= 1.15e+133)
tmp = t_2;
elseif (t <= 2.7e+213)
tmp = t_1;
elseif (t <= 1.1e+251)
tmp = t_2;
else
tmp = (x / y) / t;
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]}, Block[{t$95$2 = N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.5e-37], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.1e-93], N[(N[((-x) / z), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 1.1e+91], t$95$1, If[LessEqual[t, 1.15e+133], t$95$2, If[LessEqual[t, 2.7e+213], t$95$1, If[LessEqual[t, 1.1e+251], t$95$2, N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{t}}{y}\\
t_2 := \frac{-x}{z \cdot t}\\
\mathbf{if}\;t \leq -9.5 \cdot 10^{-37}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{-93}:\\
\;\;\;\;\frac{\frac{-x}{z}}{y}\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+91}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+133}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{+213}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+251}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\end{array}
\end{array}
if t < -9.49999999999999927e-37Initial program 90.1%
Taylor expanded in z around 0 58.2%
if -9.49999999999999927e-37 < t < 3.1e-93Initial program 93.3%
Taylor expanded in y around inf 59.7%
*-commutative59.7%
associate-/r*63.4%
Simplified63.4%
Taylor expanded in t around 0 57.9%
associate-*r/57.9%
neg-mul-157.9%
Simplified57.9%
if 3.1e-93 < t < 1.1e91 or 1.14999999999999995e133 < t < 2.7000000000000001e213Initial program 83.3%
Taylor expanded in y around inf 66.3%
*-commutative66.3%
associate-/r*71.0%
Simplified71.0%
Taylor expanded in t around inf 56.5%
if 1.1e91 < t < 1.14999999999999995e133 or 2.7000000000000001e213 < t < 1.1e251Initial program 93.4%
Taylor expanded in z around 0 92.9%
distribute-lft-out92.9%
mul-1-neg92.9%
distribute-rgt-neg-in92.9%
unsub-neg92.9%
Simplified92.9%
Taylor expanded in y around 0 86.8%
associate-*r/86.8%
neg-mul-186.8%
Simplified86.8%
if 1.1e251 < t Initial program 80.3%
Taylor expanded in z around 0 52.1%
associate-/r*61.3%
div-inv61.4%
Applied egg-rr61.4%
associate-*l/57.9%
un-div-inv58.2%
Applied egg-rr58.2%
Final simplification59.3%
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))))
(if (<= t -1.95e-37)
(/ x (* y t))
(if (<= t 1.2e-93)
(/ (/ (- x) z) y)
(if (<= t 1.2e+91)
(/ (/ x t) y)
(if (<= t 8.2e+132)
t_1
(if (<= t 5.5e+218)
(* (/ x t) (/ 1.0 y))
(if (<= t 1.1e+251) t_1 (/ (/ x y) t)))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = -x / (z * t);
double tmp;
if (t <= -1.95e-37) {
tmp = x / (y * t);
} else if (t <= 1.2e-93) {
tmp = (-x / z) / y;
} else if (t <= 1.2e+91) {
tmp = (x / t) / y;
} else if (t <= 8.2e+132) {
tmp = t_1;
} else if (t <= 5.5e+218) {
tmp = (x / t) * (1.0 / y);
} else if (t <= 1.1e+251) {
tmp = t_1;
} else {
tmp = (x / y) / t;
}
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)
if (t <= (-1.95d-37)) then
tmp = x / (y * t)
else if (t <= 1.2d-93) then
tmp = (-x / z) / y
else if (t <= 1.2d+91) then
tmp = (x / t) / y
else if (t <= 8.2d+132) then
tmp = t_1
else if (t <= 5.5d+218) then
tmp = (x / t) * (1.0d0 / y)
else if (t <= 1.1d+251) then
tmp = t_1
else
tmp = (x / y) / t
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);
double tmp;
if (t <= -1.95e-37) {
tmp = x / (y * t);
} else if (t <= 1.2e-93) {
tmp = (-x / z) / y;
} else if (t <= 1.2e+91) {
tmp = (x / t) / y;
} else if (t <= 8.2e+132) {
tmp = t_1;
} else if (t <= 5.5e+218) {
tmp = (x / t) * (1.0 / y);
} else if (t <= 1.1e+251) {
tmp = t_1;
} else {
tmp = (x / y) / t;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = -x / (z * t) tmp = 0 if t <= -1.95e-37: tmp = x / (y * t) elif t <= 1.2e-93: tmp = (-x / z) / y elif t <= 1.2e+91: tmp = (x / t) / y elif t <= 8.2e+132: tmp = t_1 elif t <= 5.5e+218: tmp = (x / t) * (1.0 / y) elif t <= 1.1e+251: tmp = t_1 else: tmp = (x / y) / t return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(-x) / Float64(z * t)) tmp = 0.0 if (t <= -1.95e-37) tmp = Float64(x / Float64(y * t)); elseif (t <= 1.2e-93) tmp = Float64(Float64(Float64(-x) / z) / y); elseif (t <= 1.2e+91) tmp = Float64(Float64(x / t) / y); elseif (t <= 8.2e+132) tmp = t_1; elseif (t <= 5.5e+218) tmp = Float64(Float64(x / t) * Float64(1.0 / y)); elseif (t <= 1.1e+251) tmp = t_1; else tmp = Float64(Float64(x / y) / t); 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);
tmp = 0.0;
if (t <= -1.95e-37)
tmp = x / (y * t);
elseif (t <= 1.2e-93)
tmp = (-x / z) / y;
elseif (t <= 1.2e+91)
tmp = (x / t) / y;
elseif (t <= 8.2e+132)
tmp = t_1;
elseif (t <= 5.5e+218)
tmp = (x / t) * (1.0 / y);
elseif (t <= 1.1e+251)
tmp = t_1;
else
tmp = (x / y) / t;
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[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.95e-37], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.2e-93], N[(N[((-x) / z), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 1.2e+91], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 8.2e+132], t$95$1, If[LessEqual[t, 5.5e+218], N[(N[(x / t), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.1e+251], t$95$1, N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{-x}{z \cdot t}\\
\mathbf{if}\;t \leq -1.95 \cdot 10^{-37}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{-93}:\\
\;\;\;\;\frac{\frac{-x}{z}}{y}\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{+91}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;t \leq 8.2 \cdot 10^{+132}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{+218}:\\
\;\;\;\;\frac{x}{t} \cdot \frac{1}{y}\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+251}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\end{array}
\end{array}
if t < -1.94999999999999995e-37Initial program 90.1%
Taylor expanded in z around 0 58.2%
if -1.94999999999999995e-37 < t < 1.2000000000000001e-93Initial program 93.3%
Taylor expanded in y around inf 59.7%
*-commutative59.7%
associate-/r*63.4%
Simplified63.4%
Taylor expanded in t around 0 57.9%
associate-*r/57.9%
neg-mul-157.9%
Simplified57.9%
if 1.2000000000000001e-93 < t < 1.19999999999999991e91Initial program 92.7%
Taylor expanded in y around inf 71.7%
*-commutative71.7%
associate-/r*71.5%
Simplified71.5%
Taylor expanded in t around inf 55.4%
if 1.19999999999999991e91 < t < 8.19999999999999983e132 or 5.5000000000000004e218 < t < 1.1e251Initial program 93.4%
Taylor expanded in z around 0 92.9%
distribute-lft-out92.9%
mul-1-neg92.9%
distribute-rgt-neg-in92.9%
unsub-neg92.9%
Simplified92.9%
Taylor expanded in y around 0 86.8%
associate-*r/86.8%
neg-mul-186.8%
Simplified86.8%
if 8.19999999999999983e132 < t < 5.5000000000000004e218Initial program 59.2%
Taylor expanded in z around 0 43.5%
associate-/r*59.3%
div-inv59.4%
Applied egg-rr59.4%
if 1.1e251 < t Initial program 80.3%
Taylor expanded in z around 0 52.1%
associate-/r*61.3%
div-inv61.4%
Applied egg-rr61.4%
associate-*l/57.9%
un-div-inv58.2%
Applied egg-rr58.2%
Final simplification59.3%
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))))
(if (<= t -4.8e-38)
(* x (/ (/ 1.0 t) y))
(if (<= t 2.25e-94)
(/ (/ (- x) z) y)
(if (<= t 1.52e+90)
(/ (/ x t) y)
(if (<= t 2.4e+133)
t_1
(if (<= t 1.9e+218)
(* (/ x t) (/ 1.0 y))
(if (<= t 1.06e+251) t_1 (/ (/ x y) t)))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = -x / (z * t);
double tmp;
if (t <= -4.8e-38) {
tmp = x * ((1.0 / t) / y);
} else if (t <= 2.25e-94) {
tmp = (-x / z) / y;
} else if (t <= 1.52e+90) {
tmp = (x / t) / y;
} else if (t <= 2.4e+133) {
tmp = t_1;
} else if (t <= 1.9e+218) {
tmp = (x / t) * (1.0 / y);
} else if (t <= 1.06e+251) {
tmp = t_1;
} else {
tmp = (x / y) / t;
}
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)
if (t <= (-4.8d-38)) then
tmp = x * ((1.0d0 / t) / y)
else if (t <= 2.25d-94) then
tmp = (-x / z) / y
else if (t <= 1.52d+90) then
tmp = (x / t) / y
else if (t <= 2.4d+133) then
tmp = t_1
else if (t <= 1.9d+218) then
tmp = (x / t) * (1.0d0 / y)
else if (t <= 1.06d+251) then
tmp = t_1
else
tmp = (x / y) / t
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);
double tmp;
if (t <= -4.8e-38) {
tmp = x * ((1.0 / t) / y);
} else if (t <= 2.25e-94) {
tmp = (-x / z) / y;
} else if (t <= 1.52e+90) {
tmp = (x / t) / y;
} else if (t <= 2.4e+133) {
tmp = t_1;
} else if (t <= 1.9e+218) {
tmp = (x / t) * (1.0 / y);
} else if (t <= 1.06e+251) {
tmp = t_1;
} else {
tmp = (x / y) / t;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = -x / (z * t) tmp = 0 if t <= -4.8e-38: tmp = x * ((1.0 / t) / y) elif t <= 2.25e-94: tmp = (-x / z) / y elif t <= 1.52e+90: tmp = (x / t) / y elif t <= 2.4e+133: tmp = t_1 elif t <= 1.9e+218: tmp = (x / t) * (1.0 / y) elif t <= 1.06e+251: tmp = t_1 else: tmp = (x / y) / t return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(-x) / Float64(z * t)) tmp = 0.0 if (t <= -4.8e-38) tmp = Float64(x * Float64(Float64(1.0 / t) / y)); elseif (t <= 2.25e-94) tmp = Float64(Float64(Float64(-x) / z) / y); elseif (t <= 1.52e+90) tmp = Float64(Float64(x / t) / y); elseif (t <= 2.4e+133) tmp = t_1; elseif (t <= 1.9e+218) tmp = Float64(Float64(x / t) * Float64(1.0 / y)); elseif (t <= 1.06e+251) tmp = t_1; else tmp = Float64(Float64(x / y) / t); 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);
tmp = 0.0;
if (t <= -4.8e-38)
tmp = x * ((1.0 / t) / y);
elseif (t <= 2.25e-94)
tmp = (-x / z) / y;
elseif (t <= 1.52e+90)
tmp = (x / t) / y;
elseif (t <= 2.4e+133)
tmp = t_1;
elseif (t <= 1.9e+218)
tmp = (x / t) * (1.0 / y);
elseif (t <= 1.06e+251)
tmp = t_1;
else
tmp = (x / y) / t;
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[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.8e-38], N[(x * N[(N[(1.0 / t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.25e-94], N[(N[((-x) / z), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 1.52e+90], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 2.4e+133], t$95$1, If[LessEqual[t, 1.9e+218], N[(N[(x / t), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.06e+251], t$95$1, N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{-x}{z \cdot t}\\
\mathbf{if}\;t \leq -4.8 \cdot 10^{-38}:\\
\;\;\;\;x \cdot \frac{\frac{1}{t}}{y}\\
\mathbf{elif}\;t \leq 2.25 \cdot 10^{-94}:\\
\;\;\;\;\frac{\frac{-x}{z}}{y}\\
\mathbf{elif}\;t \leq 1.52 \cdot 10^{+90}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{+133}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{+218}:\\
\;\;\;\;\frac{x}{t} \cdot \frac{1}{y}\\
\mathbf{elif}\;t \leq 1.06 \cdot 10^{+251}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\end{array}
\end{array}
if t < -4.80000000000000044e-38Initial program 90.1%
clear-num90.1%
associate-/r/90.1%
Applied egg-rr90.1%
Taylor expanded in z around 0 58.1%
associate-/r*59.0%
Simplified59.0%
if -4.80000000000000044e-38 < t < 2.2500000000000001e-94Initial program 93.3%
Taylor expanded in y around inf 59.7%
*-commutative59.7%
associate-/r*63.4%
Simplified63.4%
Taylor expanded in t around 0 57.9%
associate-*r/57.9%
neg-mul-157.9%
Simplified57.9%
if 2.2500000000000001e-94 < t < 1.52000000000000009e90Initial program 92.7%
Taylor expanded in y around inf 71.7%
*-commutative71.7%
associate-/r*71.5%
Simplified71.5%
Taylor expanded in t around inf 55.4%
if 1.52000000000000009e90 < t < 2.3999999999999999e133 or 1.90000000000000006e218 < t < 1.05999999999999998e251Initial program 93.4%
Taylor expanded in z around 0 92.9%
distribute-lft-out92.9%
mul-1-neg92.9%
distribute-rgt-neg-in92.9%
unsub-neg92.9%
Simplified92.9%
Taylor expanded in y around 0 86.8%
associate-*r/86.8%
neg-mul-186.8%
Simplified86.8%
if 2.3999999999999999e133 < t < 1.90000000000000006e218Initial program 59.2%
Taylor expanded in z around 0 43.5%
associate-/r*59.3%
div-inv59.4%
Applied egg-rr59.4%
if 1.05999999999999998e251 < t Initial program 80.3%
Taylor expanded in z around 0 52.1%
associate-/r*61.3%
div-inv61.4%
Applied egg-rr61.4%
associate-*l/57.9%
un-div-inv58.2%
Applied egg-rr58.2%
Final simplification59.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) (* z t))))
(if (<= t -5.5e-37)
(* x (/ (/ 1.0 t) y))
(if (<= t 3.3e-97)
(/ (/ (- x) z) y)
(if (<= t 3e+89)
(/ (/ x t) y)
(if (<= t 4e+133)
t_1
(if (<= t 3e+214)
(/ 1.0 (/ y (/ x t)))
(if (<= t 1.05e+251) t_1 (/ (/ x y) t)))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = -x / (z * t);
double tmp;
if (t <= -5.5e-37) {
tmp = x * ((1.0 / t) / y);
} else if (t <= 3.3e-97) {
tmp = (-x / z) / y;
} else if (t <= 3e+89) {
tmp = (x / t) / y;
} else if (t <= 4e+133) {
tmp = t_1;
} else if (t <= 3e+214) {
tmp = 1.0 / (y / (x / t));
} else if (t <= 1.05e+251) {
tmp = t_1;
} else {
tmp = (x / y) / t;
}
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)
if (t <= (-5.5d-37)) then
tmp = x * ((1.0d0 / t) / y)
else if (t <= 3.3d-97) then
tmp = (-x / z) / y
else if (t <= 3d+89) then
tmp = (x / t) / y
else if (t <= 4d+133) then
tmp = t_1
else if (t <= 3d+214) then
tmp = 1.0d0 / (y / (x / t))
else if (t <= 1.05d+251) then
tmp = t_1
else
tmp = (x / y) / t
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);
double tmp;
if (t <= -5.5e-37) {
tmp = x * ((1.0 / t) / y);
} else if (t <= 3.3e-97) {
tmp = (-x / z) / y;
} else if (t <= 3e+89) {
tmp = (x / t) / y;
} else if (t <= 4e+133) {
tmp = t_1;
} else if (t <= 3e+214) {
tmp = 1.0 / (y / (x / t));
} else if (t <= 1.05e+251) {
tmp = t_1;
} else {
tmp = (x / y) / t;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = -x / (z * t) tmp = 0 if t <= -5.5e-37: tmp = x * ((1.0 / t) / y) elif t <= 3.3e-97: tmp = (-x / z) / y elif t <= 3e+89: tmp = (x / t) / y elif t <= 4e+133: tmp = t_1 elif t <= 3e+214: tmp = 1.0 / (y / (x / t)) elif t <= 1.05e+251: tmp = t_1 else: tmp = (x / y) / t return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(-x) / Float64(z * t)) tmp = 0.0 if (t <= -5.5e-37) tmp = Float64(x * Float64(Float64(1.0 / t) / y)); elseif (t <= 3.3e-97) tmp = Float64(Float64(Float64(-x) / z) / y); elseif (t <= 3e+89) tmp = Float64(Float64(x / t) / y); elseif (t <= 4e+133) tmp = t_1; elseif (t <= 3e+214) tmp = Float64(1.0 / Float64(y / Float64(x / t))); elseif (t <= 1.05e+251) tmp = t_1; else tmp = Float64(Float64(x / y) / t); 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);
tmp = 0.0;
if (t <= -5.5e-37)
tmp = x * ((1.0 / t) / y);
elseif (t <= 3.3e-97)
tmp = (-x / z) / y;
elseif (t <= 3e+89)
tmp = (x / t) / y;
elseif (t <= 4e+133)
tmp = t_1;
elseif (t <= 3e+214)
tmp = 1.0 / (y / (x / t));
elseif (t <= 1.05e+251)
tmp = t_1;
else
tmp = (x / y) / t;
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[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.5e-37], N[(x * N[(N[(1.0 / t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.3e-97], N[(N[((-x) / z), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 3e+89], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 4e+133], t$95$1, If[LessEqual[t, 3e+214], N[(1.0 / N[(y / N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.05e+251], t$95$1, N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{-x}{z \cdot t}\\
\mathbf{if}\;t \leq -5.5 \cdot 10^{-37}:\\
\;\;\;\;x \cdot \frac{\frac{1}{t}}{y}\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{-97}:\\
\;\;\;\;\frac{\frac{-x}{z}}{y}\\
\mathbf{elif}\;t \leq 3 \cdot 10^{+89}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;t \leq 4 \cdot 10^{+133}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3 \cdot 10^{+214}:\\
\;\;\;\;\frac{1}{\frac{y}{\frac{x}{t}}}\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{+251}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\end{array}
\end{array}
if t < -5.4999999999999998e-37Initial program 90.1%
clear-num90.1%
associate-/r/90.1%
Applied egg-rr90.1%
Taylor expanded in z around 0 58.1%
associate-/r*59.0%
Simplified59.0%
if -5.4999999999999998e-37 < t < 3.3000000000000001e-97Initial program 93.2%
Taylor expanded in y around inf 59.3%
*-commutative59.3%
associate-/r*63.1%
Simplified63.1%
Taylor expanded in t around 0 57.5%
associate-*r/57.5%
neg-mul-157.5%
Simplified57.5%
if 3.3000000000000001e-97 < t < 3.00000000000000013e89Initial program 92.9%
Taylor expanded in y around inf 72.3%
*-commutative72.3%
associate-/r*72.2%
Simplified72.2%
Taylor expanded in t around inf 54.2%
if 3.00000000000000013e89 < t < 4.0000000000000001e133 or 3.0000000000000001e214 < t < 1.05e251Initial program 93.4%
Taylor expanded in z around 0 92.9%
distribute-lft-out92.9%
mul-1-neg92.9%
distribute-rgt-neg-in92.9%
unsub-neg92.9%
Simplified92.9%
Taylor expanded in y around 0 86.8%
associate-*r/86.8%
neg-mul-186.8%
Simplified86.8%
if 4.0000000000000001e133 < t < 3.0000000000000001e214Initial program 59.2%
Taylor expanded in z around 0 43.5%
clear-num52.4%
inv-pow52.4%
*-commutative52.4%
Applied egg-rr52.4%
unpow-152.4%
associate-/l*63.7%
Simplified63.7%
if 1.05e251 < t Initial program 80.3%
Taylor expanded in z around 0 52.1%
associate-/r*61.3%
div-inv61.4%
Applied egg-rr61.4%
associate-*l/57.9%
un-div-inv58.2%
Applied egg-rr58.2%
Final simplification59.4%
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 -5e-17) (/ (/ x (- t z)) y) (if (<= y 3.4e-214) (/ (- x) (* z (- t z))) (/ x (* (- y z) t)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5e-17) {
tmp = (x / (t - z)) / y;
} else if (y <= 3.4e-214) {
tmp = -x / (z * (t - z));
} else {
tmp = x / ((y - z) * t);
}
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 <= (-5d-17)) then
tmp = (x / (t - z)) / y
else if (y <= 3.4d-214) then
tmp = -x / (z * (t - z))
else
tmp = x / ((y - z) * t)
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 <= -5e-17) {
tmp = (x / (t - z)) / y;
} else if (y <= 3.4e-214) {
tmp = -x / (z * (t - z));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= -5e-17: tmp = (x / (t - z)) / y elif y <= 3.4e-214: tmp = -x / (z * (t - z)) else: tmp = x / ((y - z) * t) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -5e-17) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (y <= 3.4e-214) tmp = Float64(Float64(-x) / Float64(z * Float64(t - z))); else tmp = Float64(x / Float64(Float64(y - z) * t)); 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 <= -5e-17)
tmp = (x / (t - z)) / y;
elseif (y <= 3.4e-214)
tmp = -x / (z * (t - z));
else
tmp = x / ((y - z) * t);
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, -5e-17], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 3.4e-214], N[((-x) / N[(z * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{-17}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{-214}:\\
\;\;\;\;\frac{-x}{z \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if y < -4.9999999999999999e-17Initial program 83.2%
Taylor expanded in y around inf 79.0%
*-commutative79.0%
associate-/r*86.0%
Simplified86.0%
if -4.9999999999999999e-17 < y < 3.3999999999999999e-214Initial program 91.2%
Taylor expanded in y around 0 74.1%
associate-*r/74.1%
neg-mul-174.1%
Simplified74.1%
if 3.3999999999999999e-214 < y Initial program 92.7%
Taylor expanded in t around inf 62.4%
Final simplification73.0%
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 -2.25e-17) (/ (/ x (- t z)) y) (if (<= y 2.3e-214) (/ (/ (- x) z) (- t z)) (/ x (* (- y z) t)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.25e-17) {
tmp = (x / (t - z)) / y;
} else if (y <= 2.3e-214) {
tmp = (-x / z) / (t - z);
} else {
tmp = x / ((y - z) * t);
}
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 <= (-2.25d-17)) then
tmp = (x / (t - z)) / y
else if (y <= 2.3d-214) then
tmp = (-x / z) / (t - z)
else
tmp = x / ((y - z) * t)
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 <= -2.25e-17) {
tmp = (x / (t - z)) / y;
} else if (y <= 2.3e-214) {
tmp = (-x / z) / (t - z);
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= -2.25e-17: tmp = (x / (t - z)) / y elif y <= 2.3e-214: tmp = (-x / z) / (t - z) else: tmp = x / ((y - z) * t) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -2.25e-17) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (y <= 2.3e-214) tmp = Float64(Float64(Float64(-x) / z) / Float64(t - z)); else tmp = Float64(x / Float64(Float64(y - z) * t)); 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 <= -2.25e-17)
tmp = (x / (t - z)) / y;
elseif (y <= 2.3e-214)
tmp = (-x / z) / (t - z);
else
tmp = x / ((y - z) * t);
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, -2.25e-17], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 2.3e-214], N[(N[((-x) / z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.25 \cdot 10^{-17}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{-214}:\\
\;\;\;\;\frac{\frac{-x}{z}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if y < -2.24999999999999989e-17Initial program 83.2%
Taylor expanded in y around inf 79.0%
*-commutative79.0%
associate-/r*86.0%
Simplified86.0%
if -2.24999999999999989e-17 < y < 2.30000000000000011e-214Initial program 91.2%
add-sqr-sqrt39.7%
times-frac43.9%
Applied egg-rr43.9%
Taylor expanded in y around 0 74.1%
mul-1-neg74.1%
associate-/r*79.4%
distribute-neg-frac79.4%
distribute-frac-neg79.4%
Simplified79.4%
if 2.30000000000000011e-214 < y Initial program 92.7%
Taylor expanded in t around inf 62.4%
Final simplification74.7%
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 -4.6e-38) (* x (/ (/ 1.0 t) y)) (if (<= t 5.5e-94) (/ (/ (- x) z) y) (/ x (* (- y z) t)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -4.6e-38) {
tmp = x * ((1.0 / t) / y);
} else if (t <= 5.5e-94) {
tmp = (-x / z) / y;
} else {
tmp = x / ((y - z) * t);
}
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 <= (-4.6d-38)) then
tmp = x * ((1.0d0 / t) / y)
else if (t <= 5.5d-94) then
tmp = (-x / z) / y
else
tmp = x / ((y - z) * t)
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 <= -4.6e-38) {
tmp = x * ((1.0 / t) / y);
} else if (t <= 5.5e-94) {
tmp = (-x / z) / y;
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -4.6e-38: tmp = x * ((1.0 / t) / y) elif t <= 5.5e-94: tmp = (-x / z) / y else: tmp = x / ((y - z) * t) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -4.6e-38) tmp = Float64(x * Float64(Float64(1.0 / t) / y)); elseif (t <= 5.5e-94) tmp = Float64(Float64(Float64(-x) / z) / y); else tmp = Float64(x / Float64(Float64(y - z) * t)); 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 <= -4.6e-38)
tmp = x * ((1.0 / t) / y);
elseif (t <= 5.5e-94)
tmp = (-x / z) / y;
else
tmp = x / ((y - z) * t);
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, -4.6e-38], N[(x * N[(N[(1.0 / t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.5e-94], N[(N[((-x) / z), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.6 \cdot 10^{-38}:\\
\;\;\;\;x \cdot \frac{\frac{1}{t}}{y}\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{-94}:\\
\;\;\;\;\frac{\frac{-x}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < -4.60000000000000003e-38Initial program 90.1%
clear-num90.1%
associate-/r/90.1%
Applied egg-rr90.1%
Taylor expanded in z around 0 58.1%
associate-/r*59.0%
Simplified59.0%
if -4.60000000000000003e-38 < t < 5.49999999999999989e-94Initial program 93.3%
Taylor expanded in y around inf 59.7%
*-commutative59.7%
associate-/r*63.4%
Simplified63.4%
Taylor expanded in t around 0 57.9%
associate-*r/57.9%
neg-mul-157.9%
Simplified57.9%
if 5.49999999999999989e-94 < t Initial program 84.5%
Taylor expanded in t around inf 74.4%
Final simplification63.7%
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 -1.02e-52) (/ (/ x y) t) (if (<= y 6.4e-84) (/ (- 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 <= -1.02e-52) {
tmp = (x / y) / t;
} else if (y <= 6.4e-84) {
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 <= (-1.02d-52)) then
tmp = (x / y) / t
else if (y <= 6.4d-84) 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 <= -1.02e-52) {
tmp = (x / y) / t;
} else if (y <= 6.4e-84) {
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 <= -1.02e-52: tmp = (x / y) / t elif y <= 6.4e-84: 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 <= -1.02e-52) tmp = Float64(Float64(x / y) / t); elseif (y <= 6.4e-84) tmp = Float64(Float64(-x) / Float64(z * 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 <= -1.02e-52)
tmp = (x / y) / t;
elseif (y <= 6.4e-84)
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, -1.02e-52], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[y, 6.4e-84], 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 -1.02 \cdot 10^{-52}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{-84}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if y < -1.02000000000000009e-52Initial program 84.8%
Taylor expanded in z around 0 39.9%
associate-/r*42.8%
div-inv42.8%
Applied egg-rr42.8%
associate-*l/45.0%
un-div-inv45.0%
Applied egg-rr45.0%
if -1.02000000000000009e-52 < y < 6.3999999999999999e-84Initial program 89.2%
Taylor expanded in z around 0 67.0%
distribute-lft-out67.0%
mul-1-neg67.0%
distribute-rgt-neg-in67.0%
unsub-neg67.0%
Simplified67.0%
Taylor expanded in y around 0 49.5%
associate-*r/49.5%
neg-mul-149.5%
Simplified49.5%
if 6.3999999999999999e-84 < y Initial program 95.0%
Taylor expanded in y around inf 81.4%
*-commutative81.4%
associate-/r*83.7%
Simplified83.7%
Taylor expanded in t around inf 58.1%
Final simplification50.7%
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 8.2e-79) (/ x (* y (- t z))) (/ x (* (- y z) t))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 8.2e-79) {
tmp = x / (y * (t - z));
} else {
tmp = x / ((y - z) * t);
}
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 <= 8.2d-79) then
tmp = x / (y * (t - z))
else
tmp = x / ((y - z) * t)
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 <= 8.2e-79) {
tmp = x / (y * (t - z));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= 8.2e-79: tmp = x / (y * (t - z)) else: tmp = x / ((y - z) * t) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= 8.2e-79) tmp = Float64(x / Float64(y * Float64(t - z))); else tmp = Float64(x / Float64(Float64(y - z) * t)); 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 <= 8.2e-79)
tmp = x / (y * (t - z));
else
tmp = x / ((y - z) * t);
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, 8.2e-79], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 8.2 \cdot 10^{-79}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < 8.19999999999999987e-79Initial program 92.3%
Taylor expanded in y around inf 61.2%
*-commutative61.2%
Simplified61.2%
if 8.19999999999999987e-79 < t Initial program 83.1%
Taylor expanded in t around inf 75.7%
Final simplification65.7%
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.85e-79) (/ 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 <= 1.85e-79) {
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 <= 1.85d-79) 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 <= 1.85e-79) {
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 <= 1.85e-79: 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 <= 1.85e-79) tmp = Float64(x / Float64(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 <= 1.85e-79)
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, 1.85e-79], N[(x / N[(y * N[(t - z), $MachinePrecision]), $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.85 \cdot 10^{-79}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < 1.85000000000000009e-79Initial program 92.3%
Taylor expanded in y around inf 61.2%
*-commutative61.2%
Simplified61.2%
if 1.85000000000000009e-79 < t Initial program 83.1%
add-sqr-sqrt40.2%
times-frac47.5%
Applied egg-rr47.5%
frac-times40.2%
add-sqr-sqrt83.1%
*-commutative83.1%
associate-/r*94.0%
Applied egg-rr94.0%
Taylor expanded in t around inf 75.7%
associate-/r*78.3%
Simplified78.3%
Final simplification66.4%
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 7.5e-79) (/ (/ 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 <= 7.5e-79) {
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 <= 7.5d-79) 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 <= 7.5e-79) {
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 <= 7.5e-79: 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 <= 7.5e-79) tmp = Float64(Float64(x / 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 <= 7.5e-79)
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, 7.5e-79], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $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 7.5 \cdot 10^{-79}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < 7.49999999999999969e-79Initial program 92.3%
Taylor expanded in y around inf 61.2%
*-commutative61.2%
associate-/r*64.1%
Simplified64.1%
if 7.49999999999999969e-79 < t Initial program 83.1%
add-sqr-sqrt40.2%
times-frac47.5%
Applied egg-rr47.5%
frac-times40.2%
add-sqr-sqrt83.1%
*-commutative83.1%
associate-/r*94.0%
Applied egg-rr94.0%
Taylor expanded in t around inf 75.7%
associate-/r*78.3%
Simplified78.3%
Final simplification68.4%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (/ x (* y t)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return x / (y * t);
}
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 / (y * t)
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return x / (y * t);
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return x / (y * t)
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(x / Float64(y * t)) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = x / (y * t);
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[(y * t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{x}{y \cdot t}
\end{array}
Initial program 89.5%
Taylor expanded in z around 0 38.1%
Final simplification38.1%
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(Float64(x / 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[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{\frac{x}{t}}{y}
\end{array}
Initial program 89.5%
Taylor expanded in y around inf 59.1%
*-commutative59.1%
associate-/r*63.7%
Simplified63.7%
Taylor expanded in t around inf 40.2%
Final simplification40.2%
(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 2023319
(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))))