
(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 16 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 (+ (/ 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.1%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(if (or (<= (* a 120.0) -50000.0)
(not
(or (<= (* a 120.0) 1e-100)
(and (not (<= (* a 120.0) 1e+55)) (<= (* a 120.0) 5e+99)))))
(* 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 * 120.0) <= -50000.0) || !(((a * 120.0) <= 1e-100) || (!((a * 120.0) <= 1e+55) && ((a * 120.0) <= 5e+99)))) {
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 * 120.0d0) <= (-50000.0d0)) .or. (.not. ((a * 120.0d0) <= 1d-100) .or. (.not. ((a * 120.0d0) <= 1d+55)) .and. ((a * 120.0d0) <= 5d+99))) 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 * 120.0) <= -50000.0) || !(((a * 120.0) <= 1e-100) || (!((a * 120.0) <= 1e+55) && ((a * 120.0) <= 5e+99)))) {
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 * 120.0) <= -50000.0) or not (((a * 120.0) <= 1e-100) or (not ((a * 120.0) <= 1e+55) and ((a * 120.0) <= 5e+99))): 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 ((Float64(a * 120.0) <= -50000.0) || !((Float64(a * 120.0) <= 1e-100) || (!(Float64(a * 120.0) <= 1e+55) && (Float64(a * 120.0) <= 5e+99)))) 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 * 120.0) <= -50000.0) || ~((((a * 120.0) <= 1e-100) || (~(((a * 120.0) <= 1e+55)) && ((a * 120.0) <= 5e+99))))) 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[N[(a * 120.0), $MachinePrecision], -50000.0], N[Not[Or[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-100], And[N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 1e+55]], $MachinePrecision], LessEqual[N[(a * 120.0), $MachinePrecision], 5e+99]]]], $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 \cdot 120 \leq -50000 \lor \neg \left(a \cdot 120 \leq 10^{-100} \lor \neg \left(a \cdot 120 \leq 10^{+55}\right) \land a \cdot 120 \leq 5 \cdot 10^{+99}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (*.f64 a 120) < -5e4 or 1e-100 < (*.f64 a 120) < 1.00000000000000001e55 or 5.00000000000000008e99 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 77.6%
if -5e4 < (*.f64 a 120) < 1e-100 or 1.00000000000000001e55 < (*.f64 a 120) < 5.00000000000000008e99Initial program 98.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 78.2%
Final simplification77.9%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -50000.0)
(+ (* a 120.0) (/ 60.0 (/ z x)))
(if (<= (* a 120.0) 1e-100)
(* 60.0 (/ (- x y) (- z t)))
(if (<= (* a 120.0) 1e+55)
(* a 120.0)
(if (<= (* a 120.0) 1e+212)
(+ (* a 120.0) (* x (/ -60.0 t)))
(+ (* a 120.0) (* 60.0 (/ y t))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -50000.0) {
tmp = (a * 120.0) + (60.0 / (z / x));
} else if ((a * 120.0) <= 1e-100) {
tmp = 60.0 * ((x - y) / (z - t));
} else if ((a * 120.0) <= 1e+55) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 1e+212) {
tmp = (a * 120.0) + (x * (-60.0 / t));
} else {
tmp = (a * 120.0) + (60.0 * (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 * 120.0d0) <= (-50000.0d0)) then
tmp = (a * 120.0d0) + (60.0d0 / (z / x))
else if ((a * 120.0d0) <= 1d-100) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if ((a * 120.0d0) <= 1d+55) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 1d+212) then
tmp = (a * 120.0d0) + (x * ((-60.0d0) / t))
else
tmp = (a * 120.0d0) + (60.0d0 * (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 * 120.0) <= -50000.0) {
tmp = (a * 120.0) + (60.0 / (z / x));
} else if ((a * 120.0) <= 1e-100) {
tmp = 60.0 * ((x - y) / (z - t));
} else if ((a * 120.0) <= 1e+55) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 1e+212) {
tmp = (a * 120.0) + (x * (-60.0 / t));
} else {
tmp = (a * 120.0) + (60.0 * (y / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -50000.0: tmp = (a * 120.0) + (60.0 / (z / x)) elif (a * 120.0) <= 1e-100: tmp = 60.0 * ((x - y) / (z - t)) elif (a * 120.0) <= 1e+55: tmp = a * 120.0 elif (a * 120.0) <= 1e+212: tmp = (a * 120.0) + (x * (-60.0 / t)) else: tmp = (a * 120.0) + (60.0 * (y / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -50000.0) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(z / x))); elseif (Float64(a * 120.0) <= 1e-100) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (Float64(a * 120.0) <= 1e+55) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 1e+212) tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(-60.0 / t))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -50000.0) tmp = (a * 120.0) + (60.0 / (z / x)); elseif ((a * 120.0) <= 1e-100) tmp = 60.0 * ((x - y) / (z - t)); elseif ((a * 120.0) <= 1e+55) tmp = a * 120.0; elseif ((a * 120.0) <= 1e+212) tmp = (a * 120.0) + (x * (-60.0 / t)); else tmp = (a * 120.0) + (60.0 * (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -50000.0], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-100], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e+55], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e+212], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -50000:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z}{x}}\\
\mathbf{elif}\;a \cdot 120 \leq 10^{-100}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;a \cdot 120 \leq 10^{+55}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 10^{+212}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{-60}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\
\end{array}
\end{array}
if (*.f64 a 120) < -5e4Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 87.5%
Taylor expanded in z around inf 78.6%
if -5e4 < (*.f64 a 120) < 1e-100Initial program 98.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 78.7%
if 1e-100 < (*.f64 a 120) < 1.00000000000000001e55Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 66.6%
if 1.00000000000000001e55 < (*.f64 a 120) < 9.9999999999999991e211Initial program 96.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 85.6%
associate-*r/22.7%
associate-*l/22.7%
*-commutative22.7%
Simplified85.6%
Taylor expanded in z around 0 85.3%
if 9.9999999999999991e211 < (*.f64 a 120) Initial program 100.0%
Taylor expanded in x around 0 93.7%
Taylor expanded in z around 0 93.4%
Final simplification79.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -1e+43)
(/ 60.0 (/ (- z t) (- x y)))
(if (<= t_1 1e+31) (* a 120.0) (* 60.0 (/ (- x y) (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -1e+43) {
tmp = 60.0 / ((z - t) / (x - y));
} else if (t_1 <= 1e+31) {
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) :: t_1
real(8) :: tmp
t_1 = (60.0d0 * (x - y)) / (z - t)
if (t_1 <= (-1d+43)) then
tmp = 60.0d0 / ((z - t) / (x - y))
else if (t_1 <= 1d+31) 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 t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -1e+43) {
tmp = 60.0 / ((z - t) / (x - y));
} else if (t_1 <= 1e+31) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -1e+43: tmp = 60.0 / ((z - t) / (x - y)) elif t_1 <= 1e+31: tmp = a * 120.0 else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_1 <= -1e+43) tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); elseif (t_1 <= 1e+31) 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) t_1 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_1 <= -1e+43) tmp = 60.0 / ((z - t) / (x - y)); elseif (t_1 <= 1e+31) tmp = a * 120.0; 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[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+43], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+31], 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}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+43}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\mathbf{elif}\;t\_1 \leq 10^{+31}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -1.00000000000000001e43Initial program 97.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 81.6%
expm1-log1p-u0.0%
expm1-udef0.0%
Applied egg-rr0.0%
expm1-def0.0%
expm1-log1p81.6%
associate-*r/79.7%
associate-/l*81.7%
Simplified81.7%
if -1.00000000000000001e43 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 9.9999999999999996e30Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 79.3%
if 9.9999999999999996e30 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) Initial program 98.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 81.4%
Final simplification80.3%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -50000.0)
(* a 120.0)
(if (<= (* a 120.0) 1e-100)
(* 60.0 (/ (- x y) (- z t)))
(if (<= (* a 120.0) 1e+55)
(* a 120.0)
(+ (* a 120.0) (* x (/ -60.0 t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -50000.0) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 1e-100) {
tmp = 60.0 * ((x - y) / (z - t));
} else if ((a * 120.0) <= 1e+55) {
tmp = a * 120.0;
} else {
tmp = (a * 120.0) + (x * (-60.0 / 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 * 120.0d0) <= (-50000.0d0)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 1d-100) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if ((a * 120.0d0) <= 1d+55) then
tmp = a * 120.0d0
else
tmp = (a * 120.0d0) + (x * ((-60.0d0) / 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 * 120.0) <= -50000.0) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 1e-100) {
tmp = 60.0 * ((x - y) / (z - t));
} else if ((a * 120.0) <= 1e+55) {
tmp = a * 120.0;
} else {
tmp = (a * 120.0) + (x * (-60.0 / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -50000.0: tmp = a * 120.0 elif (a * 120.0) <= 1e-100: tmp = 60.0 * ((x - y) / (z - t)) elif (a * 120.0) <= 1e+55: tmp = a * 120.0 else: tmp = (a * 120.0) + (x * (-60.0 / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -50000.0) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 1e-100) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (Float64(a * 120.0) <= 1e+55) tmp = Float64(a * 120.0); else tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(-60.0 / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -50000.0) tmp = a * 120.0; elseif ((a * 120.0) <= 1e-100) tmp = 60.0 * ((x - y) / (z - t)); elseif ((a * 120.0) <= 1e+55) tmp = a * 120.0; else tmp = (a * 120.0) + (x * (-60.0 / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -50000.0], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-100], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e+55], N[(a * 120.0), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -50000:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 10^{-100}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;a \cdot 120 \leq 10^{+55}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{-60}{t}\\
\end{array}
\end{array}
if (*.f64 a 120) < -5e4 or 1e-100 < (*.f64 a 120) < 1.00000000000000001e55Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 72.6%
if -5e4 < (*.f64 a 120) < 1e-100Initial program 98.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 78.7%
if 1.00000000000000001e55 < (*.f64 a 120) Initial program 98.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 90.9%
associate-*r/17.6%
associate-*l/17.6%
*-commutative17.6%
Simplified90.9%
Taylor expanded in z around 0 84.0%
Final simplification77.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (/ 60.0 (- z t)))))
(if (<= x -3.05e+224)
t_1
(if (<= x -3.2e+164)
(* a 120.0)
(if (<= x -5.6e+79)
(* 60.0 (/ (- x y) z))
(if (<= x 1.5e+192) (* a 120.0) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (60.0 / (z - t));
double tmp;
if (x <= -3.05e+224) {
tmp = t_1;
} else if (x <= -3.2e+164) {
tmp = a * 120.0;
} else if (x <= -5.6e+79) {
tmp = 60.0 * ((x - y) / z);
} else if (x <= 1.5e+192) {
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 = x * (60.0d0 / (z - t))
if (x <= (-3.05d+224)) then
tmp = t_1
else if (x <= (-3.2d+164)) then
tmp = a * 120.0d0
else if (x <= (-5.6d+79)) then
tmp = 60.0d0 * ((x - y) / z)
else if (x <= 1.5d+192) 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 = x * (60.0 / (z - t));
double tmp;
if (x <= -3.05e+224) {
tmp = t_1;
} else if (x <= -3.2e+164) {
tmp = a * 120.0;
} else if (x <= -5.6e+79) {
tmp = 60.0 * ((x - y) / z);
} else if (x <= 1.5e+192) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (60.0 / (z - t)) tmp = 0 if x <= -3.05e+224: tmp = t_1 elif x <= -3.2e+164: tmp = a * 120.0 elif x <= -5.6e+79: tmp = 60.0 * ((x - y) / z) elif x <= 1.5e+192: tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(60.0 / Float64(z - t))) tmp = 0.0 if (x <= -3.05e+224) tmp = t_1; elseif (x <= -3.2e+164) tmp = Float64(a * 120.0); elseif (x <= -5.6e+79) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); elseif (x <= 1.5e+192) tmp = Float64(a * 120.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (60.0 / (z - t)); tmp = 0.0; if (x <= -3.05e+224) tmp = t_1; elseif (x <= -3.2e+164) tmp = a * 120.0; elseif (x <= -5.6e+79) tmp = 60.0 * ((x - y) / z); elseif (x <= 1.5e+192) tmp = a * 120.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.05e+224], t$95$1, If[LessEqual[x, -3.2e+164], N[(a * 120.0), $MachinePrecision], If[LessEqual[x, -5.6e+79], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.5e+192], N[(a * 120.0), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{60}{z - t}\\
\mathbf{if}\;x \leq -3.05 \cdot 10^{+224}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -3.2 \cdot 10^{+164}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;x \leq -5.6 \cdot 10^{+79}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{elif}\;x \leq 1.5 \cdot 10^{+192}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.05e224 or 1.5e192 < x Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 90.3%
expm1-log1p-u60.2%
expm1-udef48.6%
Applied egg-rr48.6%
expm1-def60.2%
expm1-log1p90.3%
associate-*r/90.2%
associate-/l*90.2%
Simplified90.2%
Taylor expanded in x around inf 83.7%
associate-*r/83.7%
associate-*l/83.7%
*-commutative83.7%
Simplified83.7%
if -3.05e224 < x < -3.1999999999999998e164 or -5.6000000000000002e79 < x < 1.5e192Initial program 98.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 64.9%
if -3.1999999999999998e164 < x < -5.6000000000000002e79Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 70.8%
Taylor expanded in z around inf 60.3%
Final simplification68.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ 60.0 (/ (- z t) x))))
(if (<= x -3.05e+224)
t_1
(if (<= x -3.5e+164)
(* a 120.0)
(if (<= x -5.6e+79)
(* 60.0 (/ (- x y) z))
(if (<= x 1.5e+192) (* 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);
double tmp;
if (x <= -3.05e+224) {
tmp = t_1;
} else if (x <= -3.5e+164) {
tmp = a * 120.0;
} else if (x <= -5.6e+79) {
tmp = 60.0 * ((x - y) / z);
} else if (x <= 1.5e+192) {
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)
if (x <= (-3.05d+224)) then
tmp = t_1
else if (x <= (-3.5d+164)) then
tmp = a * 120.0d0
else if (x <= (-5.6d+79)) then
tmp = 60.0d0 * ((x - y) / z)
else if (x <= 1.5d+192) 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);
double tmp;
if (x <= -3.05e+224) {
tmp = t_1;
} else if (x <= -3.5e+164) {
tmp = a * 120.0;
} else if (x <= -5.6e+79) {
tmp = 60.0 * ((x - y) / z);
} else if (x <= 1.5e+192) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 / ((z - t) / x) tmp = 0 if x <= -3.05e+224: tmp = t_1 elif x <= -3.5e+164: tmp = a * 120.0 elif x <= -5.6e+79: tmp = 60.0 * ((x - y) / z) elif x <= 1.5e+192: 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) / x)) tmp = 0.0 if (x <= -3.05e+224) tmp = t_1; elseif (x <= -3.5e+164) tmp = Float64(a * 120.0); elseif (x <= -5.6e+79) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); elseif (x <= 1.5e+192) 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); tmp = 0.0; if (x <= -3.05e+224) tmp = t_1; elseif (x <= -3.5e+164) tmp = a * 120.0; elseif (x <= -5.6e+79) tmp = 60.0 * ((x - y) / z); elseif (x <= 1.5e+192) 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] / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.05e+224], t$95$1, If[LessEqual[x, -3.5e+164], N[(a * 120.0), $MachinePrecision], If[LessEqual[x, -5.6e+79], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.5e+192], N[(a * 120.0), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60}{\frac{z - t}{x}}\\
\mathbf{if}\;x \leq -3.05 \cdot 10^{+224}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -3.5 \cdot 10^{+164}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;x \leq -5.6 \cdot 10^{+79}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{elif}\;x \leq 1.5 \cdot 10^{+192}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.05e224 or 1.5e192 < x Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 90.3%
expm1-log1p-u60.2%
expm1-udef48.6%
Applied egg-rr48.6%
expm1-def60.2%
expm1-log1p90.3%
associate-*r/90.2%
associate-/l*90.2%
Simplified90.2%
Taylor expanded in x around inf 83.7%
if -3.05e224 < x < -3.4999999999999998e164 or -5.6000000000000002e79 < x < 1.5e192Initial program 98.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 64.9%
if -3.4999999999999998e164 < x < -5.6000000000000002e79Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 70.8%
Taylor expanded in z around inf 60.3%
Final simplification68.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ 60.0 (/ (- z t) x))))
(if (<= x -1.35e+225)
t_1
(if (<= x -3.6e+164)
(* a 120.0)
(if (<= x -2.5e+79)
(/ (* 60.0 (- x y)) z)
(if (<= x 3.1e+190) (* 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);
double tmp;
if (x <= -1.35e+225) {
tmp = t_1;
} else if (x <= -3.6e+164) {
tmp = a * 120.0;
} else if (x <= -2.5e+79) {
tmp = (60.0 * (x - y)) / z;
} else if (x <= 3.1e+190) {
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)
if (x <= (-1.35d+225)) then
tmp = t_1
else if (x <= (-3.6d+164)) then
tmp = a * 120.0d0
else if (x <= (-2.5d+79)) then
tmp = (60.0d0 * (x - y)) / z
else if (x <= 3.1d+190) 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);
double tmp;
if (x <= -1.35e+225) {
tmp = t_1;
} else if (x <= -3.6e+164) {
tmp = a * 120.0;
} else if (x <= -2.5e+79) {
tmp = (60.0 * (x - y)) / z;
} else if (x <= 3.1e+190) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 / ((z - t) / x) tmp = 0 if x <= -1.35e+225: tmp = t_1 elif x <= -3.6e+164: tmp = a * 120.0 elif x <= -2.5e+79: tmp = (60.0 * (x - y)) / z elif x <= 3.1e+190: 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) / x)) tmp = 0.0 if (x <= -1.35e+225) tmp = t_1; elseif (x <= -3.6e+164) tmp = Float64(a * 120.0); elseif (x <= -2.5e+79) tmp = Float64(Float64(60.0 * Float64(x - y)) / z); elseif (x <= 3.1e+190) 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); tmp = 0.0; if (x <= -1.35e+225) tmp = t_1; elseif (x <= -3.6e+164) tmp = a * 120.0; elseif (x <= -2.5e+79) tmp = (60.0 * (x - y)) / z; elseif (x <= 3.1e+190) 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] / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.35e+225], t$95$1, If[LessEqual[x, -3.6e+164], N[(a * 120.0), $MachinePrecision], If[LessEqual[x, -2.5e+79], N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[x, 3.1e+190], N[(a * 120.0), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60}{\frac{z - t}{x}}\\
\mathbf{if}\;x \leq -1.35 \cdot 10^{+225}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -3.6 \cdot 10^{+164}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;x \leq -2.5 \cdot 10^{+79}:\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z}\\
\mathbf{elif}\;x \leq 3.1 \cdot 10^{+190}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.3499999999999999e225 or 3.1000000000000001e190 < x Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 90.3%
expm1-log1p-u60.2%
expm1-udef48.6%
Applied egg-rr48.6%
expm1-def60.2%
expm1-log1p90.3%
associate-*r/90.2%
associate-/l*90.2%
Simplified90.2%
Taylor expanded in x around inf 83.7%
if -1.3499999999999999e225 < x < -3.5999999999999999e164 or -2.5e79 < x < 3.1000000000000001e190Initial program 98.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 64.9%
if -3.5999999999999999e164 < x < -2.5e79Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 70.8%
expm1-log1p-u56.1%
expm1-udef43.0%
Applied egg-rr43.0%
expm1-def56.1%
expm1-log1p70.8%
associate-*r/71.0%
associate-/l*71.0%
Simplified71.0%
Taylor expanded in z around inf 60.3%
associate-*r/60.6%
*-commutative60.6%
Simplified60.6%
Final simplification68.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -6.5e+90) (not (<= y 5.4e+87))) (+ (* a 120.0) (/ (* y -60.0) (- z t))) (+ (* a 120.0) (* x (/ 60.0 (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -6.5e+90) || !(y <= 5.4e+87)) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + (x * (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 <= (-6.5d+90)) .or. (.not. (y <= 5.4d+87))) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
else
tmp = (a * 120.0d0) + (x * (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 <= -6.5e+90) || !(y <= 5.4e+87)) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -6.5e+90) or not (y <= 5.4e+87): tmp = (a * 120.0) + ((y * -60.0) / (z - t)) else: tmp = (a * 120.0) + (x * (60.0 / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -6.5e+90) || !(y <= 5.4e+87)) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -6.5e+90) || ~((y <= 5.4e+87))) tmp = (a * 120.0) + ((y * -60.0) / (z - t)); else tmp = (a * 120.0) + (x * (60.0 / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -6.5e+90], N[Not[LessEqual[y, 5.4e+87]], $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[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{+90} \lor \neg \left(y \leq 5.4 \cdot 10^{+87}\right):\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if y < -6.5000000000000001e90 or 5.40000000000000013e87 < y Initial program 97.8%
Taylor expanded in x around 0 88.5%
if -6.5000000000000001e90 < y < 5.40000000000000013e87Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 96.0%
associate-*r/38.8%
associate-*l/38.9%
*-commutative38.9%
Simplified96.0%
Final simplification93.3%
(FPCore (x y z t a) :precision binary64 (if (<= (- x y) -1e+230) (* -60.0 (/ y (- z t))) (if (<= (- x y) 2e+190) (* a 120.0) (* -60.0 (/ (- x y) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x - y) <= -1e+230) {
tmp = -60.0 * (y / (z - t));
} else if ((x - y) <= 2e+190) {
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 ((x - y) <= (-1d+230)) then
tmp = (-60.0d0) * (y / (z - t))
else if ((x - y) <= 2d+190) 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 ((x - y) <= -1e+230) {
tmp = -60.0 * (y / (z - t));
} else if ((x - y) <= 2e+190) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x - y) <= -1e+230: tmp = -60.0 * (y / (z - t)) elif (x - y) <= 2e+190: tmp = a * 120.0 else: tmp = -60.0 * ((x - y) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(x - y) <= -1e+230) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); elseif (Float64(x - y) <= 2e+190) 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 ((x - y) <= -1e+230) tmp = -60.0 * (y / (z - t)); elseif ((x - y) <= 2e+190) tmp = a * 120.0; else tmp = -60.0 * ((x - y) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x - y), $MachinePrecision], -1e+230], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x - y), $MachinePrecision], 2e+190], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x - y \leq -1 \cdot 10^{+230}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;x - y \leq 2 \cdot 10^{+190}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if (-.f64 x y) < -1.0000000000000001e230Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 80.5%
Taylor expanded in x around 0 44.6%
if -1.0000000000000001e230 < (-.f64 x y) < 2.0000000000000001e190Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 69.8%
if 2.0000000000000001e190 < (-.f64 x y) Initial program 96.6%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 85.3%
Taylor expanded in z around 0 53.6%
Final simplification63.1%
(FPCore (x y z t a) :precision binary64 (if (<= (- x y) -1e+230) (* 60.0 (/ (- x y) z)) (if (<= (- x y) 2e+190) (* a 120.0) (* -60.0 (/ (- x y) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x - y) <= -1e+230) {
tmp = 60.0 * ((x - y) / z);
} else if ((x - y) <= 2e+190) {
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 ((x - y) <= (-1d+230)) then
tmp = 60.0d0 * ((x - y) / z)
else if ((x - y) <= 2d+190) 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 ((x - y) <= -1e+230) {
tmp = 60.0 * ((x - y) / z);
} else if ((x - y) <= 2e+190) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x - y) <= -1e+230: tmp = 60.0 * ((x - y) / z) elif (x - y) <= 2e+190: tmp = a * 120.0 else: tmp = -60.0 * ((x - y) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(x - y) <= -1e+230) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); elseif (Float64(x - y) <= 2e+190) 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 ((x - y) <= -1e+230) tmp = 60.0 * ((x - y) / z); elseif ((x - y) <= 2e+190) tmp = a * 120.0; else tmp = -60.0 * ((x - y) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x - y), $MachinePrecision], -1e+230], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x - y), $MachinePrecision], 2e+190], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x - y \leq -1 \cdot 10^{+230}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{elif}\;x - y \leq 2 \cdot 10^{+190}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if (-.f64 x y) < -1.0000000000000001e230Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 80.5%
Taylor expanded in z around inf 57.0%
if -1.0000000000000001e230 < (-.f64 x y) < 2.0000000000000001e190Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 69.8%
if 2.0000000000000001e190 < (-.f64 x y) Initial program 96.6%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 85.3%
Taylor expanded in z around 0 53.6%
Final simplification64.6%
(FPCore (x y z t a)
:precision binary64
(if (<= y -4e+175)
(/ 60.0 (/ (- z t) (- x y)))
(if (<= y 5.5e+146)
(+ (* a 120.0) (* x (/ 60.0 (- z t))))
(/ (* 60.0 (- x y)) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -4e+175) {
tmp = 60.0 / ((z - t) / (x - y));
} else if (y <= 5.5e+146) {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
} 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 (y <= (-4d+175)) then
tmp = 60.0d0 / ((z - t) / (x - y))
else if (y <= 5.5d+146) then
tmp = (a * 120.0d0) + (x * (60.0d0 / (z - t)))
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 (y <= -4e+175) {
tmp = 60.0 / ((z - t) / (x - y));
} else if (y <= 5.5e+146) {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
} else {
tmp = (60.0 * (x - y)) / (z - t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -4e+175: tmp = 60.0 / ((z - t) / (x - y)) elif y <= 5.5e+146: tmp = (a * 120.0) + (x * (60.0 / (z - t))) else: tmp = (60.0 * (x - y)) / (z - t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -4e+175) tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); elseif (y <= 5.5e+146) tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / Float64(z - t)))); 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) tmp = 0.0; if (y <= -4e+175) tmp = 60.0 / ((z - t) / (x - y)); elseif (y <= 5.5e+146) tmp = (a * 120.0) + (x * (60.0 / (z - t))); else tmp = (60.0 * (x - y)) / (z - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -4e+175], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.5e+146], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{+175}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{+146}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\
\end{array}
\end{array}
if y < -3.9999999999999997e175Initial program 93.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around 0 83.0%
expm1-log1p-u44.9%
expm1-udef38.0%
Applied egg-rr38.0%
expm1-def44.9%
expm1-log1p83.0%
associate-*r/76.4%
associate-/l*83.1%
Simplified83.1%
if -3.9999999999999997e175 < y < 5.5000000000000004e146Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 92.8%
associate-*r/35.8%
associate-*l/35.8%
*-commutative35.8%
Simplified92.8%
if 5.5000000000000004e146 < y Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 66.0%
associate-*r/66.2%
Applied egg-rr66.2%
Final simplification87.9%
(FPCore (x y z t a)
:precision binary64
(if (<= y -1.8e+166)
(/ 60.0 (/ (- z t) (- x y)))
(if (<= y 4.8e+92)
(+ (* a 120.0) (* x (/ 60.0 (- z t))))
(+ (* a 120.0) (/ 60.0 (/ z (- x y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.8e+166) {
tmp = 60.0 / ((z - t) / (x - y));
} else if (y <= 4.8e+92) {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
} else {
tmp = (a * 120.0) + (60.0 / (z / (x - y)));
}
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.8d+166)) then
tmp = 60.0d0 / ((z - t) / (x - y))
else if (y <= 4.8d+92) then
tmp = (a * 120.0d0) + (x * (60.0d0 / (z - t)))
else
tmp = (a * 120.0d0) + (60.0d0 / (z / (x - y)))
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.8e+166) {
tmp = 60.0 / ((z - t) / (x - y));
} else if (y <= 4.8e+92) {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
} else {
tmp = (a * 120.0) + (60.0 / (z / (x - y)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.8e+166: tmp = 60.0 / ((z - t) / (x - y)) elif y <= 4.8e+92: tmp = (a * 120.0) + (x * (60.0 / (z - t))) else: tmp = (a * 120.0) + (60.0 / (z / (x - y))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.8e+166) tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); elseif (y <= 4.8e+92) tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / Float64(z - t)))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(z / Float64(x - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.8e+166) tmp = 60.0 / ((z - t) / (x - y)); elseif (y <= 4.8e+92) tmp = (a * 120.0) + (x * (60.0 / (z - t))); else tmp = (a * 120.0) + (60.0 / (z / (x - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.8e+166], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e+92], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+166}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{+92}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z}{x - y}}\\
\end{array}
\end{array}
if y < -1.7999999999999999e166Initial program 93.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around 0 83.0%
expm1-log1p-u44.9%
expm1-udef38.0%
Applied egg-rr38.0%
expm1-def44.9%
expm1-log1p83.0%
associate-*r/76.4%
associate-/l*83.1%
Simplified83.1%
if -1.7999999999999999e166 < y < 4.80000000000000009e92Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 94.5%
associate-*r/36.5%
associate-*l/36.5%
*-commutative36.5%
Simplified94.6%
if 4.80000000000000009e92 < y Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 65.2%
Final simplification87.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -2.7e+225) (not (<= x 3.2e+193))) (* 60.0 (/ x z)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -2.7e+225) || !(x <= 3.2e+193)) {
tmp = 60.0 * (x / z);
} 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 <= (-2.7d+225)) .or. (.not. (x <= 3.2d+193))) then
tmp = 60.0d0 * (x / z)
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 <= -2.7e+225) || !(x <= 3.2e+193)) {
tmp = 60.0 * (x / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -2.7e+225) or not (x <= 3.2e+193): tmp = 60.0 * (x / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -2.7e+225) || !(x <= 3.2e+193)) tmp = Float64(60.0 * Float64(x / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -2.7e+225) || ~((x <= 3.2e+193))) tmp = 60.0 * (x / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -2.7e+225], N[Not[LessEqual[x, 3.2e+193]], $MachinePrecision]], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.7 \cdot 10^{+225} \lor \neg \left(x \leq 3.2 \cdot 10^{+193}\right):\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -2.6999999999999999e225 or 3.20000000000000013e193 < x Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 90.3%
Taylor expanded in z around inf 55.0%
Taylor expanded in x around inf 54.3%
if -2.6999999999999999e225 < x < 3.20000000000000013e193Initial program 99.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 61.8%
Final simplification60.4%
(FPCore (x y z t a) :precision binary64 (if (<= y -6.5e+177) (* -60.0 (/ y z)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -6.5e+177) {
tmp = -60.0 * (y / z);
} 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 (y <= (-6.5d+177)) then
tmp = (-60.0d0) * (y / z)
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 (y <= -6.5e+177) {
tmp = -60.0 * (y / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -6.5e+177: tmp = -60.0 * (y / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -6.5e+177) tmp = Float64(-60.0 * Float64(y / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -6.5e+177) tmp = -60.0 * (y / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -6.5e+177], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{+177}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -6.5000000000000002e177Initial program 93.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around 0 83.0%
Taylor expanded in x around 0 75.4%
Taylor expanded in z around inf 41.4%
if -6.5000000000000002e177 < y Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 56.1%
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.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 52.2%
Final simplification52.2%
(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 2024026
(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)))