
(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 22 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 86.7%
associate-/l/97.4%
Simplified97.4%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- t z) (- y z))))
(if (<= t_1 -5e+289)
(/ 1.0 (/ (- t z) (/ x y)))
(if (<= t_1 4e+300) (/ x t_1) (* (/ x (- t z)) (/ -1.0 z))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = (t - z) * (y - z);
double tmp;
if (t_1 <= -5e+289) {
tmp = 1.0 / ((t - z) / (x / y));
} else if (t_1 <= 4e+300) {
tmp = x / t_1;
} else {
tmp = (x / (t - z)) * (-1.0 / 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 = (t - z) * (y - z)
if (t_1 <= (-5d+289)) then
tmp = 1.0d0 / ((t - z) / (x / y))
else if (t_1 <= 4d+300) then
tmp = x / t_1
else
tmp = (x / (t - z)) * ((-1.0d0) / 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 = (t - z) * (y - z);
double tmp;
if (t_1 <= -5e+289) {
tmp = 1.0 / ((t - z) / (x / y));
} else if (t_1 <= 4e+300) {
tmp = x / t_1;
} else {
tmp = (x / (t - z)) * (-1.0 / z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = (t - z) * (y - z) tmp = 0 if t_1 <= -5e+289: tmp = 1.0 / ((t - z) / (x / y)) elif t_1 <= 4e+300: tmp = x / t_1 else: tmp = (x / (t - z)) * (-1.0 / z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(t - z) * Float64(y - z)) tmp = 0.0 if (t_1 <= -5e+289) tmp = Float64(1.0 / Float64(Float64(t - z) / Float64(x / y))); elseif (t_1 <= 4e+300) tmp = Float64(x / t_1); else tmp = Float64(Float64(x / Float64(t - z)) * Float64(-1.0 / z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (t - z) * (y - z);
tmp = 0.0;
if (t_1 <= -5e+289)
tmp = 1.0 / ((t - z) / (x / y));
elseif (t_1 <= 4e+300)
tmp = x / t_1;
else
tmp = (x / (t - z)) * (-1.0 / z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t - z), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+289], N[(1.0 / N[(N[(t - z), $MachinePrecision] / N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+300], N[(x / t$95$1), $MachinePrecision], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \left(t - z\right) \cdot \left(y - z\right)\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+289}:\\
\;\;\;\;\frac{1}{\frac{t - z}{\frac{x}{y}}}\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+300}:\\
\;\;\;\;\frac{x}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t - z} \cdot \frac{-1}{z}\\
\end{array}
\end{array}
if (*.f64 (-.f64 y z) (-.f64 t z)) < -5.00000000000000031e289Initial program 66.9%
associate-/l/99.8%
div-inv99.8%
Applied egg-rr99.8%
associate-*l/99.6%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 78.3%
if -5.00000000000000031e289 < (*.f64 (-.f64 y z) (-.f64 t z)) < 4.0000000000000002e300Initial program 97.7%
if 4.0000000000000002e300 < (*.f64 (-.f64 y z) (-.f64 t z)) Initial program 72.9%
associate-/l/99.8%
div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 85.9%
Final simplification91.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 (<= z -2.75e+94)
(/ (/ x z) z)
(if (<= z -3.8e-108)
(/ (/ x z) (- t))
(if (<= z 2.6e-55)
(/ (/ x t) y)
(if (<= z 1.16e+95) (/ (/ (- x) z) y) (/ 1.0 (* z (/ z x))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.75e+94) {
tmp = (x / z) / z;
} else if (z <= -3.8e-108) {
tmp = (x / z) / -t;
} else if (z <= 2.6e-55) {
tmp = (x / t) / y;
} else if (z <= 1.16e+95) {
tmp = (-x / z) / y;
} else {
tmp = 1.0 / (z * (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 <= (-2.75d+94)) then
tmp = (x / z) / z
else if (z <= (-3.8d-108)) then
tmp = (x / z) / -t
else if (z <= 2.6d-55) then
tmp = (x / t) / y
else if (z <= 1.16d+95) then
tmp = (-x / z) / y
else
tmp = 1.0d0 / (z * (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 <= -2.75e+94) {
tmp = (x / z) / z;
} else if (z <= -3.8e-108) {
tmp = (x / z) / -t;
} else if (z <= 2.6e-55) {
tmp = (x / t) / y;
} else if (z <= 1.16e+95) {
tmp = (-x / z) / y;
} else {
tmp = 1.0 / (z * (z / x));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= -2.75e+94: tmp = (x / z) / z elif z <= -3.8e-108: tmp = (x / z) / -t elif z <= 2.6e-55: tmp = (x / t) / y elif z <= 1.16e+95: tmp = (-x / z) / y else: tmp = 1.0 / (z * (z / x)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -2.75e+94) tmp = Float64(Float64(x / z) / z); elseif (z <= -3.8e-108) tmp = Float64(Float64(x / z) / Float64(-t)); elseif (z <= 2.6e-55) tmp = Float64(Float64(x / t) / y); elseif (z <= 1.16e+95) tmp = Float64(Float64(Float64(-x) / z) / y); else tmp = Float64(1.0 / Float64(z * Float64(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 <= -2.75e+94)
tmp = (x / z) / z;
elseif (z <= -3.8e-108)
tmp = (x / z) / -t;
elseif (z <= 2.6e-55)
tmp = (x / t) / y;
elseif (z <= 1.16e+95)
tmp = (-x / z) / y;
else
tmp = 1.0 / (z * (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, -2.75e+94], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -3.8e-108], N[(N[(x / z), $MachinePrecision] / (-t)), $MachinePrecision], If[LessEqual[z, 2.6e-55], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 1.16e+95], N[(N[((-x) / z), $MachinePrecision] / y), $MachinePrecision], N[(1.0 / N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.75 \cdot 10^{+94}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-108}:\\
\;\;\;\;\frac{\frac{x}{z}}{-t}\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-55}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;z \leq 1.16 \cdot 10^{+95}:\\
\;\;\;\;\frac{\frac{-x}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{z \cdot \frac{z}{x}}\\
\end{array}
\end{array}
if z < -2.7499999999999999e94Initial program 81.6%
Taylor expanded in t around 0 81.6%
mul-1-neg81.6%
associate-/r*96.3%
distribute-neg-frac296.3%
neg-sub096.3%
sub-neg96.3%
+-commutative96.3%
associate--r+96.3%
neg-sub096.3%
remove-double-neg96.3%
Simplified96.3%
Taylor expanded in z around inf 91.2%
if -2.7499999999999999e94 < z < -3.79999999999999973e-108Initial program 92.0%
associate-/l/94.6%
Simplified94.6%
Taylor expanded in t around inf 49.7%
Taylor expanded in y around 0 38.5%
neg-mul-138.5%
Simplified38.5%
Taylor expanded in x around 0 38.3%
mul-1-neg38.3%
associate-/l/41.1%
distribute-neg-frac241.1%
Simplified41.1%
if -3.79999999999999973e-108 < z < 2.5999999999999999e-55Initial program 91.6%
associate-/l/95.2%
Simplified95.2%
Taylor expanded in t around inf 81.9%
Taylor expanded in y around inf 75.8%
if 2.5999999999999999e-55 < z < 1.1599999999999999e95Initial program 79.0%
Taylor expanded in t around 0 54.8%
mul-1-neg54.8%
associate-/r*59.1%
distribute-neg-frac259.1%
neg-sub059.1%
sub-neg59.1%
+-commutative59.1%
associate--r+59.1%
neg-sub059.1%
remove-double-neg59.1%
Simplified59.1%
Taylor expanded in z around 0 40.5%
neg-mul-140.5%
Simplified40.5%
if 1.1599999999999999e95 < z Initial program 83.2%
Taylor expanded in t around 0 82.7%
mul-1-neg82.7%
associate-/r*92.4%
distribute-neg-frac292.4%
neg-sub092.4%
sub-neg92.4%
+-commutative92.4%
associate--r+92.4%
neg-sub092.4%
remove-double-neg92.4%
Simplified92.4%
clear-num92.4%
inv-pow92.5%
div-inv92.4%
clear-num92.5%
Applied egg-rr92.5%
unpow-192.4%
Simplified92.4%
Taylor expanded in z around inf 92.4%
Final simplification72.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) z)))
(if (<= z -3e+94)
t_1
(if (<= z -3.8e-108)
(/ (/ x z) (- t))
(if (<= z 2.8e-54)
(/ (/ x t) y)
(if (<= z 1.2e+95) (/ (/ (- x) z) y) t_1))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double tmp;
if (z <= -3e+94) {
tmp = t_1;
} else if (z <= -3.8e-108) {
tmp = (x / z) / -t;
} else if (z <= 2.8e-54) {
tmp = (x / t) / y;
} else if (z <= 1.2e+95) {
tmp = (-x / z) / y;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x / z) / z
if (z <= (-3d+94)) then
tmp = t_1
else if (z <= (-3.8d-108)) then
tmp = (x / z) / -t
else if (z <= 2.8d-54) then
tmp = (x / t) / y
else if (z <= 1.2d+95) then
tmp = (-x / z) / y
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double tmp;
if (z <= -3e+94) {
tmp = t_1;
} else if (z <= -3.8e-108) {
tmp = (x / z) / -t;
} else if (z <= 2.8e-54) {
tmp = (x / t) / y;
} else if (z <= 1.2e+95) {
tmp = (-x / z) / y;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = (x / z) / z tmp = 0 if z <= -3e+94: tmp = t_1 elif z <= -3.8e-108: tmp = (x / z) / -t elif z <= 2.8e-54: tmp = (x / t) / y elif z <= 1.2e+95: tmp = (-x / z) / y else: tmp = t_1 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) / z) tmp = 0.0 if (z <= -3e+94) tmp = t_1; elseif (z <= -3.8e-108) tmp = Float64(Float64(x / z) / Float64(-t)); elseif (z <= 2.8e-54) tmp = Float64(Float64(x / t) / y); elseif (z <= 1.2e+95) tmp = Float64(Float64(Float64(-x) / z) / y); else tmp = t_1; end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / z) / z;
tmp = 0.0;
if (z <= -3e+94)
tmp = t_1;
elseif (z <= -3.8e-108)
tmp = (x / z) / -t;
elseif (z <= 2.8e-54)
tmp = (x / t) / y;
elseif (z <= 1.2e+95)
tmp = (-x / z) / y;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -3e+94], t$95$1, If[LessEqual[z, -3.8e-108], N[(N[(x / z), $MachinePrecision] / (-t)), $MachinePrecision], If[LessEqual[z, 2.8e-54], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 1.2e+95], N[(N[((-x) / z), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z}\\
\mathbf{if}\;z \leq -3 \cdot 10^{+94}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-108}:\\
\;\;\;\;\frac{\frac{x}{z}}{-t}\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-54}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+95}:\\
\;\;\;\;\frac{\frac{-x}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.0000000000000001e94 or 1.2e95 < z Initial program 82.3%
Taylor expanded in t around 0 82.1%
mul-1-neg82.1%
associate-/r*94.7%
distribute-neg-frac294.7%
neg-sub094.7%
sub-neg94.7%
+-commutative94.7%
associate--r+94.7%
neg-sub094.7%
remove-double-neg94.7%
Simplified94.7%
Taylor expanded in z around inf 91.7%
if -3.0000000000000001e94 < z < -3.79999999999999973e-108Initial program 92.0%
associate-/l/94.6%
Simplified94.6%
Taylor expanded in t around inf 49.7%
Taylor expanded in y around 0 38.5%
neg-mul-138.5%
Simplified38.5%
Taylor expanded in x around 0 38.3%
mul-1-neg38.3%
associate-/l/41.1%
distribute-neg-frac241.1%
Simplified41.1%
if -3.79999999999999973e-108 < z < 2.8000000000000002e-54Initial program 91.6%
associate-/l/95.2%
Simplified95.2%
Taylor expanded in t around inf 81.9%
Taylor expanded in y around inf 75.8%
if 2.8000000000000002e-54 < z < 1.2e95Initial program 79.0%
Taylor expanded in t around 0 54.8%
mul-1-neg54.8%
associate-/r*59.1%
distribute-neg-frac259.1%
neg-sub059.1%
sub-neg59.1%
+-commutative59.1%
associate--r+59.1%
neg-sub059.1%
remove-double-neg59.1%
Simplified59.1%
Taylor expanded in z around 0 40.5%
neg-mul-140.5%
Simplified40.5%
Final simplification72.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) z)))
(if (<= z -2.75e+94)
t_1
(if (<= z -3.8e-108)
(/ (/ x z) (- t))
(if (<= z 3.8e-56)
(/ (/ x t) y)
(if (<= z 1.16e+95) (/ (- x) (* z y)) t_1))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double tmp;
if (z <= -2.75e+94) {
tmp = t_1;
} else if (z <= -3.8e-108) {
tmp = (x / z) / -t;
} else if (z <= 3.8e-56) {
tmp = (x / t) / y;
} else if (z <= 1.16e+95) {
tmp = -x / (z * y);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x / z) / z
if (z <= (-2.75d+94)) then
tmp = t_1
else if (z <= (-3.8d-108)) then
tmp = (x / z) / -t
else if (z <= 3.8d-56) then
tmp = (x / t) / y
else if (z <= 1.16d+95) then
tmp = -x / (z * y)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double tmp;
if (z <= -2.75e+94) {
tmp = t_1;
} else if (z <= -3.8e-108) {
tmp = (x / z) / -t;
} else if (z <= 3.8e-56) {
tmp = (x / t) / y;
} else if (z <= 1.16e+95) {
tmp = -x / (z * y);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = (x / z) / z tmp = 0 if z <= -2.75e+94: tmp = t_1 elif z <= -3.8e-108: tmp = (x / z) / -t elif z <= 3.8e-56: tmp = (x / t) / y elif z <= 1.16e+95: tmp = -x / (z * y) else: tmp = t_1 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) / z) tmp = 0.0 if (z <= -2.75e+94) tmp = t_1; elseif (z <= -3.8e-108) tmp = Float64(Float64(x / z) / Float64(-t)); elseif (z <= 3.8e-56) tmp = Float64(Float64(x / t) / y); elseif (z <= 1.16e+95) tmp = Float64(Float64(-x) / Float64(z * y)); else tmp = t_1; end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / z) / z;
tmp = 0.0;
if (z <= -2.75e+94)
tmp = t_1;
elseif (z <= -3.8e-108)
tmp = (x / z) / -t;
elseif (z <= 3.8e-56)
tmp = (x / t) / y;
elseif (z <= 1.16e+95)
tmp = -x / (z * y);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -2.75e+94], t$95$1, If[LessEqual[z, -3.8e-108], N[(N[(x / z), $MachinePrecision] / (-t)), $MachinePrecision], If[LessEqual[z, 3.8e-56], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 1.16e+95], N[((-x) / N[(z * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z}\\
\mathbf{if}\;z \leq -2.75 \cdot 10^{+94}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-108}:\\
\;\;\;\;\frac{\frac{x}{z}}{-t}\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-56}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;z \leq 1.16 \cdot 10^{+95}:\\
\;\;\;\;\frac{-x}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.7499999999999999e94 or 1.1599999999999999e95 < z Initial program 82.3%
Taylor expanded in t around 0 82.1%
mul-1-neg82.1%
associate-/r*94.7%
distribute-neg-frac294.7%
neg-sub094.7%
sub-neg94.7%
+-commutative94.7%
associate--r+94.7%
neg-sub094.7%
remove-double-neg94.7%
Simplified94.7%
Taylor expanded in z around inf 91.7%
if -2.7499999999999999e94 < z < -3.79999999999999973e-108Initial program 92.0%
associate-/l/94.6%
Simplified94.6%
Taylor expanded in t around inf 49.7%
Taylor expanded in y around 0 38.5%
neg-mul-138.5%
Simplified38.5%
Taylor expanded in x around 0 38.3%
mul-1-neg38.3%
associate-/l/41.1%
distribute-neg-frac241.1%
Simplified41.1%
if -3.79999999999999973e-108 < z < 3.8000000000000002e-56Initial program 91.6%
associate-/l/95.2%
Simplified95.2%
Taylor expanded in t around inf 81.9%
Taylor expanded in y around inf 75.8%
if 3.8000000000000002e-56 < z < 1.1599999999999999e95Initial program 79.0%
Taylor expanded in t around 0 54.8%
mul-1-neg54.8%
associate-/r*59.1%
distribute-neg-frac259.1%
neg-sub059.1%
sub-neg59.1%
+-commutative59.1%
associate--r+59.1%
neg-sub059.1%
remove-double-neg59.1%
Simplified59.1%
Taylor expanded in z around 0 36.3%
associate-*r/36.3%
neg-mul-136.3%
*-commutative36.3%
Simplified36.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) z)))
(if (<= z -2.75e+94)
t_1
(if (<= z -3.5e-108)
(/ (/ x t) (- z))
(if (<= z 8.4e-57)
(/ (/ x t) y)
(if (<= z 1.16e+95) (/ (- x) (* z y)) t_1))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double tmp;
if (z <= -2.75e+94) {
tmp = t_1;
} else if (z <= -3.5e-108) {
tmp = (x / t) / -z;
} else if (z <= 8.4e-57) {
tmp = (x / t) / y;
} else if (z <= 1.16e+95) {
tmp = -x / (z * y);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x / z) / z
if (z <= (-2.75d+94)) then
tmp = t_1
else if (z <= (-3.5d-108)) then
tmp = (x / t) / -z
else if (z <= 8.4d-57) then
tmp = (x / t) / y
else if (z <= 1.16d+95) then
tmp = -x / (z * y)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double tmp;
if (z <= -2.75e+94) {
tmp = t_1;
} else if (z <= -3.5e-108) {
tmp = (x / t) / -z;
} else if (z <= 8.4e-57) {
tmp = (x / t) / y;
} else if (z <= 1.16e+95) {
tmp = -x / (z * y);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = (x / z) / z tmp = 0 if z <= -2.75e+94: tmp = t_1 elif z <= -3.5e-108: tmp = (x / t) / -z elif z <= 8.4e-57: tmp = (x / t) / y elif z <= 1.16e+95: tmp = -x / (z * y) else: tmp = t_1 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) / z) tmp = 0.0 if (z <= -2.75e+94) tmp = t_1; elseif (z <= -3.5e-108) tmp = Float64(Float64(x / t) / Float64(-z)); elseif (z <= 8.4e-57) tmp = Float64(Float64(x / t) / y); elseif (z <= 1.16e+95) tmp = Float64(Float64(-x) / Float64(z * y)); else tmp = t_1; end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / z) / z;
tmp = 0.0;
if (z <= -2.75e+94)
tmp = t_1;
elseif (z <= -3.5e-108)
tmp = (x / t) / -z;
elseif (z <= 8.4e-57)
tmp = (x / t) / y;
elseif (z <= 1.16e+95)
tmp = -x / (z * y);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -2.75e+94], t$95$1, If[LessEqual[z, -3.5e-108], N[(N[(x / t), $MachinePrecision] / (-z)), $MachinePrecision], If[LessEqual[z, 8.4e-57], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 1.16e+95], N[((-x) / N[(z * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z}\\
\mathbf{if}\;z \leq -2.75 \cdot 10^{+94}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-108}:\\
\;\;\;\;\frac{\frac{x}{t}}{-z}\\
\mathbf{elif}\;z \leq 8.4 \cdot 10^{-57}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;z \leq 1.16 \cdot 10^{+95}:\\
\;\;\;\;\frac{-x}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.7499999999999999e94 or 1.1599999999999999e95 < z Initial program 82.3%
Taylor expanded in t around 0 82.1%
mul-1-neg82.1%
associate-/r*94.7%
distribute-neg-frac294.7%
neg-sub094.7%
sub-neg94.7%
+-commutative94.7%
associate--r+94.7%
neg-sub094.7%
remove-double-neg94.7%
Simplified94.7%
Taylor expanded in z around inf 91.7%
if -2.7499999999999999e94 < z < -3.4999999999999999e-108Initial program 92.0%
associate-/l/94.6%
Simplified94.6%
Taylor expanded in t around inf 49.7%
Taylor expanded in y around 0 38.5%
neg-mul-138.5%
Simplified38.5%
if -3.4999999999999999e-108 < z < 8.3999999999999998e-57Initial program 91.6%
associate-/l/95.2%
Simplified95.2%
Taylor expanded in t around inf 81.9%
Taylor expanded in y around inf 75.8%
if 8.3999999999999998e-57 < z < 1.1599999999999999e95Initial program 79.0%
Taylor expanded in t around 0 54.8%
mul-1-neg54.8%
associate-/r*59.1%
distribute-neg-frac259.1%
neg-sub059.1%
sub-neg59.1%
+-commutative59.1%
associate--r+59.1%
neg-sub059.1%
remove-double-neg59.1%
Simplified59.1%
Taylor expanded in z around 0 36.3%
associate-*r/36.3%
neg-mul-136.3%
*-commutative36.3%
Simplified36.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) z)))
(if (<= z -2.8e+94)
t_1
(if (<= z -3.8e-108)
(/ (- x) (* t z))
(if (<= z 7.6e-57)
(/ (/ x t) y)
(if (<= z 1.75e+95) (/ (- x) (* z y)) t_1))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double tmp;
if (z <= -2.8e+94) {
tmp = t_1;
} else if (z <= -3.8e-108) {
tmp = -x / (t * z);
} else if (z <= 7.6e-57) {
tmp = (x / t) / y;
} else if (z <= 1.75e+95) {
tmp = -x / (z * y);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x / z) / z
if (z <= (-2.8d+94)) then
tmp = t_1
else if (z <= (-3.8d-108)) then
tmp = -x / (t * z)
else if (z <= 7.6d-57) then
tmp = (x / t) / y
else if (z <= 1.75d+95) then
tmp = -x / (z * y)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double tmp;
if (z <= -2.8e+94) {
tmp = t_1;
} else if (z <= -3.8e-108) {
tmp = -x / (t * z);
} else if (z <= 7.6e-57) {
tmp = (x / t) / y;
} else if (z <= 1.75e+95) {
tmp = -x / (z * y);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = (x / z) / z tmp = 0 if z <= -2.8e+94: tmp = t_1 elif z <= -3.8e-108: tmp = -x / (t * z) elif z <= 7.6e-57: tmp = (x / t) / y elif z <= 1.75e+95: tmp = -x / (z * y) else: tmp = t_1 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) / z) tmp = 0.0 if (z <= -2.8e+94) tmp = t_1; elseif (z <= -3.8e-108) tmp = Float64(Float64(-x) / Float64(t * z)); elseif (z <= 7.6e-57) tmp = Float64(Float64(x / t) / y); elseif (z <= 1.75e+95) tmp = Float64(Float64(-x) / Float64(z * y)); else tmp = t_1; end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / z) / z;
tmp = 0.0;
if (z <= -2.8e+94)
tmp = t_1;
elseif (z <= -3.8e-108)
tmp = -x / (t * z);
elseif (z <= 7.6e-57)
tmp = (x / t) / y;
elseif (z <= 1.75e+95)
tmp = -x / (z * y);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -2.8e+94], t$95$1, If[LessEqual[z, -3.8e-108], N[((-x) / N[(t * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.6e-57], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 1.75e+95], N[((-x) / N[(z * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z}\\
\mathbf{if}\;z \leq -2.8 \cdot 10^{+94}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-108}:\\
\;\;\;\;\frac{-x}{t \cdot z}\\
\mathbf{elif}\;z \leq 7.6 \cdot 10^{-57}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{+95}:\\
\;\;\;\;\frac{-x}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.79999999999999998e94 or 1.75e95 < z Initial program 82.3%
Taylor expanded in t around 0 82.1%
mul-1-neg82.1%
associate-/r*94.7%
distribute-neg-frac294.7%
neg-sub094.7%
sub-neg94.7%
+-commutative94.7%
associate--r+94.7%
neg-sub094.7%
remove-double-neg94.7%
Simplified94.7%
Taylor expanded in z around inf 91.7%
if -2.79999999999999998e94 < z < -3.79999999999999973e-108Initial program 92.0%
associate-/l/94.6%
Simplified94.6%
Taylor expanded in t around inf 49.7%
Taylor expanded in y around 0 38.3%
associate-*r/38.3%
neg-mul-138.3%
Simplified38.3%
if -3.79999999999999973e-108 < z < 7.5999999999999995e-57Initial program 91.6%
associate-/l/95.2%
Simplified95.2%
Taylor expanded in t around inf 81.9%
Taylor expanded in y around inf 75.8%
if 7.5999999999999995e-57 < z < 1.75e95Initial program 79.0%
Taylor expanded in t around 0 54.8%
mul-1-neg54.8%
associate-/r*59.1%
distribute-neg-frac259.1%
neg-sub059.1%
sub-neg59.1%
+-commutative59.1%
associate--r+59.1%
neg-sub059.1%
remove-double-neg59.1%
Simplified59.1%
Taylor expanded in z around 0 36.3%
associate-*r/36.3%
neg-mul-136.3%
*-commutative36.3%
Simplified36.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 -4.2e+163)
(/ (/ x z) z)
(if (or (<= z -2.6e-103) (not (<= z 3.4e-87)))
(/ x (* z (- z y)))
(* (/ x t) (/ 1.0 y)))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4.2e+163) {
tmp = (x / z) / z;
} else if ((z <= -2.6e-103) || !(z <= 3.4e-87)) {
tmp = x / (z * (z - y));
} else {
tmp = (x / t) * (1.0 / y);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-4.2d+163)) then
tmp = (x / z) / z
else if ((z <= (-2.6d-103)) .or. (.not. (z <= 3.4d-87))) then
tmp = x / (z * (z - y))
else
tmp = (x / t) * (1.0d0 / y)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4.2e+163) {
tmp = (x / z) / z;
} else if ((z <= -2.6e-103) || !(z <= 3.4e-87)) {
tmp = x / (z * (z - y));
} else {
tmp = (x / t) * (1.0 / y);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= -4.2e+163: tmp = (x / z) / z elif (z <= -2.6e-103) or not (z <= 3.4e-87): tmp = x / (z * (z - y)) else: tmp = (x / t) * (1.0 / y) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -4.2e+163) tmp = Float64(Float64(x / z) / z); elseif ((z <= -2.6e-103) || !(z <= 3.4e-87)) tmp = Float64(x / Float64(z * Float64(z - y))); else tmp = Float64(Float64(x / t) * Float64(1.0 / y)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (z <= -4.2e+163)
tmp = (x / z) / z;
elseif ((z <= -2.6e-103) || ~((z <= 3.4e-87)))
tmp = x / (z * (z - y));
else
tmp = (x / t) * (1.0 / 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[z, -4.2e+163], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[Or[LessEqual[z, -2.6e-103], N[Not[LessEqual[z, 3.4e-87]], $MachinePrecision]], N[(x / N[(z * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+163}:\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-103} \lor \neg \left(z \leq 3.4 \cdot 10^{-87}\right):\\
\;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t} \cdot \frac{1}{y}\\
\end{array}
\end{array}
if z < -4.2000000000000001e163Initial program 72.8%
Taylor expanded in t around 0 72.8%
mul-1-neg72.8%
associate-/r*94.2%
distribute-neg-frac294.2%
neg-sub094.2%
sub-neg94.2%
+-commutative94.2%
associate--r+94.2%
neg-sub094.2%
remove-double-neg94.2%
Simplified94.2%
Taylor expanded in z around inf 91.3%
if -4.2000000000000001e163 < z < -2.59999999999999996e-103 or 3.3999999999999999e-87 < z Initial program 87.0%
Taylor expanded in t around 0 71.0%
mul-1-neg71.0%
distribute-rgt-neg-in71.0%
neg-sub071.0%
sub-neg71.0%
+-commutative71.0%
associate--r+71.0%
neg-sub071.0%
remove-double-neg71.0%
Simplified71.0%
if -2.59999999999999996e-103 < z < 3.3999999999999999e-87Initial program 91.3%
Taylor expanded in z around 0 71.3%
associate-/r*77.1%
div-inv77.0%
Applied egg-rr77.0%
Final simplification75.8%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x z) z)))
(if (<= z -2.75e+94)
t_1
(if (<= z -4.8e-109)
(/ (- x) (* t z))
(if (<= z 8.2e+35) (/ (/ x t) y) t_1)))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double tmp;
if (z <= -2.75e+94) {
tmp = t_1;
} else if (z <= -4.8e-109) {
tmp = -x / (t * z);
} else if (z <= 8.2e+35) {
tmp = (x / t) / y;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x / z) / z
if (z <= (-2.75d+94)) then
tmp = t_1
else if (z <= (-4.8d-109)) then
tmp = -x / (t * z)
else if (z <= 8.2d+35) then
tmp = (x / t) / y
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / z) / z;
double tmp;
if (z <= -2.75e+94) {
tmp = t_1;
} else if (z <= -4.8e-109) {
tmp = -x / (t * z);
} else if (z <= 8.2e+35) {
tmp = (x / t) / y;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = (x / z) / z tmp = 0 if z <= -2.75e+94: tmp = t_1 elif z <= -4.8e-109: tmp = -x / (t * z) elif z <= 8.2e+35: tmp = (x / t) / y else: tmp = t_1 return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) / z) tmp = 0.0 if (z <= -2.75e+94) tmp = t_1; elseif (z <= -4.8e-109) tmp = Float64(Float64(-x) / Float64(t * z)); elseif (z <= 8.2e+35) tmp = Float64(Float64(x / t) / y); else tmp = t_1; end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / z) / z;
tmp = 0.0;
if (z <= -2.75e+94)
tmp = t_1;
elseif (z <= -4.8e-109)
tmp = -x / (t * z);
elseif (z <= 8.2e+35)
tmp = (x / t) / y;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -2.75e+94], t$95$1, If[LessEqual[z, -4.8e-109], N[((-x) / N[(t * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.2e+35], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z}\\
\mathbf{if}\;z \leq -2.75 \cdot 10^{+94}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4.8 \cdot 10^{-109}:\\
\;\;\;\;\frac{-x}{t \cdot z}\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{+35}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.7499999999999999e94 or 8.1999999999999997e35 < z Initial program 80.5%
Taylor expanded in t around 0 80.3%
mul-1-neg80.3%
associate-/r*92.8%
distribute-neg-frac292.8%
neg-sub092.8%
sub-neg92.8%
+-commutative92.8%
associate--r+92.8%
neg-sub092.8%
remove-double-neg92.8%
Simplified92.8%
Taylor expanded in z around inf 85.4%
if -2.7499999999999999e94 < z < -4.79999999999999977e-109Initial program 92.0%
associate-/l/94.6%
Simplified94.6%
Taylor expanded in t around inf 49.7%
Taylor expanded in y around 0 38.3%
associate-*r/38.3%
neg-mul-138.3%
Simplified38.3%
if -4.79999999999999977e-109 < z < 8.1999999999999997e35Initial program 90.6%
associate-/l/96.0%
Simplified96.0%
Taylor expanded in t around inf 80.2%
Taylor expanded in y around inf 70.1%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t -2.25e-165) (/ (/ x y) (- t z)) (if (<= t 3.95e+33) (/ 1.0 (* (- z y) (/ z x))) (/ (/ x t) (- y z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2.25e-165) {
tmp = (x / y) / (t - z);
} else if (t <= 3.95e+33) {
tmp = 1.0 / ((z - y) * (z / x));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-2.25d-165)) then
tmp = (x / y) / (t - z)
else if (t <= 3.95d+33) then
tmp = 1.0d0 / ((z - y) * (z / x))
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2.25e-165) {
tmp = (x / y) / (t - z);
} else if (t <= 3.95e+33) {
tmp = 1.0 / ((z - y) * (z / x));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -2.25e-165: tmp = (x / y) / (t - z) elif t <= 3.95e+33: tmp = 1.0 / ((z - y) * (z / x)) else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -2.25e-165) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (t <= 3.95e+33) tmp = Float64(1.0 / Float64(Float64(z - y) * Float64(z / x))); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -2.25e-165)
tmp = (x / y) / (t - z);
elseif (t <= 3.95e+33)
tmp = 1.0 / ((z - y) * (z / x));
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -2.25e-165], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.95e+33], N[(1.0 / N[(N[(z - y), $MachinePrecision] * N[(z / x), $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 -2.25 \cdot 10^{-165}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;t \leq 3.95 \cdot 10^{+33}:\\
\;\;\;\;\frac{1}{\left(z - y\right) \cdot \frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -2.24999999999999996e-165Initial program 85.7%
Taylor expanded in y around inf 53.4%
associate-/r*56.6%
Simplified56.6%
if -2.24999999999999996e-165 < t < 3.95e33Initial program 87.4%
Taylor expanded in t around 0 73.4%
mul-1-neg73.4%
associate-/r*82.1%
distribute-neg-frac282.1%
neg-sub082.1%
sub-neg82.1%
+-commutative82.1%
associate--r+82.1%
neg-sub082.1%
remove-double-neg82.1%
Simplified82.1%
clear-num81.9%
inv-pow81.9%
div-inv81.8%
clear-num82.1%
Applied egg-rr82.1%
unpow-182.1%
Simplified82.1%
if 3.95e33 < t Initial program 87.5%
associate-/l/98.8%
Simplified98.8%
Taylor expanded in t around inf 96.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 (or (<= z -2.8e-60) (not (<= z 1.75e+94))) (/ (/ x z) (- z t)) (/ (/ x y) (- t z))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.8e-60) || !(z <= 1.75e+94)) {
tmp = (x / z) / (z - t);
} else {
tmp = (x / y) / (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 ((z <= (-2.8d-60)) .or. (.not. (z <= 1.75d+94))) then
tmp = (x / z) / (z - t)
else
tmp = (x / y) / (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 ((z <= -2.8e-60) || !(z <= 1.75e+94)) {
tmp = (x / z) / (z - t);
} else {
tmp = (x / y) / (t - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if (z <= -2.8e-60) or not (z <= 1.75e+94): tmp = (x / z) / (z - t) else: tmp = (x / y) / (t - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -2.8e-60) || !(z <= 1.75e+94)) tmp = Float64(Float64(x / z) / Float64(z - t)); else tmp = Float64(Float64(x / y) / 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 ((z <= -2.8e-60) || ~((z <= 1.75e+94)))
tmp = (x / z) / (z - t);
else
tmp = (x / y) / (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[Or[LessEqual[z, -2.8e-60], N[Not[LessEqual[z, 1.75e+94]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{-60} \lor \neg \left(z \leq 1.75 \cdot 10^{+94}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\end{array}
\end{array}
if z < -2.8000000000000002e-60 or 1.7499999999999999e94 < z Initial program 84.6%
Taylor expanded in y around 0 74.6%
mul-1-neg74.6%
associate-/r*86.1%
distribute-neg-frac286.1%
sub-neg86.1%
+-commutative86.1%
distribute-neg-in86.1%
remove-double-neg86.1%
unsub-neg86.1%
Simplified86.1%
if -2.8000000000000002e-60 < z < 1.7499999999999999e94Initial program 88.8%
Taylor expanded in y around inf 69.7%
associate-/r*76.9%
Simplified76.9%
Final simplification81.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 -4.25e-165) (/ (/ x y) (- t z)) (if (<= t 8.8e+31) (/ (/ x z) (- z y)) (/ (/ x t) (- y z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -4.25e-165) {
tmp = (x / y) / (t - z);
} else if (t <= 8.8e+31) {
tmp = (x / z) / (z - y);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-4.25d-165)) then
tmp = (x / y) / (t - z)
else if (t <= 8.8d+31) then
tmp = (x / z) / (z - y)
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -4.25e-165) {
tmp = (x / y) / (t - z);
} else if (t <= 8.8e+31) {
tmp = (x / z) / (z - y);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -4.25e-165: tmp = (x / y) / (t - z) elif t <= 8.8e+31: tmp = (x / z) / (z - y) else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -4.25e-165) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (t <= 8.8e+31) tmp = Float64(Float64(x / z) / Float64(z - y)); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -4.25e-165)
tmp = (x / y) / (t - z);
elseif (t <= 8.8e+31)
tmp = (x / z) / (z - y);
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -4.25e-165], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.8e+31], N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.25 \cdot 10^{-165}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;t \leq 8.8 \cdot 10^{+31}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -4.25e-165Initial program 85.7%
Taylor expanded in y around inf 53.4%
associate-/r*56.6%
Simplified56.6%
if -4.25e-165 < t < 8.8000000000000004e31Initial program 87.4%
Taylor expanded in t around 0 73.4%
mul-1-neg73.4%
associate-/r*82.1%
distribute-neg-frac282.1%
neg-sub082.1%
sub-neg82.1%
+-commutative82.1%
associate--r+82.1%
neg-sub082.1%
remove-double-neg82.1%
Simplified82.1%
if 8.8000000000000004e31 < t Initial program 87.5%
associate-/l/98.8%
Simplified98.8%
Taylor expanded in t around inf 96.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 -1.7e-190) (/ (/ x y) (- t z)) (if (<= t 4.2e+31) (/ x (* z (- z y))) (/ (/ x t) (- y z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.7e-190) {
tmp = (x / y) / (t - z);
} else if (t <= 4.2e+31) {
tmp = x / (z * (z - y));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-1.7d-190)) then
tmp = (x / y) / (t - z)
else if (t <= 4.2d+31) then
tmp = x / (z * (z - y))
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.7e-190) {
tmp = (x / y) / (t - z);
} else if (t <= 4.2e+31) {
tmp = x / (z * (z - y));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -1.7e-190: tmp = (x / y) / (t - z) elif t <= 4.2e+31: tmp = x / (z * (z - y)) else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -1.7e-190) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (t <= 4.2e+31) tmp = Float64(x / Float64(z * Float64(z - y))); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -1.7e-190)
tmp = (x / y) / (t - z);
elseif (t <= 4.2e+31)
tmp = x / (z * (z - y));
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -1.7e-190], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.2e+31], N[(x / N[(z * N[(z - y), $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.7 \cdot 10^{-190}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{+31}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -1.69999999999999991e-190Initial program 85.2%
Taylor expanded in y around inf 52.9%
associate-/r*56.9%
Simplified56.9%
if -1.69999999999999991e-190 < t < 4.19999999999999958e31Initial program 88.0%
Taylor expanded in t around 0 73.5%
mul-1-neg73.5%
distribute-rgt-neg-in73.5%
neg-sub073.5%
sub-neg73.5%
+-commutative73.5%
associate--r+73.5%
neg-sub073.5%
remove-double-neg73.5%
Simplified73.5%
if 4.19999999999999958e31 < t Initial program 87.5%
associate-/l/98.8%
Simplified98.8%
Taylor expanded in t around inf 96.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 -2.25e-48) (/ (/ 1.0 (/ t x)) y) (if (<= t 7.8e+32) (/ x (* z (- z y))) (/ (/ x t) (- y z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2.25e-48) {
tmp = (1.0 / (t / x)) / y;
} else if (t <= 7.8e+32) {
tmp = x / (z * (z - y));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-2.25d-48)) then
tmp = (1.0d0 / (t / x)) / y
else if (t <= 7.8d+32) then
tmp = x / (z * (z - y))
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2.25e-48) {
tmp = (1.0 / (t / x)) / y;
} else if (t <= 7.8e+32) {
tmp = x / (z * (z - y));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -2.25e-48: tmp = (1.0 / (t / x)) / y elif t <= 7.8e+32: tmp = x / (z * (z - y)) else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -2.25e-48) tmp = Float64(Float64(1.0 / Float64(t / x)) / y); elseif (t <= 7.8e+32) tmp = Float64(x / Float64(z * Float64(z - y))); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -2.25e-48)
tmp = (1.0 / (t / x)) / y;
elseif (t <= 7.8e+32)
tmp = x / (z * (z - y));
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -2.25e-48], N[(N[(1.0 / N[(t / x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 7.8e+32], N[(x / N[(z * N[(z - y), $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 -2.25 \cdot 10^{-48}:\\
\;\;\;\;\frac{\frac{1}{\frac{t}{x}}}{y}\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{+32}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -2.24999999999999994e-48Initial program 85.7%
associate-/l/97.6%
Simplified97.6%
Taylor expanded in t around inf 78.2%
Taylor expanded in y around inf 58.9%
clear-num58.9%
inv-pow58.9%
Applied egg-rr58.9%
unpow-158.9%
Simplified58.9%
if -2.24999999999999994e-48 < t < 7.7999999999999998e32Initial program 87.1%
Taylor expanded in t around 0 70.7%
mul-1-neg70.7%
distribute-rgt-neg-in70.7%
neg-sub070.7%
sub-neg70.7%
+-commutative70.7%
associate--r+70.7%
neg-sub070.7%
remove-double-neg70.7%
Simplified70.7%
if 7.7999999999999998e32 < t Initial program 87.5%
associate-/l/98.8%
Simplified98.8%
Taylor expanded in t around inf 96.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 -9e-45) (/ (/ 1.0 (/ t x)) y) (if (<= t 4.2e+31) (/ x (* z (- z y))) (/ x (* t (- y z))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -9e-45) {
tmp = (1.0 / (t / x)) / y;
} else if (t <= 4.2e+31) {
tmp = x / (z * (z - y));
} else {
tmp = x / (t * (y - z));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-9d-45)) then
tmp = (1.0d0 / (t / x)) / y
else if (t <= 4.2d+31) then
tmp = x / (z * (z - y))
else
tmp = x / (t * (y - z))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -9e-45) {
tmp = (1.0 / (t / x)) / y;
} else if (t <= 4.2e+31) {
tmp = x / (z * (z - y));
} else {
tmp = x / (t * (y - z));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -9e-45: tmp = (1.0 / (t / x)) / y elif t <= 4.2e+31: tmp = x / (z * (z - y)) else: tmp = x / (t * (y - z)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -9e-45) tmp = Float64(Float64(1.0 / Float64(t / x)) / y); elseif (t <= 4.2e+31) tmp = Float64(x / Float64(z * Float64(z - y))); else tmp = Float64(x / Float64(t * Float64(y - z))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -9e-45)
tmp = (1.0 / (t / x)) / y;
elseif (t <= 4.2e+31)
tmp = x / (z * (z - y));
else
tmp = x / (t * (y - z));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -9e-45], N[(N[(1.0 / N[(t / x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 4.2e+31], N[(x / N[(z * N[(z - y), $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}\;t \leq -9 \cdot 10^{-45}:\\
\;\;\;\;\frac{\frac{1}{\frac{t}{x}}}{y}\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{+31}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\
\end{array}
\end{array}
if t < -8.9999999999999997e-45Initial program 85.4%
associate-/l/97.5%
Simplified97.5%
Taylor expanded in t around inf 78.8%
Taylor expanded in y around inf 60.2%
clear-num60.2%
inv-pow60.2%
Applied egg-rr60.2%
unpow-160.2%
Simplified60.2%
if -8.9999999999999997e-45 < t < 4.19999999999999958e31Initial program 87.3%
Taylor expanded in t around 0 71.2%
mul-1-neg71.2%
distribute-rgt-neg-in71.2%
neg-sub071.2%
sub-neg71.2%
+-commutative71.2%
associate--r+71.2%
neg-sub071.2%
remove-double-neg71.2%
Simplified71.2%
if 4.19999999999999958e31 < t Initial program 87.5%
Taylor expanded in t around inf 87.0%
Final simplification70.8%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t -4e-46) (* (/ x t) (/ 1.0 y)) (if (<= t 4.5e+31) (/ x (* z (- z y))) (/ x (* t (- y z))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -4e-46) {
tmp = (x / t) * (1.0 / y);
} else if (t <= 4.5e+31) {
tmp = x / (z * (z - y));
} else {
tmp = x / (t * (y - z));
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-4d-46)) then
tmp = (x / t) * (1.0d0 / y)
else if (t <= 4.5d+31) then
tmp = x / (z * (z - y))
else
tmp = x / (t * (y - z))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -4e-46) {
tmp = (x / t) * (1.0 / y);
} else if (t <= 4.5e+31) {
tmp = x / (z * (z - y));
} else {
tmp = x / (t * (y - z));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -4e-46: tmp = (x / t) * (1.0 / y) elif t <= 4.5e+31: tmp = x / (z * (z - y)) else: tmp = x / (t * (y - z)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -4e-46) tmp = Float64(Float64(x / t) * Float64(1.0 / y)); elseif (t <= 4.5e+31) tmp = Float64(x / Float64(z * Float64(z - y))); else tmp = Float64(x / Float64(t * Float64(y - z))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -4e-46)
tmp = (x / t) * (1.0 / y);
elseif (t <= 4.5e+31)
tmp = x / (z * (z - y));
else
tmp = x / (t * (y - z));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -4e-46], N[(N[(x / t), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.5e+31], N[(x / N[(z * N[(z - y), $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}\;t \leq -4 \cdot 10^{-46}:\\
\;\;\;\;\frac{x}{t} \cdot \frac{1}{y}\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{+31}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\
\end{array}
\end{array}
if t < -4.00000000000000009e-46Initial program 85.5%
Taylor expanded in z around 0 49.6%
associate-/r*59.5%
div-inv59.6%
Applied egg-rr59.6%
if -4.00000000000000009e-46 < t < 4.4999999999999996e31Initial program 87.2%
Taylor expanded in t around 0 70.9%
mul-1-neg70.9%
distribute-rgt-neg-in70.9%
neg-sub070.9%
sub-neg70.9%
+-commutative70.9%
associate--r+70.9%
neg-sub070.9%
remove-double-neg70.9%
Simplified70.9%
if 4.4999999999999996e31 < t Initial program 87.5%
Taylor expanded in t around inf 87.0%
Final simplification70.5%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -2e-35) (not (<= z 9e+31))) (/ (/ x z) z) (/ (/ x t) y)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2e-35) || !(z <= 9e+31)) {
tmp = (x / z) / z;
} else {
tmp = (x / t) / y;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-2d-35)) .or. (.not. (z <= 9d+31))) then
tmp = (x / z) / z
else
tmp = (x / t) / y
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2e-35) || !(z <= 9e+31)) {
tmp = (x / z) / z;
} else {
tmp = (x / t) / y;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if (z <= -2e-35) or not (z <= 9e+31): tmp = (x / z) / z else: tmp = (x / t) / y return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -2e-35) || !(z <= 9e+31)) tmp = Float64(Float64(x / z) / z); else tmp = Float64(Float64(x / t) / y); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -2e-35) || ~((z <= 9e+31)))
tmp = (x / z) / z;
else
tmp = (x / t) / y;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -2e-35], N[Not[LessEqual[z, 9e+31]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{-35} \lor \neg \left(z \leq 9 \cdot 10^{+31}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -2.00000000000000002e-35 or 8.9999999999999992e31 < z Initial program 81.8%
Taylor expanded in t around 0 77.2%
mul-1-neg77.2%
associate-/r*88.2%
distribute-neg-frac288.2%
neg-sub088.2%
sub-neg88.2%
+-commutative88.2%
associate--r+88.2%
neg-sub088.2%
remove-double-neg88.2%
Simplified88.2%
Taylor expanded in z around inf 76.8%
if -2.00000000000000002e-35 < z < 8.9999999999999992e31Initial program 91.5%
associate-/l/95.0%
Simplified95.0%
Taylor expanded in t around inf 78.1%
Taylor expanded in y around inf 65.3%
Final simplification71.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 (or (<= z -5.5e+111) (not (<= z 9e+27))) (/ (/ x z) y) (/ (/ x t) y)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -5.5e+111) || !(z <= 9e+27)) {
tmp = (x / z) / y;
} else {
tmp = (x / t) / y;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-5.5d+111)) .or. (.not. (z <= 9d+27))) then
tmp = (x / z) / y
else
tmp = (x / t) / y
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -5.5e+111) || !(z <= 9e+27)) {
tmp = (x / z) / y;
} else {
tmp = (x / t) / y;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if (z <= -5.5e+111) or not (z <= 9e+27): tmp = (x / z) / y else: tmp = (x / t) / y return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -5.5e+111) || !(z <= 9e+27)) tmp = Float64(Float64(x / z) / y); else tmp = Float64(Float64(x / t) / y); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -5.5e+111) || ~((z <= 9e+27)))
tmp = (x / z) / y;
else
tmp = (x / t) / y;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -5.5e+111], N[Not[LessEqual[z, 9e+27]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{+111} \lor \neg \left(z \leq 9 \cdot 10^{+27}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -5.4999999999999998e111 or 8.9999999999999998e27 < z Initial program 79.9%
Taylor expanded in t around 0 79.7%
mul-1-neg79.7%
associate-/r*92.7%
distribute-neg-frac292.7%
neg-sub092.7%
sub-neg92.7%
+-commutative92.7%
associate--r+92.7%
neg-sub092.7%
remove-double-neg92.7%
Simplified92.7%
Taylor expanded in z around 0 48.8%
neg-mul-148.8%
Simplified48.8%
*-un-lft-identity48.8%
div-inv48.8%
frac-times36.7%
metadata-eval36.7%
div-inv36.7%
/-rgt-identity36.7%
add-sqr-sqrt19.0%
sqrt-unprod35.7%
sqr-neg35.7%
sqrt-unprod18.0%
add-sqr-sqrt36.2%
Applied egg-rr36.2%
*-lft-identity36.2%
associate-/r*44.5%
Simplified44.5%
if -5.4999999999999998e111 < z < 8.9999999999999998e27Initial program 91.1%
associate-/l/95.8%
Simplified95.8%
Taylor expanded in t around inf 71.0%
Taylor expanded in y around inf 57.2%
Final simplification52.2%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -4.9e+95) (not (<= z 2e+94))) (/ (/ 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 ((z <= -4.9e+95) || !(z <= 2e+94)) {
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 ((z <= (-4.9d+95)) .or. (.not. (z <= 2d+94))) 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 ((z <= -4.9e+95) || !(z <= 2e+94)) {
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 (z <= -4.9e+95) or not (z <= 2e+94): 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 ((z <= -4.9e+95) || !(z <= 2e+94)) tmp = Float64(Float64(x / 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 ((z <= -4.9e+95) || ~((z <= 2e+94)))
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[Or[LessEqual[z, -4.9e+95], N[Not[LessEqual[z, 2e+94]], $MachinePrecision]], N[(N[(x / z), $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}\;z \leq -4.9 \cdot 10^{+95} \lor \neg \left(z \leq 2 \cdot 10^{+94}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -4.8999999999999999e95 or 2e94 < z Initial program 82.5%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around inf 36.6%
Taylor expanded in y around 0 35.2%
neg-mul-135.2%
Simplified35.2%
*-un-lft-identity35.2%
associate-/l/34.7%
associate-/r*42.3%
add-sqr-sqrt24.5%
sqrt-unprod60.0%
sqr-neg60.0%
sqrt-unprod16.7%
add-sqr-sqrt39.6%
Applied egg-rr39.6%
*-lft-identity39.6%
Simplified39.6%
if -4.8999999999999999e95 < z < 2e94Initial program 89.2%
associate-/l/95.9%
Simplified95.9%
Taylor expanded in t around inf 71.1%
Taylor expanded in y around inf 56.7%
Final simplification50.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 (<= z -4e+94) (/ x (* t z)) (/ (/ x t) y)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4e+94) {
tmp = x / (t * z);
} else {
tmp = (x / t) / y;
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-4d+94)) then
tmp = x / (t * z)
else
tmp = (x / t) / y
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4e+94) {
tmp = x / (t * z);
} else {
tmp = (x / t) / y;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= -4e+94: tmp = x / (t * z) else: tmp = (x / t) / y return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -4e+94) tmp = Float64(x / Float64(t * z)); else tmp = Float64(Float64(x / t) / y); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (z <= -4e+94)
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[z, -4e+94], N[(x / N[(t * z), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+94}:\\
\;\;\;\;\frac{x}{t \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -4.0000000000000001e94Initial program 81.6%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around inf 35.7%
Taylor expanded in y around 0 35.6%
neg-mul-135.6%
Simplified35.6%
*-un-lft-identity35.6%
associate-/l/36.1%
associate-/r*42.6%
add-sqr-sqrt42.6%
sqrt-unprod60.2%
sqr-neg60.2%
sqrt-unprod0.0%
add-sqr-sqrt39.7%
Applied egg-rr39.7%
*-lft-identity39.7%
Simplified39.7%
Taylor expanded in x around 0 36.2%
*-commutative36.2%
Simplified36.2%
if -4.0000000000000001e94 < z Initial program 88.1%
associate-/l/96.7%
Simplified96.7%
Taylor expanded in t around inf 64.5%
Taylor expanded in y around inf 51.3%
Final simplification48.1%
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 -3.7e-55) (/ x (* t z)) (/ x (* t y))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.7e-55) {
tmp = x / (t * z);
} else {
tmp = x / (t * y);
}
return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-3.7d-55)) then
tmp = x / (t * z)
else
tmp = x / (t * y)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.7e-55) {
tmp = x / (t * z);
} else {
tmp = x / (t * y);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if z <= -3.7e-55: tmp = x / (t * z) else: tmp = x / (t * y) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -3.7e-55) tmp = Float64(x / Float64(t * z)); else tmp = Float64(x / Float64(t * y)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (z <= -3.7e-55)
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[z, -3.7e-55], N[(x / N[(t * z), $MachinePrecision]), $MachinePrecision], N[(x / N[(t * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.7 \cdot 10^{-55}:\\
\;\;\;\;\frac{x}{t \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t \cdot y}\\
\end{array}
\end{array}
if z < -3.69999999999999985e-55Initial program 84.4%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around inf 37.9%
Taylor expanded in y around 0 34.8%
neg-mul-134.8%
Simplified34.8%
*-un-lft-identity34.8%
associate-/l/33.9%
associate-/r*39.4%
add-sqr-sqrt39.4%
sqrt-unprod51.0%
sqr-neg51.0%
sqrt-unprod0.0%
add-sqr-sqrt30.8%
Applied egg-rr30.8%
*-lft-identity30.8%
Simplified30.8%
Taylor expanded in x around 0 28.5%
*-commutative28.5%
Simplified28.5%
if -3.69999999999999985e-55 < z Initial program 87.8%
Taylor expanded in z around 0 49.9%
Final simplification43.0%
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 86.7%
Taylor expanded in z around 0 39.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 2024167
(FPCore (x y z t)
:name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
:precision binary64
:alt
(! :herbie-platform default (if (< (/ x (* (- y z) (- t z))) 0) (/ (/ x (- y z)) (- t z)) (* x (/ 1 (* (- y z) (- t z))))))
(/ x (* (- y z) (- t z))))