
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
(FPCore (x y z t a) :precision binary64 (fma a 120.0 (* (/ 60.0 (- z t)) (- x y))))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, ((60.0 / (z - t)) * (x - y)));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)
\end{array}
Initial program 99.0%
+-commutative99.0%
fma-def99.5%
associate-*l/99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) (- z t))))
(t_2 (+ (* a 120.0) (* -60.0 (/ x t)))))
(if (<= (* a 120.0) -5e+60)
t_2
(if (<= (* a 120.0) -4e-20)
t_1
(if (<= (* a 120.0) -5e-97)
t_2
(if (<= (* a 120.0) 5e-60)
(* (/ 60.0 (- z t)) (- x y))
(if (or (<= (* a 120.0) 500000.0) (not (<= (* a 120.0) 1e+66)))
(* a 120.0)
t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double t_2 = (a * 120.0) + (-60.0 * (x / t));
double tmp;
if ((a * 120.0) <= -5e+60) {
tmp = t_2;
} else if ((a * 120.0) <= -4e-20) {
tmp = t_1;
} else if ((a * 120.0) <= -5e-97) {
tmp = t_2;
} else if ((a * 120.0) <= 5e-60) {
tmp = (60.0 / (z - t)) * (x - y);
} else if (((a * 120.0) <= 500000.0) || !((a * 120.0) <= 1e+66)) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 60.0d0 * ((x - y) / (z - t))
t_2 = (a * 120.0d0) + ((-60.0d0) * (x / t))
if ((a * 120.0d0) <= (-5d+60)) then
tmp = t_2
else if ((a * 120.0d0) <= (-4d-20)) then
tmp = t_1
else if ((a * 120.0d0) <= (-5d-97)) then
tmp = t_2
else if ((a * 120.0d0) <= 5d-60) then
tmp = (60.0d0 / (z - t)) * (x - y)
else if (((a * 120.0d0) <= 500000.0d0) .or. (.not. ((a * 120.0d0) <= 1d+66))) then
tmp = a * 120.0d0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double t_2 = (a * 120.0) + (-60.0 * (x / t));
double tmp;
if ((a * 120.0) <= -5e+60) {
tmp = t_2;
} else if ((a * 120.0) <= -4e-20) {
tmp = t_1;
} else if ((a * 120.0) <= -5e-97) {
tmp = t_2;
} else if ((a * 120.0) <= 5e-60) {
tmp = (60.0 / (z - t)) * (x - y);
} else if (((a * 120.0) <= 500000.0) || !((a * 120.0) <= 1e+66)) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) t_2 = (a * 120.0) + (-60.0 * (x / t)) tmp = 0 if (a * 120.0) <= -5e+60: tmp = t_2 elif (a * 120.0) <= -4e-20: tmp = t_1 elif (a * 120.0) <= -5e-97: tmp = t_2 elif (a * 120.0) <= 5e-60: tmp = (60.0 / (z - t)) * (x - y) elif ((a * 120.0) <= 500000.0) or not ((a * 120.0) <= 1e+66): tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) t_2 = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))) tmp = 0.0 if (Float64(a * 120.0) <= -5e+60) tmp = t_2; elseif (Float64(a * 120.0) <= -4e-20) tmp = t_1; elseif (Float64(a * 120.0) <= -5e-97) tmp = t_2; elseif (Float64(a * 120.0) <= 5e-60) tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); elseif ((Float64(a * 120.0) <= 500000.0) || !(Float64(a * 120.0) <= 1e+66)) tmp = Float64(a * 120.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * ((x - y) / (z - t)); t_2 = (a * 120.0) + (-60.0 * (x / t)); tmp = 0.0; if ((a * 120.0) <= -5e+60) tmp = t_2; elseif ((a * 120.0) <= -4e-20) tmp = t_1; elseif ((a * 120.0) <= -5e-97) tmp = t_2; elseif ((a * 120.0) <= 5e-60) tmp = (60.0 / (z - t)) * (x - y); elseif (((a * 120.0) <= 500000.0) || ~(((a * 120.0) <= 1e+66))) tmp = a * 120.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+60], t$95$2, If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e-20], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-97], t$95$2, If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-60], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], 500000.0], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 1e+66]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
t_2 := a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+60}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{-20}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-97}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-60}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\mathbf{elif}\;a \cdot 120 \leq 500000 \lor \neg \left(a \cdot 120 \leq 10^{+66}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (*.f64 a 120) < -4.99999999999999975e60 or -3.99999999999999978e-20 < (*.f64 a 120) < -4.9999999999999995e-97Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 91.5%
Taylor expanded in z around 0 81.6%
if -4.99999999999999975e60 < (*.f64 a 120) < -3.99999999999999978e-20 or 5e5 < (*.f64 a 120) < 9.99999999999999945e65Initial program 96.4%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 73.2%
if -4.9999999999999995e-97 < (*.f64 a 120) < 5.0000000000000001e-60Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 81.1%
expm1-log1p-u57.3%
expm1-udef20.5%
associate-*r/20.5%
Applied egg-rr20.5%
expm1-def57.4%
expm1-log1p81.3%
associate-*l/81.2%
Simplified81.2%
if 5.0000000000000001e-60 < (*.f64 a 120) < 5e5 or 9.99999999999999945e65 < (*.f64 a 120) Initial program 98.3%
associate-/l*98.3%
Simplified98.3%
Taylor expanded in z around inf 87.3%
Final simplification81.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ 60.0 (/ (- z t) (- x y))))
(t_2 (+ (* a 120.0) (* -60.0 (/ x t)))))
(if (<= (* a 120.0) -5e+60)
t_2
(if (<= (* a 120.0) -4e-20)
t_1
(if (<= (* a 120.0) -5e-97)
t_2
(if (or (<= (* a 120.0) 5e-60)
(and (not (<= (* a 120.0) 500000.0)) (<= (* a 120.0) 1e+66)))
t_1
(* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 / ((z - t) / (x - y));
double t_2 = (a * 120.0) + (-60.0 * (x / t));
double tmp;
if ((a * 120.0) <= -5e+60) {
tmp = t_2;
} else if ((a * 120.0) <= -4e-20) {
tmp = t_1;
} else if ((a * 120.0) <= -5e-97) {
tmp = t_2;
} else if (((a * 120.0) <= 5e-60) || (!((a * 120.0) <= 500000.0) && ((a * 120.0) <= 1e+66))) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 60.0d0 / ((z - t) / (x - y))
t_2 = (a * 120.0d0) + ((-60.0d0) * (x / t))
if ((a * 120.0d0) <= (-5d+60)) then
tmp = t_2
else if ((a * 120.0d0) <= (-4d-20)) then
tmp = t_1
else if ((a * 120.0d0) <= (-5d-97)) then
tmp = t_2
else if (((a * 120.0d0) <= 5d-60) .or. (.not. ((a * 120.0d0) <= 500000.0d0)) .and. ((a * 120.0d0) <= 1d+66)) then
tmp = t_1
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 / ((z - t) / (x - y));
double t_2 = (a * 120.0) + (-60.0 * (x / t));
double tmp;
if ((a * 120.0) <= -5e+60) {
tmp = t_2;
} else if ((a * 120.0) <= -4e-20) {
tmp = t_1;
} else if ((a * 120.0) <= -5e-97) {
tmp = t_2;
} else if (((a * 120.0) <= 5e-60) || (!((a * 120.0) <= 500000.0) && ((a * 120.0) <= 1e+66))) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 / ((z - t) / (x - y)) t_2 = (a * 120.0) + (-60.0 * (x / t)) tmp = 0 if (a * 120.0) <= -5e+60: tmp = t_2 elif (a * 120.0) <= -4e-20: tmp = t_1 elif (a * 120.0) <= -5e-97: tmp = t_2 elif ((a * 120.0) <= 5e-60) or (not ((a * 120.0) <= 500000.0) and ((a * 120.0) <= 1e+66)): tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) t_2 = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))) tmp = 0.0 if (Float64(a * 120.0) <= -5e+60) tmp = t_2; elseif (Float64(a * 120.0) <= -4e-20) tmp = t_1; elseif (Float64(a * 120.0) <= -5e-97) tmp = t_2; elseif ((Float64(a * 120.0) <= 5e-60) || (!(Float64(a * 120.0) <= 500000.0) && (Float64(a * 120.0) <= 1e+66))) tmp = t_1; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 / ((z - t) / (x - y)); t_2 = (a * 120.0) + (-60.0 * (x / t)); tmp = 0.0; if ((a * 120.0) <= -5e+60) tmp = t_2; elseif ((a * 120.0) <= -4e-20) tmp = t_1; elseif ((a * 120.0) <= -5e-97) tmp = t_2; elseif (((a * 120.0) <= 5e-60) || (~(((a * 120.0) <= 500000.0)) && ((a * 120.0) <= 1e+66))) tmp = t_1; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+60], t$95$2, If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e-20], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-97], t$95$2, If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-60], And[N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 500000.0]], $MachinePrecision], LessEqual[N[(a * 120.0), $MachinePrecision], 1e+66]]], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60}{\frac{z - t}{x - y}}\\
t_2 := a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+60}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{-20}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-97}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-60} \lor \neg \left(a \cdot 120 \leq 500000\right) \land a \cdot 120 \leq 10^{+66}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -4.99999999999999975e60 or -3.99999999999999978e-20 < (*.f64 a 120) < -4.9999999999999995e-97Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 91.5%
Taylor expanded in z around 0 81.6%
if -4.99999999999999975e60 < (*.f64 a 120) < -3.99999999999999978e-20 or -4.9999999999999995e-97 < (*.f64 a 120) < 5.0000000000000001e-60 or 5e5 < (*.f64 a 120) < 9.99999999999999945e65Initial program 99.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 79.3%
clear-num79.2%
un-div-inv79.4%
Applied egg-rr79.4%
if 5.0000000000000001e-60 < (*.f64 a 120) < 5e5 or 9.99999999999999945e65 < (*.f64 a 120) Initial program 98.3%
associate-/l*98.3%
Simplified98.3%
Taylor expanded in z around inf 87.3%
Final simplification81.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ 60.0 (/ (- z t) (- x y))))
(t_2 (+ (* a 120.0) (* -60.0 (/ x t)))))
(if (<= (* a 120.0) -5e+60)
t_2
(if (<= (* a 120.0) -4e-20)
t_1
(if (<= (* a 120.0) -5e-97)
t_2
(if (<= (* a 120.0) 5e-60)
(/ (* 60.0 (- x y)) (- z t))
(if (or (<= (* a 120.0) 500000.0) (not (<= (* a 120.0) 1e+66)))
(* a 120.0)
t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 / ((z - t) / (x - y));
double t_2 = (a * 120.0) + (-60.0 * (x / t));
double tmp;
if ((a * 120.0) <= -5e+60) {
tmp = t_2;
} else if ((a * 120.0) <= -4e-20) {
tmp = t_1;
} else if ((a * 120.0) <= -5e-97) {
tmp = t_2;
} else if ((a * 120.0) <= 5e-60) {
tmp = (60.0 * (x - y)) / (z - t);
} else if (((a * 120.0) <= 500000.0) || !((a * 120.0) <= 1e+66)) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 60.0d0 / ((z - t) / (x - y))
t_2 = (a * 120.0d0) + ((-60.0d0) * (x / t))
if ((a * 120.0d0) <= (-5d+60)) then
tmp = t_2
else if ((a * 120.0d0) <= (-4d-20)) then
tmp = t_1
else if ((a * 120.0d0) <= (-5d-97)) then
tmp = t_2
else if ((a * 120.0d0) <= 5d-60) then
tmp = (60.0d0 * (x - y)) / (z - t)
else if (((a * 120.0d0) <= 500000.0d0) .or. (.not. ((a * 120.0d0) <= 1d+66))) then
tmp = a * 120.0d0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 / ((z - t) / (x - y));
double t_2 = (a * 120.0) + (-60.0 * (x / t));
double tmp;
if ((a * 120.0) <= -5e+60) {
tmp = t_2;
} else if ((a * 120.0) <= -4e-20) {
tmp = t_1;
} else if ((a * 120.0) <= -5e-97) {
tmp = t_2;
} else if ((a * 120.0) <= 5e-60) {
tmp = (60.0 * (x - y)) / (z - t);
} else if (((a * 120.0) <= 500000.0) || !((a * 120.0) <= 1e+66)) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 / ((z - t) / (x - y)) t_2 = (a * 120.0) + (-60.0 * (x / t)) tmp = 0 if (a * 120.0) <= -5e+60: tmp = t_2 elif (a * 120.0) <= -4e-20: tmp = t_1 elif (a * 120.0) <= -5e-97: tmp = t_2 elif (a * 120.0) <= 5e-60: tmp = (60.0 * (x - y)) / (z - t) elif ((a * 120.0) <= 500000.0) or not ((a * 120.0) <= 1e+66): tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) t_2 = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))) tmp = 0.0 if (Float64(a * 120.0) <= -5e+60) tmp = t_2; elseif (Float64(a * 120.0) <= -4e-20) tmp = t_1; elseif (Float64(a * 120.0) <= -5e-97) tmp = t_2; elseif (Float64(a * 120.0) <= 5e-60) tmp = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)); elseif ((Float64(a * 120.0) <= 500000.0) || !(Float64(a * 120.0) <= 1e+66)) tmp = Float64(a * 120.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 / ((z - t) / (x - y)); t_2 = (a * 120.0) + (-60.0 * (x / t)); tmp = 0.0; if ((a * 120.0) <= -5e+60) tmp = t_2; elseif ((a * 120.0) <= -4e-20) tmp = t_1; elseif ((a * 120.0) <= -5e-97) tmp = t_2; elseif ((a * 120.0) <= 5e-60) tmp = (60.0 * (x - y)) / (z - t); elseif (((a * 120.0) <= 500000.0) || ~(((a * 120.0) <= 1e+66))) tmp = a * 120.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+60], t$95$2, If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e-20], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-97], t$95$2, If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-60], N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], 500000.0], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 1e+66]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60}{\frac{z - t}{x - y}}\\
t_2 := a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+60}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{-20}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-97}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-60}:\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{elif}\;a \cdot 120 \leq 500000 \lor \neg \left(a \cdot 120 \leq 10^{+66}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (*.f64 a 120) < -4.99999999999999975e60 or -3.99999999999999978e-20 < (*.f64 a 120) < -4.9999999999999995e-97Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 91.5%
Taylor expanded in z around 0 81.6%
if -4.99999999999999975e60 < (*.f64 a 120) < -3.99999999999999978e-20 or 5e5 < (*.f64 a 120) < 9.99999999999999945e65Initial program 96.4%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 73.2%
clear-num73.3%
un-div-inv73.3%
Applied egg-rr73.3%
if -4.9999999999999995e-97 < (*.f64 a 120) < 5.0000000000000001e-60Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 81.1%
associate-*r/81.3%
Applied egg-rr81.3%
if 5.0000000000000001e-60 < (*.f64 a 120) < 5e5 or 9.99999999999999945e65 < (*.f64 a 120) Initial program 98.3%
associate-/l*98.3%
Simplified98.3%
Taylor expanded in z around inf 87.3%
Final simplification81.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ 60.0 (/ (- z t) (- x y)))))
(if (<= (* a 120.0) -5e+60)
(+ (* a 120.0) (/ 60.0 (/ (- t) x)))
(if (<= (* a 120.0) -4e-20)
t_1
(if (<= (* a 120.0) -5e-97)
(+ (* a 120.0) (* -60.0 (/ x t)))
(if (<= (* a 120.0) 5e-60)
(/ (* 60.0 (- x y)) (- z t))
(if (or (<= (* a 120.0) 500000.0) (not (<= (* a 120.0) 1e+66)))
(* a 120.0)
t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 / ((z - t) / (x - y));
double tmp;
if ((a * 120.0) <= -5e+60) {
tmp = (a * 120.0) + (60.0 / (-t / x));
} else if ((a * 120.0) <= -4e-20) {
tmp = t_1;
} else if ((a * 120.0) <= -5e-97) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if ((a * 120.0) <= 5e-60) {
tmp = (60.0 * (x - y)) / (z - t);
} else if (((a * 120.0) <= 500000.0) || !((a * 120.0) <= 1e+66)) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = 60.0d0 / ((z - t) / (x - y))
if ((a * 120.0d0) <= (-5d+60)) then
tmp = (a * 120.0d0) + (60.0d0 / (-t / x))
else if ((a * 120.0d0) <= (-4d-20)) then
tmp = t_1
else if ((a * 120.0d0) <= (-5d-97)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
else if ((a * 120.0d0) <= 5d-60) then
tmp = (60.0d0 * (x - y)) / (z - t)
else if (((a * 120.0d0) <= 500000.0d0) .or. (.not. ((a * 120.0d0) <= 1d+66))) then
tmp = a * 120.0d0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 / ((z - t) / (x - y));
double tmp;
if ((a * 120.0) <= -5e+60) {
tmp = (a * 120.0) + (60.0 / (-t / x));
} else if ((a * 120.0) <= -4e-20) {
tmp = t_1;
} else if ((a * 120.0) <= -5e-97) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if ((a * 120.0) <= 5e-60) {
tmp = (60.0 * (x - y)) / (z - t);
} else if (((a * 120.0) <= 500000.0) || !((a * 120.0) <= 1e+66)) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 / ((z - t) / (x - y)) tmp = 0 if (a * 120.0) <= -5e+60: tmp = (a * 120.0) + (60.0 / (-t / x)) elif (a * 120.0) <= -4e-20: tmp = t_1 elif (a * 120.0) <= -5e-97: tmp = (a * 120.0) + (-60.0 * (x / t)) elif (a * 120.0) <= 5e-60: tmp = (60.0 * (x - y)) / (z - t) elif ((a * 120.0) <= 500000.0) or not ((a * 120.0) <= 1e+66): tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) tmp = 0.0 if (Float64(a * 120.0) <= -5e+60) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(-t) / x))); elseif (Float64(a * 120.0) <= -4e-20) tmp = t_1; elseif (Float64(a * 120.0) <= -5e-97) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); elseif (Float64(a * 120.0) <= 5e-60) tmp = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)); elseif ((Float64(a * 120.0) <= 500000.0) || !(Float64(a * 120.0) <= 1e+66)) tmp = Float64(a * 120.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 / ((z - t) / (x - y)); tmp = 0.0; if ((a * 120.0) <= -5e+60) tmp = (a * 120.0) + (60.0 / (-t / x)); elseif ((a * 120.0) <= -4e-20) tmp = t_1; elseif ((a * 120.0) <= -5e-97) tmp = (a * 120.0) + (-60.0 * (x / t)); elseif ((a * 120.0) <= 5e-60) tmp = (60.0 * (x - y)) / (z - t); elseif (((a * 120.0) <= 500000.0) || ~(((a * 120.0) <= 1e+66))) tmp = a * 120.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+60], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[((-t) / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e-20], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-97], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-60], N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], 500000.0], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 1e+66]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60}{\frac{z - t}{x - y}}\\
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+60}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{-t}{x}}\\
\mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{-20}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-97}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-60}:\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{elif}\;a \cdot 120 \leq 500000 \lor \neg \left(a \cdot 120 \leq 10^{+66}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (*.f64 a 120) < -4.99999999999999975e60Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 93.0%
Taylor expanded in z around 0 82.6%
neg-mul-182.6%
distribute-neg-frac82.6%
Simplified82.6%
if -4.99999999999999975e60 < (*.f64 a 120) < -3.99999999999999978e-20 or 5e5 < (*.f64 a 120) < 9.99999999999999945e65Initial program 96.4%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 73.2%
clear-num73.3%
un-div-inv73.3%
Applied egg-rr73.3%
if -3.99999999999999978e-20 < (*.f64 a 120) < -4.9999999999999995e-97Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 84.7%
Taylor expanded in z around 0 77.3%
if -4.9999999999999995e-97 < (*.f64 a 120) < 5.0000000000000001e-60Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 81.1%
associate-*r/81.3%
Applied egg-rr81.3%
if 5.0000000000000001e-60 < (*.f64 a 120) < 5e5 or 9.99999999999999945e65 < (*.f64 a 120) Initial program 98.3%
associate-/l*98.3%
Simplified98.3%
Taylor expanded in z around inf 87.3%
Final simplification81.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* a 120.0) (* (/ 60.0 (- z t)) x))))
(if (<= (* a 120.0) -2e+24)
t_1
(if (<= (* a 120.0) -2000.0)
(/ 60.0 (/ (- z t) (- x y)))
(if (or (<= (* a 120.0) -5e-97) (not (<= (* a 120.0) 2e-193)))
t_1
(/ (* 60.0 (- x y)) (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + ((60.0 / (z - t)) * x);
double tmp;
if ((a * 120.0) <= -2e+24) {
tmp = t_1;
} else if ((a * 120.0) <= -2000.0) {
tmp = 60.0 / ((z - t) / (x - y));
} else if (((a * 120.0) <= -5e-97) || !((a * 120.0) <= 2e-193)) {
tmp = t_1;
} else {
tmp = (60.0 * (x - y)) / (z - t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (a * 120.0d0) + ((60.0d0 / (z - t)) * x)
if ((a * 120.0d0) <= (-2d+24)) then
tmp = t_1
else if ((a * 120.0d0) <= (-2000.0d0)) then
tmp = 60.0d0 / ((z - t) / (x - y))
else if (((a * 120.0d0) <= (-5d-97)) .or. (.not. ((a * 120.0d0) <= 2d-193))) then
tmp = t_1
else
tmp = (60.0d0 * (x - y)) / (z - t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + ((60.0 / (z - t)) * x);
double tmp;
if ((a * 120.0) <= -2e+24) {
tmp = t_1;
} else if ((a * 120.0) <= -2000.0) {
tmp = 60.0 / ((z - t) / (x - y));
} else if (((a * 120.0) <= -5e-97) || !((a * 120.0) <= 2e-193)) {
tmp = t_1;
} else {
tmp = (60.0 * (x - y)) / (z - t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a * 120.0) + ((60.0 / (z - t)) * x) tmp = 0 if (a * 120.0) <= -2e+24: tmp = t_1 elif (a * 120.0) <= -2000.0: tmp = 60.0 / ((z - t) / (x - y)) elif ((a * 120.0) <= -5e-97) or not ((a * 120.0) <= 2e-193): tmp = t_1 else: tmp = (60.0 * (x - y)) / (z - t) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(a * 120.0) + Float64(Float64(60.0 / Float64(z - t)) * x)) tmp = 0.0 if (Float64(a * 120.0) <= -2e+24) tmp = t_1; elseif (Float64(a * 120.0) <= -2000.0) tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); elseif ((Float64(a * 120.0) <= -5e-97) || !(Float64(a * 120.0) <= 2e-193)) tmp = t_1; else tmp = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (a * 120.0) + ((60.0 / (z - t)) * x); tmp = 0.0; if ((a * 120.0) <= -2e+24) tmp = t_1; elseif ((a * 120.0) <= -2000.0) tmp = 60.0 / ((z - t) / (x - y)); elseif (((a * 120.0) <= -5e-97) || ~(((a * 120.0) <= 2e-193))) tmp = t_1; else tmp = (60.0 * (x - y)) / (z - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e+24], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], -2000.0], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-97], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-193]], $MachinePrecision]], t$95$1, N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot 120 + \frac{60}{z - t} \cdot x\\
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+24}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq -2000:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-97} \lor \neg \left(a \cdot 120 \leq 2 \cdot 10^{-193}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\
\end{array}
\end{array}
if (*.f64 a 120) < -2e24 or -2e3 < (*.f64 a 120) < -4.9999999999999995e-97 or 2.0000000000000001e-193 < (*.f64 a 120) Initial program 99.3%
associate-/l*99.3%
Simplified99.3%
Taylor expanded in x around inf 89.2%
associate-*r/89.2%
associate-*l/89.2%
*-commutative89.2%
Simplified89.2%
if -2e24 < (*.f64 a 120) < -2e3Initial program 86.5%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 99.3%
clear-num99.3%
un-div-inv99.6%
Applied egg-rr99.6%
if -4.9999999999999995e-97 < (*.f64 a 120) < 2.0000000000000001e-193Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 86.2%
associate-*r/86.3%
Applied egg-rr86.3%
Final simplification88.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* a 120.0) (/ 60.0 (/ (- z t) x)))))
(if (<= (* a 120.0) -2e+24)
t_1
(if (<= (* a 120.0) -2000.0)
(/ 60.0 (/ (- z t) (- x y)))
(if (<= (* a 120.0) -5e-97)
(+ (* a 120.0) (* (/ 60.0 (- z t)) x))
(if (<= (* a 120.0) 2e-193) (/ (* 60.0 (- x y)) (- z t)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (60.0 / ((z - t) / x));
double tmp;
if ((a * 120.0) <= -2e+24) {
tmp = t_1;
} else if ((a * 120.0) <= -2000.0) {
tmp = 60.0 / ((z - t) / (x - y));
} else if ((a * 120.0) <= -5e-97) {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
} else if ((a * 120.0) <= 2e-193) {
tmp = (60.0 * (x - y)) / (z - t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (a * 120.0d0) + (60.0d0 / ((z - t) / x))
if ((a * 120.0d0) <= (-2d+24)) then
tmp = t_1
else if ((a * 120.0d0) <= (-2000.0d0)) then
tmp = 60.0d0 / ((z - t) / (x - y))
else if ((a * 120.0d0) <= (-5d-97)) then
tmp = (a * 120.0d0) + ((60.0d0 / (z - t)) * x)
else if ((a * 120.0d0) <= 2d-193) then
tmp = (60.0d0 * (x - y)) / (z - t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (60.0 / ((z - t) / x));
double tmp;
if ((a * 120.0) <= -2e+24) {
tmp = t_1;
} else if ((a * 120.0) <= -2000.0) {
tmp = 60.0 / ((z - t) / (x - y));
} else if ((a * 120.0) <= -5e-97) {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
} else if ((a * 120.0) <= 2e-193) {
tmp = (60.0 * (x - y)) / (z - t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a * 120.0) + (60.0 / ((z - t) / x)) tmp = 0 if (a * 120.0) <= -2e+24: tmp = t_1 elif (a * 120.0) <= -2000.0: tmp = 60.0 / ((z - t) / (x - y)) elif (a * 120.0) <= -5e-97: tmp = (a * 120.0) + ((60.0 / (z - t)) * x) elif (a * 120.0) <= 2e-193: tmp = (60.0 * (x - y)) / (z - t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(z - t) / x))) tmp = 0.0 if (Float64(a * 120.0) <= -2e+24) tmp = t_1; elseif (Float64(a * 120.0) <= -2000.0) tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); elseif (Float64(a * 120.0) <= -5e-97) tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 / Float64(z - t)) * x)); elseif (Float64(a * 120.0) <= 2e-193) tmp = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (a * 120.0) + (60.0 / ((z - t) / x)); tmp = 0.0; if ((a * 120.0) <= -2e+24) tmp = t_1; elseif ((a * 120.0) <= -2000.0) tmp = 60.0 / ((z - t) / (x - y)); elseif ((a * 120.0) <= -5e-97) tmp = (a * 120.0) + ((60.0 / (z - t)) * x); elseif ((a * 120.0) <= 2e-193) tmp = (60.0 * (x - y)) / (z - t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e+24], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], -2000.0], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-97], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-193], N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+24}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq -2000:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-97}:\\
\;\;\;\;a \cdot 120 + \frac{60}{z - t} \cdot x\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-193}:\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (*.f64 a 120) < -2e24 or 2.0000000000000001e-193 < (*.f64 a 120) Initial program 99.2%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in x around inf 89.3%
if -2e24 < (*.f64 a 120) < -2e3Initial program 86.5%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 99.3%
clear-num99.3%
un-div-inv99.6%
Applied egg-rr99.6%
if -2e3 < (*.f64 a 120) < -4.9999999999999995e-97Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 88.3%
associate-*r/88.2%
associate-*l/88.3%
*-commutative88.3%
Simplified88.3%
if -4.9999999999999995e-97 < (*.f64 a 120) < 2.0000000000000001e-193Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 86.2%
associate-*r/86.3%
Applied egg-rr86.3%
Final simplification88.7%
(FPCore (x y z t a)
:precision binary64
(if (or (<= a -2.65e+20)
(and (not (<= a 2.1e-60)) (or (<= a 68000.0) (not (<= a 5.5e+63)))))
(* a 120.0)
(* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.65e+20) || (!(a <= 2.1e-60) && ((a <= 68000.0) || !(a <= 5.5e+63)))) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-2.65d+20)) .or. (.not. (a <= 2.1d-60)) .and. (a <= 68000.0d0) .or. (.not. (a <= 5.5d+63))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * ((x - y) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.65e+20) || (!(a <= 2.1e-60) && ((a <= 68000.0) || !(a <= 5.5e+63)))) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.65e+20) or (not (a <= 2.1e-60) and ((a <= 68000.0) or not (a <= 5.5e+63))): tmp = a * 120.0 else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.65e+20) || (!(a <= 2.1e-60) && ((a <= 68000.0) || !(a <= 5.5e+63)))) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.65e+20) || (~((a <= 2.1e-60)) && ((a <= 68000.0) || ~((a <= 5.5e+63))))) tmp = a * 120.0; else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.65e+20], And[N[Not[LessEqual[a, 2.1e-60]], $MachinePrecision], Or[LessEqual[a, 68000.0], N[Not[LessEqual[a, 5.5e+63]], $MachinePrecision]]]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.65 \cdot 10^{+20} \lor \neg \left(a \leq 2.1 \cdot 10^{-60}\right) \land \left(a \leq 68000 \lor \neg \left(a \leq 5.5 \cdot 10^{+63}\right)\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if a < -2.65e20 or 2.09999999999999991e-60 < a < 68000 or 5.50000000000000004e63 < a Initial program 99.1%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in z around inf 82.1%
if -2.65e20 < a < 2.09999999999999991e-60 or 68000 < a < 5.50000000000000004e63Initial program 99.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 77.5%
Final simplification79.7%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.1e+20)
(* a 120.0)
(if (<= a 4.4e-60)
(* (/ 60.0 (- z t)) (- x y))
(if (or (<= a 150000.0) (not (<= a 4.6e+63)))
(* a 120.0)
(* 60.0 (/ (- x y) (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.1e+20) {
tmp = a * 120.0;
} else if (a <= 4.4e-60) {
tmp = (60.0 / (z - t)) * (x - y);
} else if ((a <= 150000.0) || !(a <= 4.6e+63)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-2.1d+20)) then
tmp = a * 120.0d0
else if (a <= 4.4d-60) then
tmp = (60.0d0 / (z - t)) * (x - y)
else if ((a <= 150000.0d0) .or. (.not. (a <= 4.6d+63))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * ((x - y) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.1e+20) {
tmp = a * 120.0;
} else if (a <= 4.4e-60) {
tmp = (60.0 / (z - t)) * (x - y);
} else if ((a <= 150000.0) || !(a <= 4.6e+63)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.1e+20: tmp = a * 120.0 elif a <= 4.4e-60: tmp = (60.0 / (z - t)) * (x - y) elif (a <= 150000.0) or not (a <= 4.6e+63): tmp = a * 120.0 else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.1e+20) tmp = Float64(a * 120.0); elseif (a <= 4.4e-60) tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); elseif ((a <= 150000.0) || !(a <= 4.6e+63)) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.1e+20) tmp = a * 120.0; elseif (a <= 4.4e-60) tmp = (60.0 / (z - t)) * (x - y); elseif ((a <= 150000.0) || ~((a <= 4.6e+63))) tmp = a * 120.0; else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.1e+20], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 4.4e-60], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, 150000.0], N[Not[LessEqual[a, 4.6e+63]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.1 \cdot 10^{+20}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 4.4 \cdot 10^{-60}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\mathbf{elif}\;a \leq 150000 \lor \neg \left(a \leq 4.6 \cdot 10^{+63}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if a < -2.1e20 or 4.3999999999999998e-60 < a < 1.5e5 or 4.59999999999999986e63 < a Initial program 99.1%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in z around inf 82.1%
if -2.1e20 < a < 4.3999999999999998e-60Initial program 99.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 77.6%
expm1-log1p-u53.9%
expm1-udef22.9%
associate-*r/22.2%
Applied egg-rr22.2%
expm1-def53.3%
expm1-log1p77.0%
associate-*l/77.7%
Simplified77.7%
if 1.5e5 < a < 4.59999999999999986e63Initial program 99.5%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 75.8%
Final simplification79.8%
(FPCore (x y z t a)
:precision binary64
(if (or (<= a -1.9e+20)
(and (not (<= a -7.5e-6)) (or (<= a -2.8e-111) (not (<= a 8e-125)))))
(* a 120.0)
(* -60.0 (/ (- x y) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.9e+20) || (!(a <= -7.5e-6) && ((a <= -2.8e-111) || !(a <= 8e-125)))) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-1.9d+20)) .or. (.not. (a <= (-7.5d-6))) .and. (a <= (-2.8d-111)) .or. (.not. (a <= 8d-125))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * ((x - y) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.9e+20) || (!(a <= -7.5e-6) && ((a <= -2.8e-111) || !(a <= 8e-125)))) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.9e+20) or (not (a <= -7.5e-6) and ((a <= -2.8e-111) or not (a <= 8e-125))): tmp = a * 120.0 else: tmp = -60.0 * ((x - y) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.9e+20) || (!(a <= -7.5e-6) && ((a <= -2.8e-111) || !(a <= 8e-125)))) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.9e+20) || (~((a <= -7.5e-6)) && ((a <= -2.8e-111) || ~((a <= 8e-125))))) tmp = a * 120.0; else tmp = -60.0 * ((x - y) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.9e+20], And[N[Not[LessEqual[a, -7.5e-6]], $MachinePrecision], Or[LessEqual[a, -2.8e-111], N[Not[LessEqual[a, 8e-125]], $MachinePrecision]]]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.9 \cdot 10^{+20} \lor \neg \left(a \leq -7.5 \cdot 10^{-6}\right) \land \left(a \leq -2.8 \cdot 10^{-111} \lor \neg \left(a \leq 8 \cdot 10^{-125}\right)\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if a < -1.9e20 or -7.50000000000000019e-6 < a < -2.79999999999999995e-111 or 8.0000000000000001e-125 < a Initial program 99.3%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in z around inf 71.3%
if -1.9e20 < a < -7.50000000000000019e-6 or -2.79999999999999995e-111 < a < 8.0000000000000001e-125Initial program 98.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 85.0%
Taylor expanded in z around 0 45.4%
Final simplification62.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.45e+89) (not (<= y 2.95e+41))) (+ (* a 120.0) (/ (* y -60.0) (- z t))) (+ (* a 120.0) (/ 60.0 (/ (- z t) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.45e+89) || !(y <= 2.95e+41)) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-1.45d+89)) .or. (.not. (y <= 2.95d+41))) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
else
tmp = (a * 120.0d0) + (60.0d0 / ((z - t) / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.45e+89) || !(y <= 2.95e+41)) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.45e+89) or not (y <= 2.95e+41): tmp = (a * 120.0) + ((y * -60.0) / (z - t)) else: tmp = (a * 120.0) + (60.0 / ((z - t) / x)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.45e+89) || !(y <= 2.95e+41)) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(z - t) / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.45e+89) || ~((y <= 2.95e+41))) tmp = (a * 120.0) + ((y * -60.0) / (z - t)); else tmp = (a * 120.0) + (60.0 / ((z - t) / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.45e+89], N[Not[LessEqual[y, 2.95e+41]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{+89} \lor \neg \left(y \leq 2.95 \cdot 10^{+41}\right):\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\
\end{array}
\end{array}
if y < -1.45000000000000013e89 or 2.95e41 < y Initial program 98.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 90.0%
associate-*r/89.0%
Simplified89.0%
if -1.45000000000000013e89 < y < 2.95e41Initial program 99.2%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in x around inf 93.7%
Final simplification92.0%
(FPCore (x y z t a)
:precision binary64
(if (<= y -1.1e+93)
(+ (* a 120.0) (/ 60.0 (/ (- t z) y)))
(if (<= y 6.5e+40)
(+ (* a 120.0) (/ 60.0 (/ (- z t) x)))
(+ (* a 120.0) (/ (* y -60.0) (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.1e+93) {
tmp = (a * 120.0) + (60.0 / ((t - z) / y));
} else if (y <= 6.5e+40) {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
} else {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-1.1d+93)) then
tmp = (a * 120.0d0) + (60.0d0 / ((t - z) / y))
else if (y <= 6.5d+40) then
tmp = (a * 120.0d0) + (60.0d0 / ((z - t) / x))
else
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.1e+93) {
tmp = (a * 120.0) + (60.0 / ((t - z) / y));
} else if (y <= 6.5e+40) {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
} else {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.1e+93: tmp = (a * 120.0) + (60.0 / ((t - z) / y)) elif y <= 6.5e+40: tmp = (a * 120.0) + (60.0 / ((z - t) / x)) else: tmp = (a * 120.0) + ((y * -60.0) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.1e+93) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(t - z) / y))); elseif (y <= 6.5e+40) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(z - t) / x))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.1e+93) tmp = (a * 120.0) + (60.0 / ((t - z) / y)); elseif (y <= 6.5e+40) tmp = (a * 120.0) + (60.0 / ((z - t) / x)); else tmp = (a * 120.0) + ((y * -60.0) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.1e+93], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(t - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.5e+40], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+93}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{t - z}{y}}\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{+40}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\end{array}
\end{array}
if y < -1.10000000000000011e93Initial program 96.8%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in x around 0 93.6%
associate-*r/93.6%
neg-mul-193.6%
Simplified93.6%
if -1.10000000000000011e93 < y < 6.5000000000000001e40Initial program 99.2%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in x around inf 93.7%
if 6.5000000000000001e40 < y Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 88.0%
associate-*r/88.1%
Simplified88.1%
Final simplification92.4%
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
Initial program 99.0%
associate-/l*99.4%
Simplified99.4%
Final simplification99.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -2e+73) (not (<= x 1.95e+101))) (* 60.0 (/ x (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -2e+73) || !(x <= 1.95e+101)) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-2d+73)) .or. (.not. (x <= 1.95d+101))) then
tmp = 60.0d0 * (x / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -2e+73) || !(x <= 1.95e+101)) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -2e+73) or not (x <= 1.95e+101): tmp = 60.0 * (x / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -2e+73) || !(x <= 1.95e+101)) tmp = Float64(60.0 * Float64(x / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -2e+73) || ~((x <= 1.95e+101))) tmp = 60.0 * (x / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -2e+73], N[Not[LessEqual[x, 1.95e+101]], $MachinePrecision]], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{+73} \lor \neg \left(x \leq 1.95 \cdot 10^{+101}\right):\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -1.99999999999999997e73 or 1.95e101 < x Initial program 97.6%
associate-/l*98.6%
Simplified98.6%
Taylor expanded in a around 0 70.3%
Taylor expanded in x around inf 59.7%
if -1.99999999999999997e73 < x < 1.95e101Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 63.9%
Final simplification62.4%
(FPCore (x y z t a) :precision binary64 (if (<= x 3e+218) (* a 120.0) (* -60.0 (/ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= 3e+218) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (x / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= 3d+218) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (x / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= 3e+218) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (x / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= 3e+218: tmp = a * 120.0 else: tmp = -60.0 * (x / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= 3e+218) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(x / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= 3e+218) tmp = a * 120.0; else tmp = -60.0 * (x / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, 3e+218], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 3 \cdot 10^{+218}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\end{array}
\end{array}
if x < 3.0000000000000001e218Initial program 99.0%
associate-/l*99.4%
Simplified99.4%
Taylor expanded in z around inf 53.7%
if 3.0000000000000001e218 < x Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around 0 66.4%
Taylor expanded in z around 0 62.5%
Taylor expanded in x around inf 62.9%
Final simplification54.5%
(FPCore (x y z t a) :precision binary64 (if (<= x 2.7e+221) (* a 120.0) (/ -60.0 (/ t x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= 2.7e+221) {
tmp = a * 120.0;
} else {
tmp = -60.0 / (t / x);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= 2.7d+221) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) / (t / x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= 2.7e+221) {
tmp = a * 120.0;
} else {
tmp = -60.0 / (t / x);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= 2.7e+221: tmp = a * 120.0 else: tmp = -60.0 / (t / x) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= 2.7e+221) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 / Float64(t / x)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= 2.7e+221) tmp = a * 120.0; else tmp = -60.0 / (t / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, 2.7e+221], N[(a * 120.0), $MachinePrecision], N[(-60.0 / N[(t / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.7 \cdot 10^{+221}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{-60}{\frac{t}{x}}\\
\end{array}
\end{array}
if x < 2.7e221Initial program 99.0%
associate-/l*99.4%
Simplified99.4%
Taylor expanded in z around inf 53.7%
if 2.7e221 < x Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around 0 66.4%
Taylor expanded in z around 0 62.5%
Taylor expanded in x around inf 62.9%
associate-*r/62.9%
associate-/l*62.9%
Simplified62.9%
Final simplification54.5%
(FPCore (x y z t a) :precision binary64 (* a 120.0))
double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = a * 120.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
def code(x, y, z, t, a): return a * 120.0
function code(x, y, z, t, a) return Float64(a * 120.0) end
function tmp = code(x, y, z, t, a) tmp = a * 120.0; end
code[x_, y_, z_, t_, a_] := N[(a * 120.0), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120
\end{array}
Initial program 99.0%
associate-/l*99.4%
Simplified99.4%
Taylor expanded in z around inf 52.4%
Final simplification52.4%
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
herbie shell --seed 2024019
(FPCore (x y z t a)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
:precision binary64
:herbie-target
(+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0))
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))