
(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 17 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 88.5%
associate-/l/96.9%
Simplified96.9%
Final simplification96.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 z))))
(if (<= y -3.45e+21)
(/ t_1 y)
(if (<= y -3.3e-35)
(/ (/ x z) (- z y))
(if (<= y -2.5e-59)
(/ x (* (- t z) y))
(if (<= y 7.2e-106) (* t_1 (/ -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 t_1 = x / (t - z);
double tmp;
if (y <= -3.45e+21) {
tmp = t_1 / y;
} else if (y <= -3.3e-35) {
tmp = (x / z) / (z - y);
} else if (y <= -2.5e-59) {
tmp = x / ((t - z) * y);
} else if (y <= 7.2e-106) {
tmp = t_1 * (-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) :: t_1
real(8) :: tmp
t_1 = x / (t - z)
if (y <= (-3.45d+21)) then
tmp = t_1 / y
else if (y <= (-3.3d-35)) then
tmp = (x / z) / (z - y)
else if (y <= (-2.5d-59)) then
tmp = x / ((t - z) * y)
else if (y <= 7.2d-106) then
tmp = t_1 * ((-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 t_1 = x / (t - z);
double tmp;
if (y <= -3.45e+21) {
tmp = t_1 / y;
} else if (y <= -3.3e-35) {
tmp = (x / z) / (z - y);
} else if (y <= -2.5e-59) {
tmp = x / ((t - z) * y);
} else if (y <= 7.2e-106) {
tmp = t_1 * (-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): t_1 = x / (t - z) tmp = 0 if y <= -3.45e+21: tmp = t_1 / y elif y <= -3.3e-35: tmp = (x / z) / (z - y) elif y <= -2.5e-59: tmp = x / ((t - z) * y) elif y <= 7.2e-106: tmp = t_1 * (-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) t_1 = Float64(x / Float64(t - z)) tmp = 0.0 if (y <= -3.45e+21) tmp = Float64(t_1 / y); elseif (y <= -3.3e-35) tmp = Float64(Float64(x / z) / Float64(z - y)); elseif (y <= -2.5e-59) tmp = Float64(x / Float64(Float64(t - z) * y)); elseif (y <= 7.2e-106) tmp = Float64(t_1 * 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)
t_1 = x / (t - z);
tmp = 0.0;
if (y <= -3.45e+21)
tmp = t_1 / y;
elseif (y <= -3.3e-35)
tmp = (x / z) / (z - y);
elseif (y <= -2.5e-59)
tmp = x / ((t - z) * y);
elseif (y <= 7.2e-106)
tmp = t_1 * (-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_] := Block[{t$95$1 = N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.45e+21], N[(t$95$1 / y), $MachinePrecision], If[LessEqual[y, -3.3e-35], N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.5e-59], N[(x / N[(N[(t - z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.2e-106], N[(t$95$1 * 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}
t_1 := \frac{x}{t - z}\\
\mathbf{if}\;y \leq -3.45 \cdot 10^{+21}:\\
\;\;\;\;\frac{t\_1}{y}\\
\mathbf{elif}\;y \leq -3.3 \cdot 10^{-35}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - y}\\
\mathbf{elif}\;y \leq -2.5 \cdot 10^{-59}:\\
\;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{-106}:\\
\;\;\;\;t\_1 \cdot \frac{-1}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -3.45e21Initial program 90.8%
associate-/l/99.9%
div-inv99.8%
Applied egg-rr99.8%
un-div-inv99.9%
clear-num99.2%
Applied egg-rr99.2%
Taylor expanded in y around inf 87.0%
associate-/r*90.5%
Simplified90.5%
div-inv90.4%
associate-/l*86.9%
Applied egg-rr86.9%
*-commutative86.9%
associate-*l/90.4%
associate-*r/94.2%
associate-*l/94.4%
*-lft-identity94.4%
Simplified94.4%
if -3.45e21 < y < -3.3e-35Initial program 92.0%
associate-/l/99.6%
Simplified99.6%
Taylor expanded in t around 0 84.0%
associate-*r/84.0%
neg-mul-184.0%
Simplified84.0%
if -3.3e-35 < y < -2.5000000000000001e-59Initial program 99.7%
Taylor expanded in y around inf 99.7%
*-commutative99.7%
Simplified99.7%
if -2.5000000000000001e-59 < y < 7.20000000000000025e-106Initial program 90.3%
associate-/l/95.9%
div-inv95.9%
Applied egg-rr95.9%
Taylor expanded in y around 0 81.9%
if 7.20000000000000025e-106 < y Initial program 84.2%
associate-/l/95.7%
Simplified95.7%
Taylor expanded in t around inf 59.6%
Final simplification77.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 (- t z)) y)))
(if (<= z -2.3e+15)
(/ (/ x z) (- z y))
(if (<= z -2e-302)
t_1
(if (<= z 2.9e-170)
(/ (/ x t) (- y z))
(if (<= z 5e-29) t_1 (/ (/ x z) (- z t))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / (t - z)) / y;
double tmp;
if (z <= -2.3e+15) {
tmp = (x / z) / (z - y);
} else if (z <= -2e-302) {
tmp = t_1;
} else if (z <= 2.9e-170) {
tmp = (x / t) / (y - z);
} else if (z <= 5e-29) {
tmp = t_1;
} else {
tmp = (x / z) / (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) :: t_1
real(8) :: tmp
t_1 = (x / (t - z)) / y
if (z <= (-2.3d+15)) then
tmp = (x / z) / (z - y)
else if (z <= (-2d-302)) then
tmp = t_1
else if (z <= 2.9d-170) then
tmp = (x / t) / (y - z)
else if (z <= 5d-29) then
tmp = t_1
else
tmp = (x / z) / (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 t_1 = (x / (t - z)) / y;
double tmp;
if (z <= -2.3e+15) {
tmp = (x / z) / (z - y);
} else if (z <= -2e-302) {
tmp = t_1;
} else if (z <= 2.9e-170) {
tmp = (x / t) / (y - z);
} else if (z <= 5e-29) {
tmp = t_1;
} else {
tmp = (x / z) / (z - t);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = (x / (t - z)) / y tmp = 0 if z <= -2.3e+15: tmp = (x / z) / (z - y) elif z <= -2e-302: tmp = t_1 elif z <= 2.9e-170: tmp = (x / t) / (y - z) elif z <= 5e-29: tmp = t_1 else: tmp = (x / z) / (z - t) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / Float64(t - z)) / y) tmp = 0.0 if (z <= -2.3e+15) tmp = Float64(Float64(x / z) / Float64(z - y)); elseif (z <= -2e-302) tmp = t_1; elseif (z <= 2.9e-170) tmp = Float64(Float64(x / t) / Float64(y - z)); elseif (z <= 5e-29) tmp = t_1; else tmp = Float64(Float64(x / z) / Float64(z - 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 - z)) / y;
tmp = 0.0;
if (z <= -2.3e+15)
tmp = (x / z) / (z - y);
elseif (z <= -2e-302)
tmp = t_1;
elseif (z <= 2.9e-170)
tmp = (x / t) / (y - z);
elseif (z <= 5e-29)
tmp = t_1;
else
tmp = (x / z) / (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_] := Block[{t$95$1 = N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[z, -2.3e+15], N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2e-302], t$95$1, If[LessEqual[z, 2.9e-170], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e-29], t$95$1, N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{t - z}}{y}\\
\mathbf{if}\;z \leq -2.3 \cdot 10^{+15}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - y}\\
\mathbf{elif}\;z \leq -2 \cdot 10^{-302}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-170}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-29}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\
\end{array}
\end{array}
if z < -2.3e15Initial program 87.6%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in t around 0 87.6%
associate-*r/87.6%
neg-mul-187.6%
Simplified87.6%
if -2.3e15 < z < -1.9999999999999999e-302 or 2.9e-170 < z < 4.99999999999999986e-29Initial program 93.5%
associate-/l/92.5%
div-inv92.4%
Applied egg-rr92.4%
un-div-inv92.5%
clear-num91.6%
Applied egg-rr91.6%
Taylor expanded in y around inf 65.7%
associate-/r*69.0%
Simplified69.0%
div-inv69.1%
associate-/l*65.6%
Applied egg-rr65.6%
*-commutative65.6%
associate-*l/69.1%
associate-*r/74.0%
associate-*l/74.0%
*-lft-identity74.0%
Simplified74.0%
if -1.9999999999999999e-302 < z < 2.9e-170Initial program 93.4%
associate-/l/96.7%
Simplified96.7%
Taylor expanded in t around inf 93.5%
if 4.99999999999999986e-29 < z Initial program 81.7%
associate-/l/99.9%
div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 70.2%
mul-1-neg70.2%
associate-/r*84.5%
distribute-neg-frac284.5%
Simplified84.5%
Taylor expanded in x around 0 70.2%
associate-/r*84.5%
Simplified84.5%
Final simplification82.6%
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.6e-108)
(/ (/ x y) t)
(if (<= t 9.5e-180)
(/ x (* y (- z)))
(if (or (<= t 2.5e+74) (not (<= t 3.5e+134)))
(/ (/ x t) y)
(/ x (* t (- z)))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -3.6e-108) {
tmp = (x / y) / t;
} else if (t <= 9.5e-180) {
tmp = x / (y * -z);
} else if ((t <= 2.5e+74) || !(t <= 3.5e+134)) {
tmp = (x / t) / y;
} else {
tmp = x / (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 <= (-3.6d-108)) then
tmp = (x / y) / t
else if (t <= 9.5d-180) then
tmp = x / (y * -z)
else if ((t <= 2.5d+74) .or. (.not. (t <= 3.5d+134))) then
tmp = (x / t) / y
else
tmp = x / (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 <= -3.6e-108) {
tmp = (x / y) / t;
} else if (t <= 9.5e-180) {
tmp = x / (y * -z);
} else if ((t <= 2.5e+74) || !(t <= 3.5e+134)) {
tmp = (x / t) / y;
} else {
tmp = x / (t * -z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -3.6e-108: tmp = (x / y) / t elif t <= 9.5e-180: tmp = x / (y * -z) elif (t <= 2.5e+74) or not (t <= 3.5e+134): tmp = (x / t) / y else: tmp = x / (t * -z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -3.6e-108) tmp = Float64(Float64(x / y) / t); elseif (t <= 9.5e-180) tmp = Float64(x / Float64(y * Float64(-z))); elseif ((t <= 2.5e+74) || !(t <= 3.5e+134)) tmp = Float64(Float64(x / t) / y); else tmp = Float64(x / Float64(t * Float64(-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.6e-108)
tmp = (x / y) / t;
elseif (t <= 9.5e-180)
tmp = x / (y * -z);
elseif ((t <= 2.5e+74) || ~((t <= 3.5e+134)))
tmp = (x / t) / y;
else
tmp = x / (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, -3.6e-108], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 9.5e-180], N[(x / N[(y * (-z)), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 2.5e+74], N[Not[LessEqual[t, 3.5e+134]], $MachinePrecision]], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(t * (-z)), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.6 \cdot 10^{-108}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{-180}:\\
\;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{+74} \lor \neg \left(t \leq 3.5 \cdot 10^{+134}\right):\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t \cdot \left(-z\right)}\\
\end{array}
\end{array}
if t < -3.6000000000000001e-108Initial program 86.4%
associate-/l/94.7%
div-inv94.7%
Applied egg-rr94.7%
associate-*l/99.7%
div-inv99.7%
div-inv99.7%
clear-num99.6%
associate-*l/99.7%
*-un-lft-identity99.7%
Applied egg-rr99.7%
Taylor expanded in z around 0 48.3%
associate-/l/56.8%
Simplified56.8%
if -3.6000000000000001e-108 < t < 9.49999999999999934e-180Initial program 88.5%
associate-/l/98.7%
div-inv98.7%
Applied egg-rr98.7%
un-div-inv98.7%
clear-num97.2%
Applied egg-rr97.2%
Taylor expanded in y around inf 52.0%
associate-/r*49.9%
Simplified49.9%
Taylor expanded in t around 0 47.3%
associate-*r/47.3%
neg-mul-147.3%
*-commutative47.3%
Simplified47.3%
if 9.49999999999999934e-180 < t < 2.49999999999999982e74 or 3.50000000000000003e134 < t Initial program 93.1%
Taylor expanded in z around 0 52.5%
frac-2neg52.5%
add-cube-cbrt52.2%
associate-/l*52.2%
cbrt-unprod47.4%
sqr-neg47.4%
cbrt-unprod52.2%
pow252.2%
add-sqr-sqrt25.4%
sqrt-unprod36.7%
sqr-neg36.7%
sqrt-unprod13.5%
add-sqr-sqrt26.0%
distribute-rgt-neg-in26.0%
Applied egg-rr26.0%
associate-*r/26.0%
unpow226.0%
rem-3cbrt-lft26.0%
Simplified26.0%
clear-num27.1%
associate-/r/26.0%
associate-/r*26.0%
add-sqr-sqrt12.5%
sqrt-unprod34.6%
sqr-neg34.6%
sqrt-unprod29.0%
add-sqr-sqrt52.4%
Applied egg-rr52.4%
associate-*l/58.6%
associate-*l/58.6%
*-un-lft-identity58.6%
Applied egg-rr58.6%
if 2.49999999999999982e74 < t < 3.50000000000000003e134Initial program 79.5%
Taylor expanded in y around 0 65.4%
associate-*r/65.4%
neg-mul-165.4%
Simplified65.4%
Taylor expanded in z around 0 50.8%
associate-*r/50.8%
mul-1-neg50.8%
Simplified50.8%
Final simplification54.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 (<= z -6.5e+109) (/ (/ x z) (- z y)) (if (<= z 8e+138) (/ x (* (- t z) (- y z))) (/ (/ x z) (- z t)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.5e+109) {
tmp = (x / z) / (z - y);
} else if (z <= 8e+138) {
tmp = x / ((t - z) * (y - z));
} else {
tmp = (x / z) / (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 (z <= (-6.5d+109)) then
tmp = (x / z) / (z - y)
else if (z <= 8d+138) then
tmp = x / ((t - z) * (y - z))
else
tmp = (x / z) / (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 (z <= -6.5e+109) {
tmp = (x / z) / (z - y);
} else if (z <= 8e+138) {
tmp = x / ((t - z) * (y - z));
} else {
tmp = (x / z) / (z - t);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= -6.5e+109: tmp = (x / z) / (z - y) elif z <= 8e+138: tmp = x / ((t - z) * (y - z)) else: tmp = (x / z) / (z - t) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -6.5e+109) tmp = Float64(Float64(x / z) / Float64(z - y)); elseif (z <= 8e+138) tmp = Float64(x / Float64(Float64(t - z) * Float64(y - z))); else tmp = Float64(Float64(x / z) / Float64(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 (z <= -6.5e+109)
tmp = (x / z) / (z - y);
elseif (z <= 8e+138)
tmp = x / ((t - z) * (y - z));
else
tmp = (x / z) / (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[z, -6.5e+109], N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e+138], N[(x / N[(N[(t - z), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+109}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - y}\\
\mathbf{elif}\;z \leq 8 \cdot 10^{+138}:\\
\;\;\;\;\frac{x}{\left(t - z\right) \cdot \left(y - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\
\end{array}
\end{array}
if z < -6.5e109Initial program 86.5%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in t around 0 95.5%
associate-*r/95.5%
neg-mul-195.5%
Simplified95.5%
if -6.5e109 < z < 8.0000000000000003e138Initial program 92.6%
if 8.0000000000000003e138 < z Initial program 73.6%
associate-/l/99.9%
div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 73.6%
mul-1-neg73.6%
associate-/r*99.9%
distribute-neg-frac299.9%
Simplified99.9%
Taylor expanded in x around 0 73.6%
associate-/r*99.9%
Simplified99.9%
Final simplification94.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 (<= z -8e+104)
(/ (/ x z) (- z y))
(if (<= z 2.3e+151)
(/ x (* (- t z) (- y z)))
(/ (/ -1.0 z) (/ (- t z) x)))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -8e+104) {
tmp = (x / z) / (z - y);
} else if (z <= 2.3e+151) {
tmp = x / ((t - z) * (y - z));
} else {
tmp = (-1.0 / z) / ((t - z) / x);
}
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 <= (-8d+104)) then
tmp = (x / z) / (z - y)
else if (z <= 2.3d+151) then
tmp = x / ((t - z) * (y - z))
else
tmp = ((-1.0d0) / z) / ((t - z) / x)
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 <= -8e+104) {
tmp = (x / z) / (z - y);
} else if (z <= 2.3e+151) {
tmp = x / ((t - z) * (y - z));
} else {
tmp = (-1.0 / z) / ((t - z) / x);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= -8e+104: tmp = (x / z) / (z - y) elif z <= 2.3e+151: tmp = x / ((t - z) * (y - z)) else: tmp = (-1.0 / z) / ((t - z) / x) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -8e+104) tmp = Float64(Float64(x / z) / Float64(z - y)); elseif (z <= 2.3e+151) tmp = Float64(x / Float64(Float64(t - z) * Float64(y - z))); else tmp = Float64(Float64(-1.0 / z) / Float64(Float64(t - z) / x)); 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 <= -8e+104)
tmp = (x / z) / (z - y);
elseif (z <= 2.3e+151)
tmp = x / ((t - z) * (y - z));
else
tmp = (-1.0 / z) / ((t - 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_] := If[LessEqual[z, -8e+104], N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.3e+151], N[(x / N[(N[(t - z), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / z), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+104}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - y}\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{+151}:\\
\;\;\;\;\frac{x}{\left(t - z\right) \cdot \left(y - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{-1}{z}}{\frac{t - z}{x}}\\
\end{array}
\end{array}
if z < -8e104Initial program 86.5%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in t around 0 95.5%
associate-*r/95.5%
neg-mul-195.5%
Simplified95.5%
if -8e104 < z < 2.3000000000000001e151Initial program 92.8%
if 2.3000000000000001e151 < z Initial program 70.8%
associate-/l/99.8%
div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Final simplification94.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 -1.5e+14) (not (<= z 1.5e-33))) (/ x (* z (- z t))) (/ x (* t (- y z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.5e+14) || !(z <= 1.5e-33)) {
tmp = x / (z * (z - t));
} 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 ((z <= (-1.5d+14)) .or. (.not. (z <= 1.5d-33))) then
tmp = x / (z * (z - t))
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 ((z <= -1.5e+14) || !(z <= 1.5e-33)) {
tmp = x / (z * (z - t));
} 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 (z <= -1.5e+14) or not (z <= 1.5e-33): tmp = x / (z * (z - t)) 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 ((z <= -1.5e+14) || !(z <= 1.5e-33)) tmp = Float64(x / Float64(z * Float64(z - t))); 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 ((z <= -1.5e+14) || ~((z <= 1.5e-33)))
tmp = x / (z * (z - t));
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[Or[LessEqual[z, -1.5e+14], N[Not[LessEqual[z, 1.5e-33]], $MachinePrecision]], N[(x / N[(z * N[(z - t), $MachinePrecision]), $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}\;z \leq -1.5 \cdot 10^{+14} \lor \neg \left(z \leq 1.5 \cdot 10^{-33}\right):\\
\;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\
\end{array}
\end{array}
if z < -1.5e14 or 1.5000000000000001e-33 < z Initial program 84.1%
associate-/l/99.9%
div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 76.5%
mul-1-neg76.5%
associate-/r*87.9%
distribute-neg-frac287.9%
Simplified87.9%
Taylor expanded in x around 0 76.5%
if -1.5e14 < z < 1.5000000000000001e-33Initial program 93.5%
Taylor expanded in t around inf 77.9%
Final simplification77.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 -3.6e-108) (/ (/ x y) t) (if (<= t 1.02e-179) (/ x (* y (- 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 <= -3.6e-108) {
tmp = (x / y) / t;
} else if (t <= 1.02e-179) {
tmp = x / (y * -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 <= (-3.6d-108)) then
tmp = (x / y) / t
else if (t <= 1.02d-179) then
tmp = x / (y * -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 <= -3.6e-108) {
tmp = (x / y) / t;
} else if (t <= 1.02e-179) {
tmp = x / (y * -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 <= -3.6e-108: tmp = (x / y) / t elif t <= 1.02e-179: tmp = x / (y * -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 <= -3.6e-108) tmp = Float64(Float64(x / y) / t); elseif (t <= 1.02e-179) tmp = Float64(x / Float64(y * Float64(-z))); 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.6e-108)
tmp = (x / y) / t;
elseif (t <= 1.02e-179)
tmp = x / (y * -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, -3.6e-108], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 1.02e-179], N[(x / N[(y * (-z)), $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.6 \cdot 10^{-108}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{-179}:\\
\;\;\;\;\frac{x}{y \cdot \left(-z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\
\end{array}
\end{array}
if t < -3.6000000000000001e-108Initial program 86.4%
associate-/l/94.7%
div-inv94.7%
Applied egg-rr94.7%
associate-*l/99.7%
div-inv99.7%
div-inv99.7%
clear-num99.6%
associate-*l/99.7%
*-un-lft-identity99.7%
Applied egg-rr99.7%
Taylor expanded in z around 0 48.3%
associate-/l/56.8%
Simplified56.8%
if -3.6000000000000001e-108 < t < 1.02e-179Initial program 88.5%
associate-/l/98.7%
div-inv98.7%
Applied egg-rr98.7%
un-div-inv98.7%
clear-num97.2%
Applied egg-rr97.2%
Taylor expanded in y around inf 52.0%
associate-/r*49.9%
Simplified49.9%
Taylor expanded in t around 0 47.3%
associate-*r/47.3%
neg-mul-147.3%
*-commutative47.3%
Simplified47.3%
if 1.02e-179 < t Initial program 91.0%
Taylor expanded in t around inf 71.5%
Final simplification58.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 (<= y -0.00043) (/ x (* (- t z) y)) (if (<= y 8e-178) (/ x (* z (- z t))) (/ x (* t (- y z))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -0.00043) {
tmp = x / ((t - z) * y);
} else if (y <= 8e-178) {
tmp = x / (z * (z - t));
} 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 (y <= (-0.00043d0)) then
tmp = x / ((t - z) * y)
else if (y <= 8d-178) then
tmp = x / (z * (z - t))
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 (y <= -0.00043) {
tmp = x / ((t - z) * y);
} else if (y <= 8e-178) {
tmp = x / (z * (z - t));
} 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 y <= -0.00043: tmp = x / ((t - z) * y) elif y <= 8e-178: tmp = x / (z * (z - t)) 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 (y <= -0.00043) tmp = Float64(x / Float64(Float64(t - z) * y)); elseif (y <= 8e-178) tmp = Float64(x / Float64(z * Float64(z - t))); 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 (y <= -0.00043)
tmp = x / ((t - z) * y);
elseif (y <= 8e-178)
tmp = x / (z * (z - t));
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[y, -0.00043], N[(x / N[(N[(t - z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8e-178], N[(x / N[(z * N[(z - t), $MachinePrecision]), $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}\;y \leq -0.00043:\\
\;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\
\mathbf{elif}\;y \leq 8 \cdot 10^{-178}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\
\end{array}
\end{array}
if y < -4.29999999999999989e-4Initial program 90.3%
Taylor expanded in y around inf 82.0%
*-commutative82.0%
Simplified82.0%
if -4.29999999999999989e-4 < y < 7.9999999999999996e-178Initial program 91.5%
associate-/l/96.5%
div-inv96.5%
Applied egg-rr96.5%
Taylor expanded in y around 0 78.7%
mul-1-neg78.7%
associate-/r*83.9%
distribute-neg-frac283.9%
Simplified83.9%
Taylor expanded in x around 0 78.7%
if 7.9999999999999996e-178 < y Initial program 85.0%
Taylor expanded in t around inf 55.3%
Final simplification69.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 -0.00075) (/ x (* (- t z) y)) (if (<= y 3.4e-112) (/ x (* z (- z t))) (/ (/ x t) (- y z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -0.00075) {
tmp = x / ((t - z) * y);
} else if (y <= 3.4e-112) {
tmp = x / (z * (z - t));
} 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 (y <= (-0.00075d0)) then
tmp = x / ((t - z) * y)
else if (y <= 3.4d-112) then
tmp = x / (z * (z - t))
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 (y <= -0.00075) {
tmp = x / ((t - z) * y);
} else if (y <= 3.4e-112) {
tmp = x / (z * (z - t));
} 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 y <= -0.00075: tmp = x / ((t - z) * y) elif y <= 3.4e-112: tmp = x / (z * (z - t)) 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 (y <= -0.00075) tmp = Float64(x / Float64(Float64(t - z) * y)); elseif (y <= 3.4e-112) tmp = Float64(x / Float64(z * Float64(z - t))); 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 (y <= -0.00075)
tmp = x / ((t - z) * y);
elseif (y <= 3.4e-112)
tmp = x / (z * (z - t));
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[y, -0.00075], N[(x / N[(N[(t - z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.4e-112], N[(x / N[(z * N[(z - t), $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}\;y \leq -0.00075:\\
\;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{-112}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -7.5000000000000002e-4Initial program 90.3%
Taylor expanded in y around inf 82.0%
*-commutative82.0%
Simplified82.0%
if -7.5000000000000002e-4 < y < 3.3999999999999998e-112Initial program 91.7%
associate-/l/96.1%
div-inv96.1%
Applied egg-rr96.1%
Taylor expanded in y around 0 76.7%
mul-1-neg76.7%
associate-/r*82.1%
distribute-neg-frac282.1%
Simplified82.1%
Taylor expanded in x around 0 76.7%
if 3.3999999999999998e-112 < y Initial program 83.8%
associate-/l/95.9%
Simplified95.9%
Taylor expanded in t around inf 59.2%
Final simplification71.6%
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 -0.00046) (/ (/ x y) (- t z)) (if (<= y 7e-106) (/ x (* z (- z t))) (/ (/ x t) (- y z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -0.00046) {
tmp = (x / y) / (t - z);
} else if (y <= 7e-106) {
tmp = x / (z * (z - t));
} 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 (y <= (-0.00046d0)) then
tmp = (x / y) / (t - z)
else if (y <= 7d-106) then
tmp = x / (z * (z - t))
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 (y <= -0.00046) {
tmp = (x / y) / (t - z);
} else if (y <= 7e-106) {
tmp = x / (z * (z - t));
} 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 y <= -0.00046: tmp = (x / y) / (t - z) elif y <= 7e-106: tmp = x / (z * (z - t)) 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 (y <= -0.00046) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (y <= 7e-106) tmp = Float64(x / Float64(z * Float64(z - t))); 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 (y <= -0.00046)
tmp = (x / y) / (t - z);
elseif (y <= 7e-106)
tmp = x / (z * (z - t));
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[y, -0.00046], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e-106], N[(x / N[(z * N[(z - t), $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}\;y \leq -0.00046:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;y \leq 7 \cdot 10^{-106}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -4.6000000000000001e-4Initial program 90.3%
associate-/l/99.9%
div-inv99.8%
Applied egg-rr99.8%
un-div-inv99.9%
clear-num99.3%
Applied egg-rr99.3%
Taylor expanded in y around inf 82.0%
associate-/r*85.1%
Simplified85.1%
if -4.6000000000000001e-4 < y < 7e-106Initial program 91.1%
associate-/l/96.2%
div-inv96.2%
Applied egg-rr96.2%
Taylor expanded in y around 0 74.9%
mul-1-neg74.9%
associate-/r*80.1%
distribute-neg-frac280.1%
Simplified80.1%
Taylor expanded in x around 0 74.9%
if 7e-106 < y Initial program 84.2%
associate-/l/95.7%
Simplified95.7%
Taylor expanded in t around inf 59.6%
Final simplification71.9%
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 -170000000000.0) (/ (/ x y) (- t z)) (if (<= y 2.75e-107) (/ (/ x z) (- z t)) (/ (/ x t) (- y z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -170000000000.0) {
tmp = (x / y) / (t - z);
} else if (y <= 2.75e-107) {
tmp = (x / z) / (z - t);
} 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 (y <= (-170000000000.0d0)) then
tmp = (x / y) / (t - z)
else if (y <= 2.75d-107) then
tmp = (x / z) / (z - t)
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 (y <= -170000000000.0) {
tmp = (x / y) / (t - z);
} else if (y <= 2.75e-107) {
tmp = (x / z) / (z - t);
} 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 y <= -170000000000.0: tmp = (x / y) / (t - z) elif y <= 2.75e-107: tmp = (x / z) / (z - t) 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 (y <= -170000000000.0) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (y <= 2.75e-107) tmp = Float64(Float64(x / z) / Float64(z - t)); 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 (y <= -170000000000.0)
tmp = (x / y) / (t - z);
elseif (y <= 2.75e-107)
tmp = (x / z) / (z - t);
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[y, -170000000000.0], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.75e-107], N[(N[(x / z), $MachinePrecision] / N[(z - t), $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}\;y \leq -170000000000:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;y \leq 2.75 \cdot 10^{-107}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -1.7e11Initial program 91.3%
associate-/l/99.9%
div-inv99.8%
Applied egg-rr99.8%
un-div-inv99.9%
clear-num99.3%
Applied egg-rr99.3%
Taylor expanded in y around inf 86.0%
associate-/r*89.3%
Simplified89.3%
if -1.7e11 < y < 2.74999999999999993e-107Initial program 90.5%
associate-/l/96.3%
div-inv96.3%
Applied egg-rr96.3%
Taylor expanded in y around 0 74.7%
mul-1-neg74.7%
associate-/r*80.6%
distribute-neg-frac280.6%
Simplified80.6%
Taylor expanded in x around 0 74.7%
associate-/r*80.6%
Simplified80.6%
if 2.74999999999999993e-107 < y Initial program 84.3%
associate-/l/95.8%
Simplified95.8%
Taylor expanded in t around inf 60.1%
Final simplification75.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 (<= y -118000000000.0) (/ (/ x (- t z)) y) (if (<= y 4.7e-110) (/ (/ x z) (- z t)) (/ (/ x t) (- y z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -118000000000.0) {
tmp = (x / (t - z)) / y;
} else if (y <= 4.7e-110) {
tmp = (x / z) / (z - t);
} 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 (y <= (-118000000000.0d0)) then
tmp = (x / (t - z)) / y
else if (y <= 4.7d-110) then
tmp = (x / z) / (z - t)
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 (y <= -118000000000.0) {
tmp = (x / (t - z)) / y;
} else if (y <= 4.7e-110) {
tmp = (x / z) / (z - t);
} 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 y <= -118000000000.0: tmp = (x / (t - z)) / y elif y <= 4.7e-110: tmp = (x / z) / (z - t) 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 (y <= -118000000000.0) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (y <= 4.7e-110) tmp = Float64(Float64(x / z) / Float64(z - t)); 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 (y <= -118000000000.0)
tmp = (x / (t - z)) / y;
elseif (y <= 4.7e-110)
tmp = (x / z) / (z - t);
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[y, -118000000000.0], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 4.7e-110], N[(N[(x / z), $MachinePrecision] / N[(z - t), $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}\;y \leq -118000000000:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;y \leq 4.7 \cdot 10^{-110}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -1.18e11Initial program 91.3%
associate-/l/99.9%
div-inv99.8%
Applied egg-rr99.8%
un-div-inv99.9%
clear-num99.3%
Applied egg-rr99.3%
Taylor expanded in y around inf 86.0%
associate-/r*89.3%
Simplified89.3%
div-inv89.2%
associate-/l*85.9%
Applied egg-rr85.9%
*-commutative85.9%
associate-*l/89.2%
associate-*r/92.8%
associate-*l/93.0%
*-lft-identity93.0%
Simplified93.0%
if -1.18e11 < y < 4.69999999999999992e-110Initial program 90.3%
associate-/l/96.3%
div-inv96.3%
Applied egg-rr96.3%
Taylor expanded in y around 0 75.2%
mul-1-neg75.2%
associate-/r*81.2%
distribute-neg-frac281.2%
Simplified81.2%
Taylor expanded in x around 0 75.2%
associate-/r*81.2%
Simplified81.2%
if 4.69999999999999992e-110 < y Initial program 84.7%
associate-/l/95.8%
Simplified95.8%
Taylor expanded in t around inf 59.9%
Final simplification76.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-87) (/ (/ x y) t) (if (<= y 4e-165) (/ 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 (y <= -2.25e-87) {
tmp = (x / y) / t;
} else if (y <= 4e-165) {
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 (y <= (-2.25d-87)) then
tmp = (x / y) / t
else if (y <= 4d-165) 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 (y <= -2.25e-87) {
tmp = (x / y) / t;
} else if (y <= 4e-165) {
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 y <= -2.25e-87: tmp = (x / y) / t elif y <= 4e-165: 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 (y <= -2.25e-87) tmp = Float64(Float64(x / y) / t); elseif (y <= 4e-165) tmp = Float64(x / Float64(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 (y <= -2.25e-87)
tmp = (x / y) / t;
elseif (y <= 4e-165)
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[y, -2.25e-87], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[y, 4e-165], 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}\;y \leq -2.25 \cdot 10^{-87}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;y \leq 4 \cdot 10^{-165}:\\
\;\;\;\;\frac{x}{t \cdot \left(-z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if y < -2.24999999999999979e-87Initial program 92.3%
associate-/l/99.4%
div-inv99.3%
Applied egg-rr99.3%
associate-*l/97.1%
div-inv97.1%
div-inv97.2%
clear-num97.1%
associate-*l/97.2%
*-un-lft-identity97.2%
Applied egg-rr97.2%
Taylor expanded in z around 0 50.9%
associate-/l/55.7%
Simplified55.7%
if -2.24999999999999979e-87 < y < 4e-165Initial program 89.3%
Taylor expanded in y around 0 77.8%
associate-*r/77.8%
neg-mul-177.8%
Simplified77.8%
Taylor expanded in z around 0 55.6%
associate-*r/55.6%
mul-1-neg55.6%
Simplified55.6%
if 4e-165 < y Initial program 85.1%
Taylor expanded in z around 0 43.6%
frac-2neg43.6%
add-cube-cbrt43.5%
associate-/l*43.5%
cbrt-unprod46.6%
sqr-neg46.6%
cbrt-unprod43.5%
pow243.5%
add-sqr-sqrt22.1%
sqrt-unprod40.6%
sqr-neg40.6%
sqrt-unprod13.6%
add-sqr-sqrt26.6%
distribute-rgt-neg-in26.6%
Applied egg-rr26.6%
associate-*r/26.6%
unpow226.6%
rem-3cbrt-lft26.6%
Simplified26.6%
clear-num27.3%
associate-/r/26.6%
associate-/r*26.6%
add-sqr-sqrt0.0%
sqrt-unprod44.0%
sqr-neg44.0%
sqrt-unprod44.4%
add-sqr-sqrt44.5%
Applied egg-rr44.5%
associate-*l/48.1%
associate-*l/48.1%
*-un-lft-identity48.1%
Applied egg-rr48.1%
Final simplification52.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 4e-96) (/ (/ x y) t) (/ (/ x t) y)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 4e-96) {
tmp = (x / y) / 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 (t <= 4d-96) then
tmp = (x / y) / 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 (t <= 4e-96) {
tmp = (x / y) / 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 t <= 4e-96: tmp = (x / y) / 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 (t <= 4e-96) tmp = Float64(Float64(x / y) / 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 (t <= 4e-96)
tmp = (x / y) / 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[t, 4e-96], N[(N[(x / y), $MachinePrecision] / t), $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 4 \cdot 10^{-96}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if t < 3.9999999999999996e-96Initial program 87.9%
associate-/l/96.6%
div-inv96.5%
Applied egg-rr96.5%
associate-*l/97.9%
div-inv97.9%
div-inv97.9%
clear-num97.8%
associate-*l/97.8%
*-un-lft-identity97.8%
Applied egg-rr97.8%
Taylor expanded in z around 0 35.4%
associate-/l/43.3%
Simplified43.3%
if 3.9999999999999996e-96 < t Initial program 90.1%
Taylor expanded in z around 0 45.9%
frac-2neg45.9%
add-cube-cbrt45.7%
associate-/l*45.7%
cbrt-unprod41.8%
sqr-neg41.8%
cbrt-unprod45.7%
pow245.7%
add-sqr-sqrt19.2%
sqrt-unprod31.8%
sqr-neg31.8%
sqrt-unprod14.1%
add-sqr-sqrt25.8%
distribute-rgt-neg-in25.8%
Applied egg-rr25.8%
associate-*r/25.8%
unpow225.8%
rem-3cbrt-lft25.8%
Simplified25.8%
clear-num26.8%
associate-/r/25.8%
associate-/r*25.8%
add-sqr-sqrt13.2%
sqrt-unprod29.3%
sqr-neg29.3%
sqrt-unprod22.5%
add-sqr-sqrt45.9%
Applied egg-rr45.9%
associate-*l/51.7%
associate-*l/51.7%
*-un-lft-identity51.7%
Applied egg-rr51.7%
Final simplification45.8%
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 88.5%
Taylor expanded in z around 0 38.5%
Final simplification38.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(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 88.5%
Taylor expanded in z around 0 38.5%
frac-2neg38.5%
add-cube-cbrt38.3%
associate-/l*38.3%
cbrt-unprod41.7%
sqr-neg41.7%
cbrt-unprod38.3%
pow238.3%
add-sqr-sqrt18.8%
sqrt-unprod34.9%
sqr-neg34.9%
sqrt-unprod10.9%
add-sqr-sqrt21.1%
distribute-rgt-neg-in21.1%
Applied egg-rr21.1%
associate-*r/21.1%
unpow221.1%
rem-3cbrt-lft21.1%
Simplified21.1%
clear-num21.5%
associate-/r/21.1%
associate-/r*21.1%
add-sqr-sqrt10.2%
sqrt-unprod31.9%
sqr-neg31.9%
sqrt-unprod20.7%
add-sqr-sqrt38.8%
Applied egg-rr38.8%
associate-*l/45.5%
associate-*l/45.6%
*-un-lft-identity45.6%
Applied egg-rr45.6%
Final simplification45.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 2024079
(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))))