
(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 (+ (* 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(60.0 * Float64(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[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
60 \cdot \frac{x - y}{z - t} + a \cdot 120
\end{array}
Initial program 99.0%
associate-/l*99.4%
Simplified99.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* 60.0 (/ (- x y) z)) (* a 120.0))))
(if (<= z -1.95e-25)
t_1
(if (<= z 7.8e-57)
(/ 60.0 (/ (- z t) (- x y)))
(if (<= z 0.28) (+ (* -60.0 (/ x t)) (* 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)) + (a * 120.0);
double tmp;
if (z <= -1.95e-25) {
tmp = t_1;
} else if (z <= 7.8e-57) {
tmp = 60.0 / ((z - t) / (x - y));
} else if (z <= 0.28) {
tmp = (-60.0 * (x / t)) + (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 * ((x - y) / z)) + (a * 120.0d0)
if (z <= (-1.95d-25)) then
tmp = t_1
else if (z <= 7.8d-57) then
tmp = 60.0d0 / ((z - t) / (x - y))
else if (z <= 0.28d0) then
tmp = ((-60.0d0) * (x / t)) + (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)) + (a * 120.0);
double tmp;
if (z <= -1.95e-25) {
tmp = t_1;
} else if (z <= 7.8e-57) {
tmp = 60.0 / ((z - t) / (x - y));
} else if (z <= 0.28) {
tmp = (-60.0 * (x / t)) + (a * 120.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * ((x - y) / z)) + (a * 120.0) tmp = 0 if z <= -1.95e-25: tmp = t_1 elif z <= 7.8e-57: tmp = 60.0 / ((z - t) / (x - y)) elif z <= 0.28: tmp = (-60.0 * (x / t)) + (a * 120.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(Float64(x - y) / z)) + Float64(a * 120.0)) tmp = 0.0 if (z <= -1.95e-25) tmp = t_1; elseif (z <= 7.8e-57) tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); elseif (z <= 0.28) tmp = Float64(Float64(-60.0 * Float64(x / t)) + 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)) + (a * 120.0); tmp = 0.0; if (z <= -1.95e-25) tmp = t_1; elseif (z <= 7.8e-57) tmp = 60.0 / ((z - t) / (x - y)); elseif (z <= 0.28) tmp = (-60.0 * (x / t)) + (a * 120.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.95e-25], t$95$1, If[LessEqual[z, 7.8e-57], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.28], N[(N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z} + a \cdot 120\\
\mathbf{if}\;z \leq -1.95 \cdot 10^{-25}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{-57}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\mathbf{elif}\;z \leq 0.28:\\
\;\;\;\;-60 \cdot \frac{x}{t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.95e-25 or 0.28000000000000003 < z Initial program 99.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 87.2%
if -1.95e-25 < z < 7.80000000000000013e-57Initial program 98.9%
associate-/l*98.9%
Simplified98.9%
Taylor expanded in a around 0 69.6%
associate-*r/69.6%
*-rgt-identity69.6%
times-frac69.5%
/-rgt-identity69.5%
associate-/r/69.6%
Simplified69.6%
if 7.80000000000000013e-57 < z < 0.28000000000000003Initial program 99.9%
Taylor expanded in z around 0 91.3%
neg-mul-191.3%
Simplified91.3%
Taylor expanded in y around 0 91.4%
Final simplification79.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= (- x y) -1e+163) (not (<= (- x y) 5e+111))) (* (- x y) (/ 60.0 (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((x - y) <= -1e+163) || !((x - y) <= 5e+111)) {
tmp = (x - y) * (60.0 / (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 - y) <= (-1d+163)) .or. (.not. ((x - y) <= 5d+111))) then
tmp = (x - y) * (60.0d0 / (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 - y) <= -1e+163) || !((x - y) <= 5e+111)) {
tmp = (x - y) * (60.0 / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((x - y) <= -1e+163) or not ((x - y) <= 5e+111): tmp = (x - y) * (60.0 / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(x - y) <= -1e+163) || !(Float64(x - y) <= 5e+111)) tmp = Float64(Float64(x - y) * Float64(60.0 / 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 - y) <= -1e+163) || ~(((x - y) <= 5e+111))) tmp = (x - y) * (60.0 / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(x - y), $MachinePrecision], -1e+163], N[Not[LessEqual[N[(x - y), $MachinePrecision], 5e+111]], $MachinePrecision]], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x - y \leq -1 \cdot 10^{+163} \lor \neg \left(x - y \leq 5 \cdot 10^{+111}\right):\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (-.f64 x y) < -9.9999999999999994e162 or 4.9999999999999997e111 < (-.f64 x y) Initial program 98.1%
associate-/l*98.9%
Simplified98.9%
Taylor expanded in a around 0 74.3%
associate-*r/73.4%
*-rgt-identity73.4%
times-frac74.3%
/-rgt-identity74.3%
Simplified74.3%
if -9.9999999999999994e162 < (-.f64 x y) < 4.9999999999999997e111Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 73.7%
Final simplification74.0%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -100000.0)
(- (* a 120.0) (/ 60.0 (/ z y)))
(if (<= (* a 120.0) 5e-14)
(* (- x y) (/ 60.0 (- z t)))
(+ (* -60.0 (/ x t)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -100000.0) {
tmp = (a * 120.0) - (60.0 / (z / y));
} else if ((a * 120.0) <= 5e-14) {
tmp = (x - y) * (60.0 / (z - t));
} else {
tmp = (-60.0 * (x / t)) + (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 ((a * 120.0d0) <= (-100000.0d0)) then
tmp = (a * 120.0d0) - (60.0d0 / (z / y))
else if ((a * 120.0d0) <= 5d-14) then
tmp = (x - y) * (60.0d0 / (z - t))
else
tmp = ((-60.0d0) * (x / t)) + (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 ((a * 120.0) <= -100000.0) {
tmp = (a * 120.0) - (60.0 / (z / y));
} else if ((a * 120.0) <= 5e-14) {
tmp = (x - y) * (60.0 / (z - t));
} else {
tmp = (-60.0 * (x / t)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -100000.0: tmp = (a * 120.0) - (60.0 / (z / y)) elif (a * 120.0) <= 5e-14: tmp = (x - y) * (60.0 / (z - t)) else: tmp = (-60.0 * (x / t)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -100000.0) tmp = Float64(Float64(a * 120.0) - Float64(60.0 / Float64(z / y))); elseif (Float64(a * 120.0) <= 5e-14) tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))); else tmp = Float64(Float64(-60.0 * Float64(x / t)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -100000.0) tmp = (a * 120.0) - (60.0 / (z / y)); elseif ((a * 120.0) <= 5e-14) tmp = (x - y) * (60.0 / (z - t)); else tmp = (-60.0 * (x / t)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -100000.0], N[(N[(a * 120.0), $MachinePrecision] - N[(60.0 / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-14], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -100000:\\
\;\;\;\;a \cdot 120 - \frac{60}{\frac{z}{y}}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-14}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x}{t} + a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -1e5Initial program 98.2%
associate-/l*98.2%
Simplified98.2%
Taylor expanded in z around inf 73.0%
clear-num73.0%
un-div-inv73.0%
Applied egg-rr73.0%
Taylor expanded in x around 0 78.5%
associate-*r/78.5%
neg-mul-178.5%
Simplified78.5%
if -1e5 < (*.f64 a #s(literal 120 binary64)) < 5.0000000000000002e-14Initial program 99.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 71.2%
associate-*r/70.5%
*-rgt-identity70.5%
times-frac71.2%
/-rgt-identity71.2%
Simplified71.2%
if 5.0000000000000002e-14 < (*.f64 a #s(literal 120 binary64)) Initial program 99.8%
Taylor expanded in z around 0 80.0%
neg-mul-180.0%
Simplified80.0%
Taylor expanded in y around 0 80.2%
Final simplification75.1%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -100000.0)
(+ (* a 120.0) (* -60.0 (/ y z)))
(if (<= (* a 120.0) 5e-14)
(* (- x y) (/ 60.0 (- z t)))
(+ (* -60.0 (/ x t)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -100000.0) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= 5e-14) {
tmp = (x - y) * (60.0 / (z - t));
} else {
tmp = (-60.0 * (x / t)) + (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 ((a * 120.0d0) <= (-100000.0d0)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else if ((a * 120.0d0) <= 5d-14) then
tmp = (x - y) * (60.0d0 / (z - t))
else
tmp = ((-60.0d0) * (x / t)) + (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 ((a * 120.0) <= -100000.0) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= 5e-14) {
tmp = (x - y) * (60.0 / (z - t));
} else {
tmp = (-60.0 * (x / t)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -100000.0: tmp = (a * 120.0) + (-60.0 * (y / z)) elif (a * 120.0) <= 5e-14: tmp = (x - y) * (60.0 / (z - t)) else: tmp = (-60.0 * (x / t)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -100000.0) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); elseif (Float64(a * 120.0) <= 5e-14) tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))); else tmp = Float64(Float64(-60.0 * Float64(x / t)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -100000.0) tmp = (a * 120.0) + (-60.0 * (y / z)); elseif ((a * 120.0) <= 5e-14) tmp = (x - y) * (60.0 / (z - t)); else tmp = (-60.0 * (x / t)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -100000.0], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-14], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -100000:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-14}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x}{t} + a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -1e5Initial program 98.2%
associate-/l*98.2%
Simplified98.2%
Taylor expanded in z around inf 73.0%
Taylor expanded in x around 0 78.5%
if -1e5 < (*.f64 a #s(literal 120 binary64)) < 5.0000000000000002e-14Initial program 99.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 71.2%
associate-*r/70.5%
*-rgt-identity70.5%
times-frac71.2%
/-rgt-identity71.2%
Simplified71.2%
if 5.0000000000000002e-14 < (*.f64 a #s(literal 120 binary64)) Initial program 99.8%
Taylor expanded in z around 0 80.0%
neg-mul-180.0%
Simplified80.0%
Taylor expanded in y around 0 80.2%
Final simplification75.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1000000000.0) (not (<= z 7800000.0))) (+ (* 60.0 (/ (- x y) z)) (* a 120.0)) (+ (* 60.0 (/ (- y x) t)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1000000000.0) || !(z <= 7800000.0)) {
tmp = (60.0 * ((x - y) / z)) + (a * 120.0);
} else {
tmp = (60.0 * ((y - x) / t)) + (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 ((z <= (-1000000000.0d0)) .or. (.not. (z <= 7800000.0d0))) then
tmp = (60.0d0 * ((x - y) / z)) + (a * 120.0d0)
else
tmp = (60.0d0 * ((y - x) / t)) + (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 ((z <= -1000000000.0) || !(z <= 7800000.0)) {
tmp = (60.0 * ((x - y) / z)) + (a * 120.0);
} else {
tmp = (60.0 * ((y - x) / t)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1000000000.0) or not (z <= 7800000.0): tmp = (60.0 * ((x - y) / z)) + (a * 120.0) else: tmp = (60.0 * ((y - x) / t)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1000000000.0) || !(z <= 7800000.0)) tmp = Float64(Float64(60.0 * Float64(Float64(x - y) / z)) + Float64(a * 120.0)); else tmp = Float64(Float64(60.0 * Float64(Float64(y - x) / t)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1000000000.0) || ~((z <= 7800000.0))) tmp = (60.0 * ((x - y) / z)) + (a * 120.0); else tmp = (60.0 * ((y - x) / t)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1000000000.0], N[Not[LessEqual[z, 7800000.0]], $MachinePrecision]], N[(N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(60.0 * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1000000000 \lor \neg \left(z \leq 7800000\right):\\
\;\;\;\;60 \cdot \frac{x - y}{z} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{y - x}{t} + a \cdot 120\\
\end{array}
\end{array}
if z < -1e9 or 7.8e6 < z Initial program 99.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 90.9%
if -1e9 < z < 7.8e6Initial program 99.0%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in z around 0 82.0%
associate-*r/82.0%
neg-mul-182.0%
neg-sub082.0%
sub-neg82.0%
+-commutative82.0%
associate--r+82.0%
neg-sub082.0%
remove-double-neg82.0%
Simplified82.0%
Final simplification86.2%
(FPCore (x y z t a)
:precision binary64
(if (<= y -4.3e+163)
(+ (/ (* 60.0 (- y x)) t) (* a 120.0))
(if (<= y 1.35e+156)
(+ (/ (* 60.0 x) (- z t)) (* a 120.0))
(* (- x y) (/ 60.0 (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -4.3e+163) {
tmp = ((60.0 * (y - x)) / t) + (a * 120.0);
} else if (y <= 1.35e+156) {
tmp = ((60.0 * x) / (z - t)) + (a * 120.0);
} else {
tmp = (x - 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 <= (-4.3d+163)) then
tmp = ((60.0d0 * (y - x)) / t) + (a * 120.0d0)
else if (y <= 1.35d+156) then
tmp = ((60.0d0 * x) / (z - t)) + (a * 120.0d0)
else
tmp = (x - 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 <= -4.3e+163) {
tmp = ((60.0 * (y - x)) / t) + (a * 120.0);
} else if (y <= 1.35e+156) {
tmp = ((60.0 * x) / (z - t)) + (a * 120.0);
} else {
tmp = (x - y) * (60.0 / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -4.3e+163: tmp = ((60.0 * (y - x)) / t) + (a * 120.0) elif y <= 1.35e+156: tmp = ((60.0 * x) / (z - t)) + (a * 120.0) else: tmp = (x - y) * (60.0 / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -4.3e+163) tmp = Float64(Float64(Float64(60.0 * Float64(y - x)) / t) + Float64(a * 120.0)); elseif (y <= 1.35e+156) tmp = Float64(Float64(Float64(60.0 * x) / Float64(z - t)) + Float64(a * 120.0)); else tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -4.3e+163) tmp = ((60.0 * (y - x)) / t) + (a * 120.0); elseif (y <= 1.35e+156) tmp = ((60.0 * x) / (z - t)) + (a * 120.0); else tmp = (x - y) * (60.0 / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -4.3e+163], N[(N[(N[(60.0 * N[(y - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.35e+156], N[(N[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.3 \cdot 10^{+163}:\\
\;\;\;\;\frac{60 \cdot \left(y - x\right)}{t} + a \cdot 120\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{+156}:\\
\;\;\;\;\frac{60 \cdot x}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if y < -4.3000000000000002e163Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 71.0%
associate-*r/71.0%
neg-mul-171.0%
neg-sub071.0%
sub-neg71.0%
+-commutative71.0%
associate--r+71.0%
neg-sub071.0%
remove-double-neg71.0%
Simplified71.0%
*-commutative71.0%
associate-*l/71.1%
Applied egg-rr71.1%
if -4.3000000000000002e163 < y < 1.35e156Initial program 99.3%
Taylor expanded in x around inf 89.3%
if 1.35e156 < y Initial program 95.3%
associate-/l*95.3%
Simplified95.3%
Taylor expanded in a around 0 90.5%
associate-*r/90.6%
*-rgt-identity90.6%
times-frac90.7%
/-rgt-identity90.7%
Simplified90.7%
Final simplification86.8%
(FPCore (x y z t a)
:precision binary64
(if (<= y -7e+163)
(+ (* 60.0 (/ (- y x) t)) (* a 120.0))
(if (<= y 1.7e+153)
(+ (/ (* 60.0 x) (- z t)) (* a 120.0))
(* (- x y) (/ 60.0 (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -7e+163) {
tmp = (60.0 * ((y - x) / t)) + (a * 120.0);
} else if (y <= 1.7e+153) {
tmp = ((60.0 * x) / (z - t)) + (a * 120.0);
} else {
tmp = (x - 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 <= (-7d+163)) then
tmp = (60.0d0 * ((y - x) / t)) + (a * 120.0d0)
else if (y <= 1.7d+153) then
tmp = ((60.0d0 * x) / (z - t)) + (a * 120.0d0)
else
tmp = (x - 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 <= -7e+163) {
tmp = (60.0 * ((y - x) / t)) + (a * 120.0);
} else if (y <= 1.7e+153) {
tmp = ((60.0 * x) / (z - t)) + (a * 120.0);
} else {
tmp = (x - y) * (60.0 / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -7e+163: tmp = (60.0 * ((y - x) / t)) + (a * 120.0) elif y <= 1.7e+153: tmp = ((60.0 * x) / (z - t)) + (a * 120.0) else: tmp = (x - y) * (60.0 / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -7e+163) tmp = Float64(Float64(60.0 * Float64(Float64(y - x) / t)) + Float64(a * 120.0)); elseif (y <= 1.7e+153) tmp = Float64(Float64(Float64(60.0 * x) / Float64(z - t)) + Float64(a * 120.0)); else tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -7e+163) tmp = (60.0 * ((y - x) / t)) + (a * 120.0); elseif (y <= 1.7e+153) tmp = ((60.0 * x) / (z - t)) + (a * 120.0); else tmp = (x - y) * (60.0 / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -7e+163], N[(N[(60.0 * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.7e+153], N[(N[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+163}:\\
\;\;\;\;60 \cdot \frac{y - x}{t} + a \cdot 120\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{+153}:\\
\;\;\;\;\frac{60 \cdot x}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if y < -7.0000000000000005e163Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 71.0%
associate-*r/71.0%
neg-mul-171.0%
neg-sub071.0%
sub-neg71.0%
+-commutative71.0%
associate--r+71.0%
neg-sub071.0%
remove-double-neg71.0%
Simplified71.0%
if -7.0000000000000005e163 < y < 1.6999999999999999e153Initial program 99.3%
Taylor expanded in x around inf 89.3%
if 1.6999999999999999e153 < y Initial program 95.3%
associate-/l*95.3%
Simplified95.3%
Taylor expanded in a around 0 90.5%
associate-*r/90.6%
*-rgt-identity90.6%
times-frac90.7%
/-rgt-identity90.7%
Simplified90.7%
Final simplification86.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -62000000000.0)
(+ (* 60.0 (/ (- x y) z)) (* a 120.0))
(if (<= z 3400000000.0)
(+ (* 60.0 (/ (- y x) t)) (* a 120.0))
(+ (/ 60.0 (/ z (- x y))) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -62000000000.0) {
tmp = (60.0 * ((x - y) / z)) + (a * 120.0);
} else if (z <= 3400000000.0) {
tmp = (60.0 * ((y - x) / t)) + (a * 120.0);
} else {
tmp = (60.0 / (z / (x - y))) + (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 (z <= (-62000000000.0d0)) then
tmp = (60.0d0 * ((x - y) / z)) + (a * 120.0d0)
else if (z <= 3400000000.0d0) then
tmp = (60.0d0 * ((y - x) / t)) + (a * 120.0d0)
else
tmp = (60.0d0 / (z / (x - y))) + (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 (z <= -62000000000.0) {
tmp = (60.0 * ((x - y) / z)) + (a * 120.0);
} else if (z <= 3400000000.0) {
tmp = (60.0 * ((y - x) / t)) + (a * 120.0);
} else {
tmp = (60.0 / (z / (x - y))) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -62000000000.0: tmp = (60.0 * ((x - y) / z)) + (a * 120.0) elif z <= 3400000000.0: tmp = (60.0 * ((y - x) / t)) + (a * 120.0) else: tmp = (60.0 / (z / (x - y))) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -62000000000.0) tmp = Float64(Float64(60.0 * Float64(Float64(x - y) / z)) + Float64(a * 120.0)); elseif (z <= 3400000000.0) tmp = Float64(Float64(60.0 * Float64(Float64(y - x) / t)) + Float64(a * 120.0)); else tmp = Float64(Float64(60.0 / Float64(z / Float64(x - y))) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -62000000000.0) tmp = (60.0 * ((x - y) / z)) + (a * 120.0); elseif (z <= 3400000000.0) tmp = (60.0 * ((y - x) / t)) + (a * 120.0); else tmp = (60.0 / (z / (x - y))) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -62000000000.0], N[(N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3400000000.0], N[(N[(60.0 * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(60.0 / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -62000000000:\\
\;\;\;\;60 \cdot \frac{x - y}{z} + a \cdot 120\\
\mathbf{elif}\;z \leq 3400000000:\\
\;\;\;\;60 \cdot \frac{y - x}{t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{\frac{z}{x - y}} + a \cdot 120\\
\end{array}
\end{array}
if z < -6.2e10Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 91.1%
if -6.2e10 < z < 3.4e9Initial program 99.0%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in z around 0 82.0%
associate-*r/82.0%
neg-mul-182.0%
neg-sub082.0%
sub-neg82.0%
+-commutative82.0%
associate--r+82.0%
neg-sub082.0%
remove-double-neg82.0%
Simplified82.0%
if 3.4e9 < z Initial program 98.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 90.7%
clear-num90.7%
un-div-inv90.8%
Applied egg-rr90.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -7.5e-52) (not (<= a 3.1e-16))) (+ (* -60.0 (/ x t)) (* a 120.0)) (* (- x y) (/ 60.0 (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -7.5e-52) || !(a <= 3.1e-16)) {
tmp = (-60.0 * (x / t)) + (a * 120.0);
} else {
tmp = (x - 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 ((a <= (-7.5d-52)) .or. (.not. (a <= 3.1d-16))) then
tmp = ((-60.0d0) * (x / t)) + (a * 120.0d0)
else
tmp = (x - 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 ((a <= -7.5e-52) || !(a <= 3.1e-16)) {
tmp = (-60.0 * (x / t)) + (a * 120.0);
} else {
tmp = (x - y) * (60.0 / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -7.5e-52) or not (a <= 3.1e-16): tmp = (-60.0 * (x / t)) + (a * 120.0) else: tmp = (x - y) * (60.0 / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -7.5e-52) || !(a <= 3.1e-16)) tmp = Float64(Float64(-60.0 * Float64(x / t)) + Float64(a * 120.0)); else tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -7.5e-52) || ~((a <= 3.1e-16))) tmp = (-60.0 * (x / t)) + (a * 120.0); else tmp = (x - y) * (60.0 / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -7.5e-52], N[Not[LessEqual[a, 3.1e-16]], $MachinePrecision]], N[(N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.5 \cdot 10^{-52} \lor \neg \left(a \leq 3.1 \cdot 10^{-16}\right):\\
\;\;\;\;-60 \cdot \frac{x}{t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if a < -7.50000000000000006e-52 or 3.1000000000000001e-16 < a Initial program 99.1%
Taylor expanded in z around 0 76.0%
neg-mul-176.0%
Simplified76.0%
Taylor expanded in y around 0 75.8%
if -7.50000000000000006e-52 < a < 3.1000000000000001e-16Initial program 98.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 73.3%
associate-*r/72.5%
*-rgt-identity72.5%
times-frac73.3%
/-rgt-identity73.3%
Simplified73.3%
Final simplification74.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -9.4e+173) (not (<= x 7.4e+112))) (/ x (* (- z t) 0.016666666666666666)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -9.4e+173) || !(x <= 7.4e+112)) {
tmp = x / ((z - t) * 0.016666666666666666);
} 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 <= (-9.4d+173)) .or. (.not. (x <= 7.4d+112))) then
tmp = x / ((z - t) * 0.016666666666666666d0)
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 <= -9.4e+173) || !(x <= 7.4e+112)) {
tmp = x / ((z - t) * 0.016666666666666666);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -9.4e+173) or not (x <= 7.4e+112): tmp = x / ((z - t) * 0.016666666666666666) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -9.4e+173) || !(x <= 7.4e+112)) tmp = Float64(x / Float64(Float64(z - t) * 0.016666666666666666)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -9.4e+173) || ~((x <= 7.4e+112))) tmp = x / ((z - t) * 0.016666666666666666); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -9.4e+173], N[Not[LessEqual[x, 7.4e+112]], $MachinePrecision]], N[(x / N[(N[(z - t), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.4 \cdot 10^{+173} \lor \neg \left(x \leq 7.4 \cdot 10^{+112}\right):\\
\;\;\;\;\frac{x}{\left(z - t\right) \cdot 0.016666666666666666}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -9.4000000000000003e173 or 7.40000000000000008e112 < x Initial program 98.5%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 74.9%
associate-*r/73.6%
*-rgt-identity73.6%
times-frac74.9%
/-rgt-identity74.9%
Simplified74.9%
Taylor expanded in x around inf 69.5%
*-commutative69.5%
metadata-eval69.5%
times-frac69.6%
*-rgt-identity69.6%
Simplified69.6%
if -9.4000000000000003e173 < x < 7.40000000000000008e112Initial program 99.2%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in z around inf 61.9%
Final simplification64.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -7.6e+171) (not (<= x 1.5e+113))) (* 60.0 (/ x (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -7.6e+171) || !(x <= 1.5e+113)) {
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 <= (-7.6d+171)) .or. (.not. (x <= 1.5d+113))) 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 <= -7.6e+171) || !(x <= 1.5e+113)) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -7.6e+171) or not (x <= 1.5e+113): 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 <= -7.6e+171) || !(x <= 1.5e+113)) 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 <= -7.6e+171) || ~((x <= 1.5e+113))) 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, -7.6e+171], N[Not[LessEqual[x, 1.5e+113]], $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 -7.6 \cdot 10^{+171} \lor \neg \left(x \leq 1.5 \cdot 10^{+113}\right):\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -7.6000000000000004e171 or 1.5e113 < x Initial program 98.5%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 69.5%
if -7.6000000000000004e171 < x < 1.5e113Initial program 99.2%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in z around inf 61.9%
Final simplification64.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -5.8e+163) (not (<= y 9.7e+154))) (* -60.0 (/ y (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -5.8e+163) || !(y <= 9.7e+154)) {
tmp = -60.0 * (y / (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 ((y <= (-5.8d+163)) .or. (.not. (y <= 9.7d+154))) then
tmp = (-60.0d0) * (y / (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 ((y <= -5.8e+163) || !(y <= 9.7e+154)) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -5.8e+163) or not (y <= 9.7e+154): tmp = -60.0 * (y / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -5.8e+163) || !(y <= 9.7e+154)) tmp = Float64(-60.0 * Float64(y / 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 ((y <= -5.8e+163) || ~((y <= 9.7e+154))) tmp = -60.0 * (y / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -5.8e+163], N[Not[LessEqual[y, 9.7e+154]], $MachinePrecision]], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{+163} \lor \neg \left(y \leq 9.7 \cdot 10^{+154}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -5.79999999999999996e163 or 9.69999999999999987e154 < y Initial program 98.0%
associate-/l*98.0%
Simplified98.0%
Taylor expanded in y around inf 62.9%
if -5.79999999999999996e163 < y < 9.69999999999999987e154Initial program 99.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 59.0%
Final simplification59.9%
(FPCore (x y z t a) :precision binary64 (if (<= x -9.2e+171) (* 60.0 (/ x (- z t))) (if (<= x 2.8e+112) (* a 120.0) (* x (/ 60.0 (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -9.2e+171) {
tmp = 60.0 * (x / (z - t));
} else if (x <= 2.8e+112) {
tmp = a * 120.0;
} else {
tmp = 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 (x <= (-9.2d+171)) then
tmp = 60.0d0 * (x / (z - t))
else if (x <= 2.8d+112) then
tmp = a * 120.0d0
else
tmp = 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 (x <= -9.2e+171) {
tmp = 60.0 * (x / (z - t));
} else if (x <= 2.8e+112) {
tmp = a * 120.0;
} else {
tmp = x * (60.0 / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -9.2e+171: tmp = 60.0 * (x / (z - t)) elif x <= 2.8e+112: tmp = a * 120.0 else: tmp = x * (60.0 / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -9.2e+171) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (x <= 2.8e+112) tmp = Float64(a * 120.0); else tmp = 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 (x <= -9.2e+171) tmp = 60.0 * (x / (z - t)); elseif (x <= 2.8e+112) tmp = a * 120.0; else tmp = x * (60.0 / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -9.2e+171], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.8e+112], N[(a * 120.0), $MachinePrecision], N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.2 \cdot 10^{+171}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{+112}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if x < -9.20000000000000069e171Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 71.9%
if -9.20000000000000069e171 < x < 2.8000000000000001e112Initial program 99.2%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in z around inf 61.9%
if 2.8000000000000001e112 < x Initial program 97.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 74.7%
associate-*r/72.8%
*-rgt-identity72.8%
times-frac74.8%
/-rgt-identity74.8%
Simplified74.8%
Taylor expanded in x around inf 68.3%
Final simplification64.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -7.5e+187) (not (<= x 6.5e+133))) (* -60.0 (/ x t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -7.5e+187) || !(x <= 6.5e+133)) {
tmp = -60.0 * (x / 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 <= (-7.5d+187)) .or. (.not. (x <= 6.5d+133))) then
tmp = (-60.0d0) * (x / 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 <= -7.5e+187) || !(x <= 6.5e+133)) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -7.5e+187) or not (x <= 6.5e+133): tmp = -60.0 * (x / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -7.5e+187) || !(x <= 6.5e+133)) tmp = Float64(-60.0 * Float64(x / 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 <= -7.5e+187) || ~((x <= 6.5e+133))) tmp = -60.0 * (x / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -7.5e+187], N[Not[LessEqual[x, 6.5e+133]], $MachinePrecision]], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.5 \cdot 10^{+187} \lor \neg \left(x \leq 6.5 \cdot 10^{+133}\right):\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -7.5000000000000002e187 or 6.5000000000000004e133 < x Initial program 98.3%
Taylor expanded in z around 0 63.8%
neg-mul-163.8%
Simplified63.8%
Taylor expanded in x around inf 43.4%
if -7.5000000000000002e187 < x < 6.5000000000000004e133Initial program 99.3%
associate-/l*99.3%
Simplified99.3%
Taylor expanded in z around inf 60.4%
Final simplification56.0%
(FPCore (x y z t a) :precision binary64 (if (<= x -7.5e+183) (* -60.0 (/ x t)) (if (<= x 2.35e+139) (* a 120.0) (* 60.0 (/ x z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -7.5e+183) {
tmp = -60.0 * (x / t);
} else if (x <= 2.35e+139) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / z);
}
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 <= (-7.5d+183)) then
tmp = (-60.0d0) * (x / t)
else if (x <= 2.35d+139) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -7.5e+183) {
tmp = -60.0 * (x / t);
} else if (x <= 2.35e+139) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -7.5e+183: tmp = -60.0 * (x / t) elif x <= 2.35e+139: tmp = a * 120.0 else: tmp = 60.0 * (x / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -7.5e+183) tmp = Float64(-60.0 * Float64(x / t)); elseif (x <= 2.35e+139) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -7.5e+183) tmp = -60.0 * (x / t); elseif (x <= 2.35e+139) tmp = a * 120.0; else tmp = 60.0 * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -7.5e+183], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.35e+139], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.5 \cdot 10^{+183}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{elif}\;x \leq 2.35 \cdot 10^{+139}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\end{array}
\end{array}
if x < -7.49999999999999966e183Initial program 99.7%
Taylor expanded in z around 0 69.8%
neg-mul-169.8%
Simplified69.8%
Taylor expanded in x around inf 52.0%
if -7.49999999999999966e183 < x < 2.35e139Initial program 99.3%
associate-/l*99.3%
Simplified99.3%
Taylor expanded in z around inf 60.1%
if 2.35e139 < x Initial program 97.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 59.5%
Taylor expanded in x around inf 42.8%
Final simplification56.6%
(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 51.2%
Final simplification51.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 2024137
(FPCore (x y z t a)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
:precision binary64
:alt
(! :herbie-platform default (+ (/ 60 (/ (- z t) (- x y))) (* a 120)))
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))