
(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 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (/ x (* (- y z) (- t z))))
double code(double x, double y, double z, double t) {
return x / ((y - z) * (t - z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x / ((y - z) * (t - z))
end function
public static double code(double x, double y, double z, double t) {
return x / ((y - z) * (t - z));
}
def code(x, y, z, t): return x / ((y - z) * (t - z))
function code(x, y, z, t) return Float64(x / Float64(Float64(y - z) * Float64(t - z))) end
function tmp = code(x, y, z, t) tmp = x / ((y - z) * (t - z)); end
code[x_, y_, z_, t_] := N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}
\end{array}
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (let* ((t_1 (/ x (* (- y z) (- t z))))) (if (<= t_1 0.0) (/ (/ x (- t z)) (- y z)) t_1)))
assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = x / ((y - z) * (t - z));
double tmp;
if (t_1 <= 0.0) {
tmp = (x / (t - z)) / (y - z);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x / ((y - z) * (t - z))
if (t_1 <= 0.0d0) then
tmp = (x / (t - z)) / (y - z)
else
tmp = t_1
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double t_1 = x / ((y - z) * (t - z));
double tmp;
if (t_1 <= 0.0) {
tmp = (x / (t - z)) / (y - z);
} else {
tmp = t_1;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = x / ((y - z) * (t - z)) tmp = 0 if t_1 <= 0.0: tmp = (x / (t - z)) / (y - z) else: tmp = t_1 return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(x / Float64(Float64(y - z) * Float64(t - z))) tmp = 0.0 if (t_1 <= 0.0) tmp = Float64(Float64(x / Float64(t - z)) / Float64(y - z)); else tmp = t_1; end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = x / ((y - z) * (t - z));
tmp = 0.0;
if (t_1 <= 0.0)
tmp = (x / (t - z)) / (y - z);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], t$95$1]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\
\mathbf{if}\;t_1 \leq 0:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z))) < -0.0Initial program 83.1%
*-un-lft-identity83.1%
times-frac97.3%
Applied egg-rr97.3%
associate-*l/97.4%
*-un-lft-identity97.4%
Applied egg-rr97.4%
if -0.0 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z))) Initial program 99.2%
Final simplification98.0%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x y) t)) (t_2 (/ (/ x t) y)) (t_3 (/ (- x) (* z t))))
(if (<= t -5e-24)
t_2
(if (<= t 5e-121)
(/ (/ (- x) z) y)
(if (<= t 2.8e+88)
t_1
(if (<= t 1.5e+119)
t_3
(if (<= t 6.5e+149) t_1 (if (<= t 1.22e+243) t_3 t_2))))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / y) / t;
double t_2 = (x / t) / y;
double t_3 = -x / (z * t);
double tmp;
if (t <= -5e-24) {
tmp = t_2;
} else if (t <= 5e-121) {
tmp = (-x / z) / y;
} else if (t <= 2.8e+88) {
tmp = t_1;
} else if (t <= 1.5e+119) {
tmp = t_3;
} else if (t <= 6.5e+149) {
tmp = t_1;
} else if (t <= 1.22e+243) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (x / y) / t
t_2 = (x / t) / y
t_3 = -x / (z * t)
if (t <= (-5d-24)) then
tmp = t_2
else if (t <= 5d-121) then
tmp = (-x / z) / y
else if (t <= 2.8d+88) then
tmp = t_1
else if (t <= 1.5d+119) then
tmp = t_3
else if (t <= 6.5d+149) then
tmp = t_1
else if (t <= 1.22d+243) then
tmp = t_3
else
tmp = t_2
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / y) / t;
double t_2 = (x / t) / y;
double t_3 = -x / (z * t);
double tmp;
if (t <= -5e-24) {
tmp = t_2;
} else if (t <= 5e-121) {
tmp = (-x / z) / y;
} else if (t <= 2.8e+88) {
tmp = t_1;
} else if (t <= 1.5e+119) {
tmp = t_3;
} else if (t <= 6.5e+149) {
tmp = t_1;
} else if (t <= 1.22e+243) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = (x / y) / t t_2 = (x / t) / y t_3 = -x / (z * t) tmp = 0 if t <= -5e-24: tmp = t_2 elif t <= 5e-121: tmp = (-x / z) / y elif t <= 2.8e+88: tmp = t_1 elif t <= 1.5e+119: tmp = t_3 elif t <= 6.5e+149: tmp = t_1 elif t <= 1.22e+243: tmp = t_3 else: tmp = t_2 return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / y) / t) t_2 = Float64(Float64(x / t) / y) t_3 = Float64(Float64(-x) / Float64(z * t)) tmp = 0.0 if (t <= -5e-24) tmp = t_2; elseif (t <= 5e-121) tmp = Float64(Float64(Float64(-x) / z) / y); elseif (t <= 2.8e+88) tmp = t_1; elseif (t <= 1.5e+119) tmp = t_3; elseif (t <= 6.5e+149) tmp = t_1; elseif (t <= 1.22e+243) tmp = t_3; else tmp = t_2; end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / y) / t;
t_2 = (x / t) / y;
t_3 = -x / (z * t);
tmp = 0.0;
if (t <= -5e-24)
tmp = t_2;
elseif (t <= 5e-121)
tmp = (-x / z) / y;
elseif (t <= 2.8e+88)
tmp = t_1;
elseif (t <= 1.5e+119)
tmp = t_3;
elseif (t <= 6.5e+149)
tmp = t_1;
elseif (t <= 1.22e+243)
tmp = t_3;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$3 = N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5e-24], t$95$2, If[LessEqual[t, 5e-121], N[(N[((-x) / z), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 2.8e+88], t$95$1, If[LessEqual[t, 1.5e+119], t$95$3, If[LessEqual[t, 6.5e+149], t$95$1, If[LessEqual[t, 1.22e+243], t$95$3, t$95$2]]]]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{y}}{t}\\
t_2 := \frac{\frac{x}{t}}{y}\\
t_3 := \frac{-x}{z \cdot t}\\
\mathbf{if}\;t \leq -5 \cdot 10^{-24}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-121}:\\
\;\;\;\;\frac{\frac{-x}{z}}{y}\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+88}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{+119}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{+149}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.22 \cdot 10^{+243}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -4.9999999999999998e-24 or 1.21999999999999993e243 < t Initial program 83.7%
Taylor expanded in y around inf 64.3%
*-commutative64.3%
associate-/r*73.5%
Simplified73.5%
Taylor expanded in t around inf 68.5%
if -4.9999999999999998e-24 < t < 4.99999999999999989e-121Initial program 90.9%
Taylor expanded in y around inf 59.1%
*-commutative59.1%
associate-/r*65.0%
Simplified65.0%
Taylor expanded in t around 0 50.3%
associate-*r/50.3%
neg-mul-150.3%
Simplified50.3%
if 4.99999999999999989e-121 < t < 2.79999999999999989e88 or 1.50000000000000001e119 < t < 6.50000000000000015e149Initial program 92.7%
Taylor expanded in z around 0 50.5%
*-un-lft-identity50.5%
times-frac52.0%
Applied egg-rr52.0%
associate-*l/52.2%
*-un-lft-identity52.2%
Applied egg-rr52.2%
if 2.79999999999999989e88 < t < 1.50000000000000001e119 or 6.50000000000000015e149 < t < 1.21999999999999993e243Initial program 80.6%
Taylor expanded in y around 0 61.0%
associate-*r/61.0%
neg-mul-161.0%
Simplified61.0%
Taylor expanded in z around 0 61.0%
associate-*r/61.0%
neg-mul-161.0%
Simplified61.0%
Final simplification57.1%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x y) t)) (t_2 (/ (- x) (* z t))))
(if (<= t -2.1e-23)
(/ 1.0 (* y (/ t x)))
(if (<= t 5.3e-121)
(/ (/ (- x) z) y)
(if (<= t 1.5e+88)
t_1
(if (<= t 1.1e+112)
t_2
(if (<= t 7.2e+149)
t_1
(if (<= t 1.22e+243) t_2 (/ (/ x t) y)))))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / y) / t;
double t_2 = -x / (z * t);
double tmp;
if (t <= -2.1e-23) {
tmp = 1.0 / (y * (t / x));
} else if (t <= 5.3e-121) {
tmp = (-x / z) / y;
} else if (t <= 1.5e+88) {
tmp = t_1;
} else if (t <= 1.1e+112) {
tmp = t_2;
} else if (t <= 7.2e+149) {
tmp = t_1;
} else if (t <= 1.22e+243) {
tmp = t_2;
} else {
tmp = (x / t) / y;
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x / y) / t
t_2 = -x / (z * t)
if (t <= (-2.1d-23)) then
tmp = 1.0d0 / (y * (t / x))
else if (t <= 5.3d-121) then
tmp = (-x / z) / y
else if (t <= 1.5d+88) then
tmp = t_1
else if (t <= 1.1d+112) then
tmp = t_2
else if (t <= 7.2d+149) then
tmp = t_1
else if (t <= 1.22d+243) then
tmp = t_2
else
tmp = (x / t) / y
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / y) / t;
double t_2 = -x / (z * t);
double tmp;
if (t <= -2.1e-23) {
tmp = 1.0 / (y * (t / x));
} else if (t <= 5.3e-121) {
tmp = (-x / z) / y;
} else if (t <= 1.5e+88) {
tmp = t_1;
} else if (t <= 1.1e+112) {
tmp = t_2;
} else if (t <= 7.2e+149) {
tmp = t_1;
} else if (t <= 1.22e+243) {
tmp = t_2;
} else {
tmp = (x / t) / y;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = (x / y) / t t_2 = -x / (z * t) tmp = 0 if t <= -2.1e-23: tmp = 1.0 / (y * (t / x)) elif t <= 5.3e-121: tmp = (-x / z) / y elif t <= 1.5e+88: tmp = t_1 elif t <= 1.1e+112: tmp = t_2 elif t <= 7.2e+149: tmp = t_1 elif t <= 1.22e+243: tmp = t_2 else: tmp = (x / t) / y return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / y) / t) t_2 = Float64(Float64(-x) / Float64(z * t)) tmp = 0.0 if (t <= -2.1e-23) tmp = Float64(1.0 / Float64(y * Float64(t / x))); elseif (t <= 5.3e-121) tmp = Float64(Float64(Float64(-x) / z) / y); elseif (t <= 1.5e+88) tmp = t_1; elseif (t <= 1.1e+112) tmp = t_2; elseif (t <= 7.2e+149) tmp = t_1; elseif (t <= 1.22e+243) tmp = t_2; else tmp = Float64(Float64(x / t) / y); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / y) / t;
t_2 = -x / (z * t);
tmp = 0.0;
if (t <= -2.1e-23)
tmp = 1.0 / (y * (t / x));
elseif (t <= 5.3e-121)
tmp = (-x / z) / y;
elseif (t <= 1.5e+88)
tmp = t_1;
elseif (t <= 1.1e+112)
tmp = t_2;
elseif (t <= 7.2e+149)
tmp = t_1;
elseif (t <= 1.22e+243)
tmp = t_2;
else
tmp = (x / t) / y;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.1e-23], N[(1.0 / N[(y * N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.3e-121], N[(N[((-x) / z), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 1.5e+88], t$95$1, If[LessEqual[t, 1.1e+112], t$95$2, If[LessEqual[t, 7.2e+149], t$95$1, If[LessEqual[t, 1.22e+243], t$95$2, N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{y}}{t}\\
t_2 := \frac{-x}{z \cdot t}\\
\mathbf{if}\;t \leq -2.1 \cdot 10^{-23}:\\
\;\;\;\;\frac{1}{y \cdot \frac{t}{x}}\\
\mathbf{elif}\;t \leq 5.3 \cdot 10^{-121}:\\
\;\;\;\;\frac{\frac{-x}{z}}{y}\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{+88}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+112}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{+149}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.22 \cdot 10^{+243}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if t < -2.1000000000000001e-23Initial program 85.9%
Taylor expanded in z around 0 60.3%
clear-num60.2%
inv-pow60.2%
associate-/l*61.8%
Applied egg-rr61.8%
unpow-161.8%
associate-/r/68.2%
Simplified68.2%
if -2.1000000000000001e-23 < t < 5.2999999999999996e-121Initial program 90.9%
Taylor expanded in y around inf 59.1%
*-commutative59.1%
associate-/r*65.0%
Simplified65.0%
Taylor expanded in t around 0 50.3%
associate-*r/50.3%
neg-mul-150.3%
Simplified50.3%
if 5.2999999999999996e-121 < t < 1.50000000000000003e88 or 1.1e112 < t < 7.1999999999999999e149Initial program 92.7%
Taylor expanded in z around 0 50.5%
*-un-lft-identity50.5%
times-frac52.0%
Applied egg-rr52.0%
associate-*l/52.2%
*-un-lft-identity52.2%
Applied egg-rr52.2%
if 1.50000000000000003e88 < t < 1.1e112 or 7.1999999999999999e149 < t < 1.21999999999999993e243Initial program 80.6%
Taylor expanded in y around 0 61.0%
associate-*r/61.0%
neg-mul-161.0%
Simplified61.0%
Taylor expanded in z around 0 61.0%
associate-*r/61.0%
neg-mul-161.0%
Simplified61.0%
if 1.21999999999999993e243 < t Initial program 75.1%
Taylor expanded in y around inf 55.4%
*-commutative55.4%
associate-/r*68.1%
Simplified68.1%
Taylor expanded in t around inf 68.1%
Final simplification57.0%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= t -4.8e-87)
(/ (/ x (- t z)) y)
(if (<= t 5.5e-121)
(/ (/ (- x) z) (- y z))
(if (<= t 4e-35)
(/ (/ (- x) (- t z)) z)
(if (<= t 1.8e-21) (/ (- x) (* z (- y z))) (/ (/ x t) (- y z)))))))assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -4.8e-87) {
tmp = (x / (t - z)) / y;
} else if (t <= 5.5e-121) {
tmp = (-x / z) / (y - z);
} else if (t <= 4e-35) {
tmp = (-x / (t - z)) / z;
} else if (t <= 1.8e-21) {
tmp = -x / (z * (y - z));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-4.8d-87)) then
tmp = (x / (t - z)) / y
else if (t <= 5.5d-121) then
tmp = (-x / z) / (y - z)
else if (t <= 4d-35) then
tmp = (-x / (t - z)) / z
else if (t <= 1.8d-21) then
tmp = -x / (z * (y - z))
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -4.8e-87) {
tmp = (x / (t - z)) / y;
} else if (t <= 5.5e-121) {
tmp = (-x / z) / (y - z);
} else if (t <= 4e-35) {
tmp = (-x / (t - z)) / z;
} else if (t <= 1.8e-21) {
tmp = -x / (z * (y - z));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if t <= -4.8e-87: tmp = (x / (t - z)) / y elif t <= 5.5e-121: tmp = (-x / z) / (y - z) elif t <= 4e-35: tmp = (-x / (t - z)) / z elif t <= 1.8e-21: tmp = -x / (z * (y - z)) else: tmp = (x / t) / (y - z) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -4.8e-87) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (t <= 5.5e-121) tmp = Float64(Float64(Float64(-x) / z) / Float64(y - z)); elseif (t <= 4e-35) tmp = Float64(Float64(Float64(-x) / Float64(t - z)) / z); elseif (t <= 1.8e-21) tmp = Float64(Float64(-x) / Float64(z * Float64(y - z))); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -4.8e-87)
tmp = (x / (t - z)) / y;
elseif (t <= 5.5e-121)
tmp = (-x / z) / (y - z);
elseif (t <= 4e-35)
tmp = (-x / (t - z)) / z;
elseif (t <= 1.8e-21)
tmp = -x / (z * (y - z));
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -4.8e-87], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 5.5e-121], N[(N[((-x) / z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4e-35], N[(N[((-x) / N[(t - z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t, 1.8e-21], N[((-x) / N[(z * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{-87}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{-121}:\\
\;\;\;\;\frac{\frac{-x}{z}}{y - z}\\
\mathbf{elif}\;t \leq 4 \cdot 10^{-35}:\\
\;\;\;\;\frac{\frac{-x}{t - z}}{z}\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{-21}:\\
\;\;\;\;\frac{-x}{z \cdot \left(y - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -4.7999999999999999e-87Initial program 88.7%
Taylor expanded in y around inf 69.6%
*-commutative69.6%
associate-/r*77.4%
Simplified77.4%
if -4.7999999999999999e-87 < t < 5.50000000000000031e-121Initial program 89.4%
*-un-lft-identity89.4%
times-frac96.5%
Applied egg-rr96.5%
associate-*l/96.6%
*-un-lft-identity96.6%
Applied egg-rr96.6%
Taylor expanded in t around 0 85.8%
associate-*r/50.4%
neg-mul-150.4%
Simplified85.8%
if 5.50000000000000031e-121 < t < 4.00000000000000003e-35Initial program 94.1%
*-un-lft-identity94.1%
times-frac94.1%
Applied egg-rr94.1%
clear-num94.1%
un-div-inv94.2%
Applied egg-rr94.2%
clear-num94.3%
associate-/r/94.0%
Applied egg-rr94.0%
Taylor expanded in y around 0 66.1%
mul-1-neg66.1%
associate-/l/71.7%
distribute-neg-frac71.7%
distribute-neg-frac71.7%
Simplified71.7%
if 4.00000000000000003e-35 < t < 1.79999999999999995e-21Initial program 100.0%
Taylor expanded in t around 0 100.0%
associate-*r/100.0%
neg-mul-1100.0%
Simplified100.0%
if 1.79999999999999995e-21 < t Initial program 84.1%
*-un-lft-identity84.1%
times-frac98.4%
Applied egg-rr98.4%
associate-*l/98.5%
*-un-lft-identity98.5%
Applied egg-rr98.5%
Taylor expanded in t around inf 85.1%
Final simplification82.4%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= y -4.2e+22)
(/ (/ x y) t)
(if (<= y -1.8e-22)
(/ (- x) (* y z))
(if (<= y -9e-201)
(/ x (* y t))
(if (<= y 6.8e-103) (/ (- x) (* z t)) (/ (/ x t) y))))))assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.2e+22) {
tmp = (x / y) / t;
} else if (y <= -1.8e-22) {
tmp = -x / (y * z);
} else if (y <= -9e-201) {
tmp = x / (y * t);
} else if (y <= 6.8e-103) {
tmp = -x / (z * t);
} else {
tmp = (x / t) / y;
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-4.2d+22)) then
tmp = (x / y) / t
else if (y <= (-1.8d-22)) then
tmp = -x / (y * z)
else if (y <= (-9d-201)) then
tmp = x / (y * t)
else if (y <= 6.8d-103) then
tmp = -x / (z * t)
else
tmp = (x / t) / y
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.2e+22) {
tmp = (x / y) / t;
} else if (y <= -1.8e-22) {
tmp = -x / (y * z);
} else if (y <= -9e-201) {
tmp = x / (y * t);
} else if (y <= 6.8e-103) {
tmp = -x / (z * t);
} else {
tmp = (x / t) / y;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if y <= -4.2e+22: tmp = (x / y) / t elif y <= -1.8e-22: tmp = -x / (y * z) elif y <= -9e-201: tmp = x / (y * t) elif y <= 6.8e-103: tmp = -x / (z * t) else: tmp = (x / t) / y return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -4.2e+22) tmp = Float64(Float64(x / y) / t); elseif (y <= -1.8e-22) tmp = Float64(Float64(-x) / Float64(y * z)); elseif (y <= -9e-201) tmp = Float64(x / Float64(y * t)); elseif (y <= 6.8e-103) tmp = Float64(Float64(-x) / Float64(z * t)); else tmp = Float64(Float64(x / t) / y); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -4.2e+22)
tmp = (x / y) / t;
elseif (y <= -1.8e-22)
tmp = -x / (y * z);
elseif (y <= -9e-201)
tmp = x / (y * t);
elseif (y <= 6.8e-103)
tmp = -x / (z * t);
else
tmp = (x / t) / y;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -4.2e+22], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[y, -1.8e-22], N[((-x) / N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -9e-201], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.8e-103], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{+22}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;y \leq -1.8 \cdot 10^{-22}:\\
\;\;\;\;\frac{-x}{y \cdot z}\\
\mathbf{elif}\;y \leq -9 \cdot 10^{-201}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{-103}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if y < -4.1999999999999996e22Initial program 88.2%
Taylor expanded in z around 0 54.2%
*-un-lft-identity54.2%
times-frac63.8%
Applied egg-rr63.8%
associate-*l/63.8%
*-un-lft-identity63.8%
Applied egg-rr63.8%
if -4.1999999999999996e22 < y < -1.7999999999999999e-22Initial program 88.1%
Taylor expanded in y around inf 65.6%
*-commutative65.6%
associate-/r*65.4%
Simplified65.4%
Taylor expanded in t around 0 40.1%
associate-*r/40.1%
neg-mul-140.1%
*-commutative40.1%
Simplified40.1%
if -1.7999999999999999e-22 < y < -9.0000000000000004e-201Initial program 88.6%
Taylor expanded in z around 0 35.9%
if -9.0000000000000004e-201 < y < 6.80000000000000006e-103Initial program 90.4%
Taylor expanded in y around 0 82.5%
associate-*r/82.5%
neg-mul-182.5%
Simplified82.5%
Taylor expanded in z around 0 46.6%
associate-*r/46.6%
neg-mul-146.6%
Simplified46.6%
if 6.80000000000000006e-103 < y Initial program 85.8%
Taylor expanded in y around inf 77.8%
*-commutative77.8%
associate-/r*83.8%
Simplified83.8%
Taylor expanded in t around inf 56.1%
Final simplification51.1%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= z -3.8e+131) (/ (/ (- x) z) (- y z)) (if (<= z 1.3e+32) (/ x (* (- y z) (- t z))) (/ (/ (- x) (- t z)) z))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.8e+131) {
tmp = (-x / z) / (y - z);
} else if (z <= 1.3e+32) {
tmp = x / ((y - z) * (t - z));
} else {
tmp = (-x / (t - z)) / z;
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-3.8d+131)) then
tmp = (-x / z) / (y - z)
else if (z <= 1.3d+32) then
tmp = x / ((y - z) * (t - z))
else
tmp = (-x / (t - z)) / z
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.8e+131) {
tmp = (-x / z) / (y - z);
} else if (z <= 1.3e+32) {
tmp = x / ((y - z) * (t - z));
} else {
tmp = (-x / (t - z)) / z;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if z <= -3.8e+131: tmp = (-x / z) / (y - z) elif z <= 1.3e+32: tmp = x / ((y - z) * (t - z)) else: tmp = (-x / (t - z)) / z return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (z <= -3.8e+131) tmp = Float64(Float64(Float64(-x) / z) / Float64(y - z)); elseif (z <= 1.3e+32) tmp = Float64(x / Float64(Float64(y - z) * Float64(t - z))); else tmp = Float64(Float64(Float64(-x) / Float64(t - z)) / z); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (z <= -3.8e+131)
tmp = (-x / z) / (y - z);
elseif (z <= 1.3e+32)
tmp = x / ((y - z) * (t - z));
else
tmp = (-x / (t - z)) / z;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[z, -3.8e+131], N[(N[((-x) / z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e+32], N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-x) / N[(t - z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+131}:\\
\;\;\;\;\frac{\frac{-x}{z}}{y - z}\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{+32}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{-x}{t - z}}{z}\\
\end{array}
\end{array}
if z < -3.8000000000000004e131Initial program 70.1%
*-un-lft-identity70.1%
times-frac99.8%
Applied egg-rr99.8%
associate-*l/99.8%
*-un-lft-identity99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 89.9%
associate-*r/62.5%
neg-mul-162.5%
Simplified89.9%
if -3.8000000000000004e131 < z < 1.3000000000000001e32Initial program 95.4%
if 1.3000000000000001e32 < z Initial program 74.1%
*-un-lft-identity74.1%
times-frac99.8%
Applied egg-rr99.8%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr99.7%
clear-num99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around 0 72.1%
mul-1-neg72.1%
associate-/l/90.9%
distribute-neg-frac90.9%
distribute-neg-frac90.9%
Simplified90.9%
Final simplification93.8%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y -2e-73) (/ (/ x (- t z)) y) (if (<= y 7.2e-105) (/ (- x) (* z (- t z))) (/ (/ x t) (- y z)))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2e-73) {
tmp = (x / (t - z)) / y;
} else if (y <= 7.2e-105) {
tmp = -x / (z * (t - z));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-2d-73)) then
tmp = (x / (t - z)) / y
else if (y <= 7.2d-105) then
tmp = -x / (z * (t - z))
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2e-73) {
tmp = (x / (t - z)) / y;
} else if (y <= 7.2e-105) {
tmp = -x / (z * (t - z));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if y <= -2e-73: tmp = (x / (t - z)) / y elif y <= 7.2e-105: tmp = -x / (z * (t - z)) else: tmp = (x / t) / (y - z) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -2e-73) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (y <= 7.2e-105) tmp = Float64(Float64(-x) / Float64(z * Float64(t - z))); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -2e-73)
tmp = (x / (t - z)) / y;
elseif (y <= 7.2e-105)
tmp = -x / (z * (t - z));
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -2e-73], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 7.2e-105], N[((-x) / N[(z * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{-73}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{-105}:\\
\;\;\;\;\frac{-x}{z \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -1.99999999999999999e-73Initial program 88.7%
Taylor expanded in y around inf 78.0%
*-commutative78.0%
associate-/r*82.3%
Simplified82.3%
if -1.99999999999999999e-73 < y < 7.19999999999999929e-105Initial program 89.3%
Taylor expanded in y around 0 77.3%
associate-*r/77.3%
neg-mul-177.3%
Simplified77.3%
if 7.19999999999999929e-105 < y Initial program 85.8%
*-un-lft-identity85.8%
times-frac95.2%
Applied egg-rr95.2%
associate-*l/95.4%
*-un-lft-identity95.4%
Applied egg-rr95.4%
Taylor expanded in t around inf 58.8%
Final simplification73.3%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t -2.05e-86) (/ (/ x (- t z)) y) (if (<= t 9.6e-22) (/ (/ (- x) z) (- y z)) (/ (/ x t) (- y z)))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2.05e-86) {
tmp = (x / (t - z)) / y;
} else if (t <= 9.6e-22) {
tmp = (-x / z) / (y - z);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-2.05d-86)) then
tmp = (x / (t - z)) / y
else if (t <= 9.6d-22) then
tmp = (-x / z) / (y - z)
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2.05e-86) {
tmp = (x / (t - z)) / y;
} else if (t <= 9.6e-22) {
tmp = (-x / z) / (y - z);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if t <= -2.05e-86: tmp = (x / (t - z)) / y elif t <= 9.6e-22: tmp = (-x / z) / (y - z) else: tmp = (x / t) / (y - z) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -2.05e-86) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (t <= 9.6e-22) tmp = Float64(Float64(Float64(-x) / z) / Float64(y - z)); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -2.05e-86)
tmp = (x / (t - z)) / y;
elseif (t <= 9.6e-22)
tmp = (-x / z) / (y - z);
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -2.05e-86], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 9.6e-22], N[(N[((-x) / z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.05 \cdot 10^{-86}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;t \leq 9.6 \cdot 10^{-22}:\\
\;\;\;\;\frac{\frac{-x}{z}}{y - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -2.0499999999999999e-86Initial program 88.7%
Taylor expanded in y around inf 69.6%
*-commutative69.6%
associate-/r*77.4%
Simplified77.4%
if -2.0499999999999999e-86 < t < 9.60000000000000009e-22Initial program 90.4%
*-un-lft-identity90.4%
times-frac96.2%
Applied egg-rr96.2%
associate-*l/96.3%
*-un-lft-identity96.3%
Applied egg-rr96.3%
Taylor expanded in t around 0 82.6%
associate-*r/45.9%
neg-mul-145.9%
Simplified82.6%
if 9.60000000000000009e-22 < t Initial program 84.1%
*-un-lft-identity84.1%
times-frac98.4%
Applied egg-rr98.4%
associate-*l/98.5%
*-un-lft-identity98.5%
Applied egg-rr98.5%
Taylor expanded in t around inf 85.1%
Final simplification81.8%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t -4.8e-22) (/ 1.0 (* y (/ t x))) (if (<= t 5.5e-121) (/ (/ (- x) z) y) (/ x (* (- y z) t)))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -4.8e-22) {
tmp = 1.0 / (y * (t / x));
} else if (t <= 5.5e-121) {
tmp = (-x / z) / y;
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-4.8d-22)) then
tmp = 1.0d0 / (y * (t / x))
else if (t <= 5.5d-121) then
tmp = (-x / z) / y
else
tmp = x / ((y - z) * t)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -4.8e-22) {
tmp = 1.0 / (y * (t / x));
} else if (t <= 5.5e-121) {
tmp = (-x / z) / y;
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if t <= -4.8e-22: tmp = 1.0 / (y * (t / x)) elif t <= 5.5e-121: tmp = (-x / z) / y else: tmp = x / ((y - z) * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -4.8e-22) tmp = Float64(1.0 / Float64(y * Float64(t / x))); elseif (t <= 5.5e-121) tmp = Float64(Float64(Float64(-x) / z) / y); else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -4.8e-22)
tmp = 1.0 / (y * (t / x));
elseif (t <= 5.5e-121)
tmp = (-x / z) / y;
else
tmp = x / ((y - z) * t);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -4.8e-22], N[(1.0 / N[(y * N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.5e-121], N[(N[((-x) / z), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{-22}:\\
\;\;\;\;\frac{1}{y \cdot \frac{t}{x}}\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{-121}:\\
\;\;\;\;\frac{\frac{-x}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < -4.80000000000000005e-22Initial program 85.9%
Taylor expanded in z around 0 60.3%
clear-num60.2%
inv-pow60.2%
associate-/l*61.8%
Applied egg-rr61.8%
unpow-161.8%
associate-/r/68.2%
Simplified68.2%
if -4.80000000000000005e-22 < t < 5.50000000000000031e-121Initial program 90.9%
Taylor expanded in y around inf 59.1%
*-commutative59.1%
associate-/r*65.0%
Simplified65.0%
Taylor expanded in t around 0 50.3%
associate-*r/50.3%
neg-mul-150.3%
Simplified50.3%
if 5.50000000000000031e-121 < t Initial program 86.2%
Taylor expanded in t around inf 69.4%
Final simplification61.4%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y -2.8e-200) (/ (/ x y) t) (if (<= y 2.1e-104) (/ (- x) (* z t)) (/ (/ x t) y))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.8e-200) {
tmp = (x / y) / t;
} else if (y <= 2.1e-104) {
tmp = -x / (z * t);
} else {
tmp = (x / t) / y;
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-2.8d-200)) then
tmp = (x / y) / t
else if (y <= 2.1d-104) then
tmp = -x / (z * t)
else
tmp = (x / t) / y
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.8e-200) {
tmp = (x / y) / t;
} else if (y <= 2.1e-104) {
tmp = -x / (z * t);
} else {
tmp = (x / t) / y;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if y <= -2.8e-200: tmp = (x / y) / t elif y <= 2.1e-104: tmp = -x / (z * t) else: tmp = (x / t) / y return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -2.8e-200) tmp = Float64(Float64(x / y) / t); elseif (y <= 2.1e-104) tmp = Float64(Float64(-x) / Float64(z * t)); else tmp = Float64(Float64(x / t) / y); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -2.8e-200)
tmp = (x / y) / t;
elseif (y <= 2.1e-104)
tmp = -x / (z * t);
else
tmp = (x / t) / y;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -2.8e-200], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[y, 2.1e-104], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{-200}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{-104}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if y < -2.80000000000000007e-200Initial program 88.3%
Taylor expanded in z around 0 45.5%
*-un-lft-identity45.5%
times-frac48.9%
Applied egg-rr48.9%
associate-*l/48.9%
*-un-lft-identity48.9%
Applied egg-rr48.9%
if -2.80000000000000007e-200 < y < 2.09999999999999999e-104Initial program 90.4%
Taylor expanded in y around 0 82.5%
associate-*r/82.5%
neg-mul-182.5%
Simplified82.5%
Taylor expanded in z around 0 46.6%
associate-*r/46.6%
neg-mul-146.6%
Simplified46.6%
if 2.09999999999999999e-104 < y Initial program 85.8%
Taylor expanded in y around inf 77.8%
*-commutative77.8%
associate-/r*83.8%
Simplified83.8%
Taylor expanded in t around inf 56.1%
Final simplification50.6%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -4.5e+53) (not (<= z 9.5e+73))) (/ x (* y z)) (/ x (* y t))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4.5e+53) || !(z <= 9.5e+73)) {
tmp = x / (y * z);
} else {
tmp = x / (y * t);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-4.5d+53)) .or. (.not. (z <= 9.5d+73))) then
tmp = x / (y * z)
else
tmp = x / (y * t)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4.5e+53) || !(z <= 9.5e+73)) {
tmp = x / (y * z);
} else {
tmp = x / (y * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -4.5e+53) or not (z <= 9.5e+73): tmp = x / (y * z) else: tmp = x / (y * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -4.5e+53) || !(z <= 9.5e+73)) tmp = Float64(x / Float64(y * z)); else tmp = Float64(x / Float64(y * t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -4.5e+53) || ~((z <= 9.5e+73)))
tmp = x / (y * z);
else
tmp = x / (y * t);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -4.5e+53], N[Not[LessEqual[z, 9.5e+73]], $MachinePrecision]], N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+53} \lor \neg \left(z \leq 9.5 \cdot 10^{+73}\right):\\
\;\;\;\;\frac{x}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -4.5000000000000002e53 or 9.4999999999999996e73 < z Initial program 77.4%
Taylor expanded in y around inf 40.5%
*-commutative40.5%
associate-/r*56.7%
Simplified56.7%
Taylor expanded in t around 0 51.2%
associate-*r/51.2%
neg-mul-151.2%
Simplified51.2%
expm1-log1p-u50.8%
expm1-udef58.5%
associate-/l/58.5%
add-sqr-sqrt24.5%
sqrt-unprod56.1%
sqr-neg56.1%
sqrt-unprod34.2%
add-sqr-sqrt58.7%
Applied egg-rr58.7%
expm1-def36.5%
expm1-log1p36.9%
*-commutative36.9%
Simplified36.9%
if -4.5000000000000002e53 < z < 9.4999999999999996e73Initial program 94.0%
Taylor expanded in z around 0 52.5%
Final simplification46.9%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -5.8e+53) (not (<= z 9.5e+88))) (/ x (* y z)) (/ (/ x t) y)))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -5.8e+53) || !(z <= 9.5e+88)) {
tmp = x / (y * z);
} else {
tmp = (x / t) / y;
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-5.8d+53)) .or. (.not. (z <= 9.5d+88))) then
tmp = x / (y * z)
else
tmp = (x / t) / y
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -5.8e+53) || !(z <= 9.5e+88)) {
tmp = x / (y * z);
} else {
tmp = (x / t) / y;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -5.8e+53) or not (z <= 9.5e+88): tmp = x / (y * z) else: tmp = (x / t) / y return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -5.8e+53) || !(z <= 9.5e+88)) tmp = Float64(x / Float64(y * z)); else tmp = Float64(Float64(x / t) / y); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -5.8e+53) || ~((z <= 9.5e+88)))
tmp = x / (y * z);
else
tmp = (x / t) / y;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -5.8e+53], N[Not[LessEqual[z, 9.5e+88]], $MachinePrecision]], N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{+53} \lor \neg \left(z \leq 9.5 \cdot 10^{+88}\right):\\
\;\;\;\;\frac{x}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -5.8000000000000004e53 or 9.50000000000000059e88 < z Initial program 78.8%
Taylor expanded in y around inf 41.7%
*-commutative41.7%
associate-/r*56.3%
Simplified56.3%
Taylor expanded in t around 0 52.8%
associate-*r/52.8%
neg-mul-152.8%
Simplified52.8%
expm1-log1p-u52.4%
expm1-udef60.4%
associate-/l/60.4%
add-sqr-sqrt25.3%
sqrt-unprod57.8%
sqr-neg57.8%
sqrt-unprod35.2%
add-sqr-sqrt60.5%
Applied egg-rr60.5%
expm1-def37.6%
expm1-log1p37.9%
*-commutative37.9%
Simplified37.9%
if -5.8000000000000004e53 < z < 9.50000000000000059e88Initial program 93.0%
Taylor expanded in y around inf 66.4%
*-commutative66.4%
associate-/r*69.5%
Simplified69.5%
Taylor expanded in t around inf 54.7%
Final simplification48.9%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t 3.7e-94) (/ x (* y (- t z))) (/ x (* (- y z) t))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 3.7e-94) {
tmp = x / (y * (t - z));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= 3.7d-94) then
tmp = x / (y * (t - z))
else
tmp = x / ((y - z) * t)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= 3.7e-94) {
tmp = x / (y * (t - z));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if t <= 3.7e-94: tmp = x / (y * (t - z)) else: tmp = x / ((y - z) * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (t <= 3.7e-94) tmp = Float64(x / Float64(y * Float64(t - z))); else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= 3.7e-94)
tmp = x / (y * (t - z));
else
tmp = x / ((y - z) * t);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, 3.7e-94], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.7 \cdot 10^{-94}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < 3.6999999999999998e-94Initial program 88.9%
Taylor expanded in y around inf 61.4%
*-commutative61.4%
Simplified61.4%
if 3.6999999999999998e-94 < t Initial program 86.3%
Taylor expanded in t around inf 71.6%
Final simplification65.0%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t 4.8e-94) (/ x (* y (- t z))) (/ (/ x t) (- y z))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 4.8e-94) {
tmp = x / (y * (t - z));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= 4.8d-94) then
tmp = x / (y * (t - z))
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= 4.8e-94) {
tmp = x / (y * (t - z));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if t <= 4.8e-94: tmp = x / (y * (t - z)) else: tmp = (x / t) / (y - z) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (t <= 4.8e-94) tmp = Float64(x / Float64(y * Float64(t - z))); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= 4.8e-94)
tmp = x / (y * (t - z));
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, 4.8e-94], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 4.8 \cdot 10^{-94}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < 4.8e-94Initial program 88.9%
Taylor expanded in y around inf 61.4%
*-commutative61.4%
Simplified61.4%
if 4.8e-94 < t Initial program 86.3%
*-un-lft-identity86.3%
times-frac97.5%
Applied egg-rr97.5%
associate-*l/97.6%
*-un-lft-identity97.6%
Applied egg-rr97.6%
Taylor expanded in t around inf 77.1%
Final simplification66.9%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t 5.5e-94) (/ (/ x (- t z)) y) (/ (/ x t) (- y z))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 5.5e-94) {
tmp = (x / (t - z)) / y;
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= 5.5d-94) then
tmp = (x / (t - z)) / y
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= 5.5e-94) {
tmp = (x / (t - z)) / y;
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if t <= 5.5e-94: tmp = (x / (t - z)) / y else: tmp = (x / t) / (y - z) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (t <= 5.5e-94) tmp = Float64(Float64(x / Float64(t - z)) / y); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= 5.5e-94)
tmp = (x / (t - z)) / y;
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, 5.5e-94], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 5.5 \cdot 10^{-94}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < 5.49999999999999989e-94Initial program 88.9%
Taylor expanded in y around inf 61.4%
*-commutative61.4%
associate-/r*67.9%
Simplified67.9%
if 5.49999999999999989e-94 < t Initial program 86.3%
*-un-lft-identity86.3%
times-frac97.5%
Applied egg-rr97.5%
associate-*l/97.6%
*-un-lft-identity97.6%
Applied egg-rr97.6%
Taylor expanded in t around inf 77.1%
Final simplification71.1%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (/ x (* y t)))
assert(y < t);
double code(double x, double y, double z, double t) {
return x / (y * t);
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x / (y * t)
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
return x / (y * t);
}
[y, t] = sort([y, t]) def code(x, y, z, t): return x / (y * t)
y, t = sort([y, t]) function code(x, y, z, t) return Float64(x / Float64(y * t)) end
y, t = num2cell(sort([y, t])){:}
function tmp = code(x, y, z, t)
tmp = x / (y * t);
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\frac{x}{y \cdot t}
\end{array}
Initial program 88.0%
Taylor expanded in z around 0 40.3%
Final simplification40.3%
(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 2023298
(FPCore (x y z t)
:name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
:precision binary64
:herbie-target
(if (< (/ x (* (- y z) (- t z))) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 (* (- y z) (- t z)))))
(/ x (* (- y z) (- t z))))