
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
(FPCore (x y z t a) :precision binary64 (fma 60.0 (/ (- x y) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return fma(60.0, ((x - y) / (z - t)), (a * 120.0));
}
function code(x, y, z, t, a) return fma(60.0, Float64(Float64(x - y) / Float64(z - t)), Float64(a * 120.0)) end
code[x_, y_, z_, t_, a_] := N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(60, \frac{x - y}{z - t}, a \cdot 120\right)
\end{array}
Initial program 99.8%
associate-*r/99.8%
fma-def99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ y (- z t)))))
(if (<= (- x y) -1e+264)
t_1
(if (<= (- x y) 5e+159)
(* a 120.0)
(if (<= (- x y) 2e+221)
t_1
(if (<= (- x y) 5e+247)
(* 60.0 (/ x (- z t)))
(* -60.0 (/ (- x y) t))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double tmp;
if ((x - y) <= -1e+264) {
tmp = t_1;
} else if ((x - y) <= 5e+159) {
tmp = a * 120.0;
} else if ((x - y) <= 2e+221) {
tmp = t_1;
} else if ((x - y) <= 5e+247) {
tmp = 60.0 * (x / (z - t));
} 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) :: t_1
real(8) :: tmp
t_1 = (-60.0d0) * (y / (z - t))
if ((x - y) <= (-1d+264)) then
tmp = t_1
else if ((x - y) <= 5d+159) then
tmp = a * 120.0d0
else if ((x - y) <= 2d+221) then
tmp = t_1
else if ((x - y) <= 5d+247) then
tmp = 60.0d0 * (x / (z - t))
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 t_1 = -60.0 * (y / (z - t));
double tmp;
if ((x - y) <= -1e+264) {
tmp = t_1;
} else if ((x - y) <= 5e+159) {
tmp = a * 120.0;
} else if ((x - y) <= 2e+221) {
tmp = t_1;
} else if ((x - y) <= 5e+247) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (y / (z - t)) tmp = 0 if (x - y) <= -1e+264: tmp = t_1 elif (x - y) <= 5e+159: tmp = a * 120.0 elif (x - y) <= 2e+221: tmp = t_1 elif (x - y) <= 5e+247: tmp = 60.0 * (x / (z - t)) else: tmp = -60.0 * ((x - y) / t) return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(y / Float64(z - t))) tmp = 0.0 if (Float64(x - y) <= -1e+264) tmp = t_1; elseif (Float64(x - y) <= 5e+159) tmp = Float64(a * 120.0); elseif (Float64(x - y) <= 2e+221) tmp = t_1; elseif (Float64(x - y) <= 5e+247) tmp = Float64(60.0 * Float64(x / Float64(z - t))); else tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * (y / (z - t)); tmp = 0.0; if ((x - y) <= -1e+264) tmp = t_1; elseif ((x - y) <= 5e+159) tmp = a * 120.0; elseif ((x - y) <= 2e+221) tmp = t_1; elseif ((x - y) <= 5e+247) tmp = 60.0 * (x / (z - t)); else tmp = -60.0 * ((x - y) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x - y), $MachinePrecision], -1e+264], t$95$1, If[LessEqual[N[(x - y), $MachinePrecision], 5e+159], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(x - y), $MachinePrecision], 2e+221], t$95$1, If[LessEqual[N[(x - y), $MachinePrecision], 5e+247], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
\mathbf{if}\;x - y \leq -1 \cdot 10^{+264}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x - y \leq 5 \cdot 10^{+159}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;x - y \leq 2 \cdot 10^{+221}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x - y \leq 5 \cdot 10^{+247}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if (-.f64 x y) < -1.00000000000000004e264 or 5.00000000000000003e159 < (-.f64 x y) < 2.0000000000000001e221Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 67.0%
if -1.00000000000000004e264 < (-.f64 x y) < 5.00000000000000003e159Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 63.5%
if 2.0000000000000001e221 < (-.f64 x y) < 5.00000000000000023e247Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 61.8%
if 5.00000000000000023e247 < (-.f64 x y) Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 81.2%
Taylor expanded in a around 0 67.0%
Final simplification64.1%
(FPCore (x y z t a)
:precision binary64
(if (<= (- x y) -1e+264)
(* y (/ -60.0 (- z t)))
(if (<= (- x y) 5e+159)
(* a 120.0)
(if (<= (- x y) 2e+221)
(* -60.0 (/ y (- z t)))
(if (<= (- x y) 5e+247)
(* 60.0 (/ x (- z t)))
(* -60.0 (/ (- x y) t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x - y) <= -1e+264) {
tmp = y * (-60.0 / (z - t));
} else if ((x - y) <= 5e+159) {
tmp = a * 120.0;
} else if ((x - y) <= 2e+221) {
tmp = -60.0 * (y / (z - t));
} else if ((x - y) <= 5e+247) {
tmp = 60.0 * (x / (z - t));
} 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+264)) then
tmp = y * ((-60.0d0) / (z - t))
else if ((x - y) <= 5d+159) then
tmp = a * 120.0d0
else if ((x - y) <= 2d+221) then
tmp = (-60.0d0) * (y / (z - t))
else if ((x - y) <= 5d+247) then
tmp = 60.0d0 * (x / (z - t))
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+264) {
tmp = y * (-60.0 / (z - t));
} else if ((x - y) <= 5e+159) {
tmp = a * 120.0;
} else if ((x - y) <= 2e+221) {
tmp = -60.0 * (y / (z - t));
} else if ((x - y) <= 5e+247) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x - y) <= -1e+264: tmp = y * (-60.0 / (z - t)) elif (x - y) <= 5e+159: tmp = a * 120.0 elif (x - y) <= 2e+221: tmp = -60.0 * (y / (z - t)) elif (x - y) <= 5e+247: tmp = 60.0 * (x / (z - t)) else: tmp = -60.0 * ((x - y) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(x - y) <= -1e+264) tmp = Float64(y * Float64(-60.0 / Float64(z - t))); elseif (Float64(x - y) <= 5e+159) tmp = Float64(a * 120.0); elseif (Float64(x - y) <= 2e+221) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); elseif (Float64(x - y) <= 5e+247) tmp = Float64(60.0 * Float64(x / Float64(z - t))); 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+264) tmp = y * (-60.0 / (z - t)); elseif ((x - y) <= 5e+159) tmp = a * 120.0; elseif ((x - y) <= 2e+221) tmp = -60.0 * (y / (z - t)); elseif ((x - y) <= 5e+247) tmp = 60.0 * (x / (z - t)); 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+264], N[(y * N[(-60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x - y), $MachinePrecision], 5e+159], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(x - y), $MachinePrecision], 2e+221], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x - y), $MachinePrecision], 5e+247], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $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^{+264}:\\
\;\;\;\;y \cdot \frac{-60}{z - t}\\
\mathbf{elif}\;x - y \leq 5 \cdot 10^{+159}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;x - y \leq 2 \cdot 10^{+221}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;x - y \leq 5 \cdot 10^{+247}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if (-.f64 x y) < -1.00000000000000004e264Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
associate-/r/100.0%
Applied egg-rr100.0%
Taylor expanded in y around inf 64.8%
associate-*r/65.0%
Simplified65.0%
associate-/l*64.8%
associate-/r/65.0%
Applied egg-rr65.0%
if -1.00000000000000004e264 < (-.f64 x y) < 5.00000000000000003e159Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 63.5%
if 5.00000000000000003e159 < (-.f64 x y) < 2.0000000000000001e221Initial program 99.4%
associate-/l*99.5%
Simplified99.5%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 68.8%
if 2.0000000000000001e221 < (-.f64 x y) < 5.00000000000000023e247Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 61.8%
if 5.00000000000000023e247 < (-.f64 x y) Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 81.2%
Taylor expanded in a around 0 67.0%
Final simplification64.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -1e-82) (not (<= (* a 120.0) 3e-16))) (+ (* a 120.0) (/ -60.0 (/ (- z t) y))) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -1e-82) || !((a * 120.0) <= 3e-16)) {
tmp = (a * 120.0) + (-60.0 / ((z - t) / y));
} 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) <= (-1d-82)) .or. (.not. ((a * 120.0d0) <= 3d-16))) then
tmp = (a * 120.0d0) + ((-60.0d0) / ((z - t) / y))
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) <= -1e-82) || !((a * 120.0) <= 3e-16)) {
tmp = (a * 120.0) + (-60.0 / ((z - t) / y));
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -1e-82) or not ((a * 120.0) <= 3e-16): tmp = (a * 120.0) + (-60.0 / ((z - t) / y)) 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) <= -1e-82) || !(Float64(a * 120.0) <= 3e-16)) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 / Float64(Float64(z - t) / y))); 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) <= -1e-82) || ~(((a * 120.0) <= 3e-16))) tmp = (a * 120.0) + (-60.0 / ((z - t) / y)); 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], -1e-82], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 3e-16]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $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 -1 \cdot 10^{-82} \lor \neg \left(a \cdot 120 \leq 3 \cdot 10^{-16}\right):\\
\;\;\;\;a \cdot 120 + \frac{-60}{\frac{z - t}{y}}\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (*.f64 a 120) < -1e-82 or 2.99999999999999994e-16 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 86.2%
associate-*r/86.2%
associate-/l*86.2%
Simplified86.2%
if -1e-82 < (*.f64 a 120) < 2.99999999999999994e-16Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 84.5%
Final simplification85.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* a 120.0) (/ x (/ z 60.0)))))
(if (<= z -8.5e+60)
t_1
(if (<= z 6.5e-24)
(+ (* a 120.0) (* -60.0 (/ (- x y) t)))
(if (<= z 9.2e+44)
(* 60.0 (/ (- x y) (- z t)))
(if (<= z 2.3e+209) (+ (* a 120.0) (* -60.0 (/ y z))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (x / (z / 60.0));
double tmp;
if (z <= -8.5e+60) {
tmp = t_1;
} else if (z <= 6.5e-24) {
tmp = (a * 120.0) + (-60.0 * ((x - y) / t));
} else if (z <= 9.2e+44) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (z <= 2.3e+209) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (a * 120.0d0) + (x / (z / 60.0d0))
if (z <= (-8.5d+60)) then
tmp = t_1
else if (z <= 6.5d-24) then
tmp = (a * 120.0d0) + ((-60.0d0) * ((x - y) / t))
else if (z <= 9.2d+44) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if (z <= 2.3d+209) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (x / (z / 60.0));
double tmp;
if (z <= -8.5e+60) {
tmp = t_1;
} else if (z <= 6.5e-24) {
tmp = (a * 120.0) + (-60.0 * ((x - y) / t));
} else if (z <= 9.2e+44) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (z <= 2.3e+209) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a * 120.0) + (x / (z / 60.0)) tmp = 0 if z <= -8.5e+60: tmp = t_1 elif z <= 6.5e-24: tmp = (a * 120.0) + (-60.0 * ((x - y) / t)) elif z <= 9.2e+44: tmp = 60.0 * ((x - y) / (z - t)) elif z <= 2.3e+209: tmp = (a * 120.0) + (-60.0 * (y / z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(a * 120.0) + Float64(x / Float64(z / 60.0))) tmp = 0.0 if (z <= -8.5e+60) tmp = t_1; elseif (z <= 6.5e-24) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(Float64(x - y) / t))); elseif (z <= 9.2e+44) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (z <= 2.3e+209) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (a * 120.0) + (x / (z / 60.0)); tmp = 0.0; if (z <= -8.5e+60) tmp = t_1; elseif (z <= 6.5e-24) tmp = (a * 120.0) + (-60.0 * ((x - y) / t)); elseif (z <= 9.2e+44) tmp = 60.0 * ((x - y) / (z - t)); elseif (z <= 2.3e+209) tmp = (a * 120.0) + (-60.0 * (y / z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a * 120.0), $MachinePrecision] + N[(x / N[(z / 60.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.5e+60], t$95$1, If[LessEqual[z, 6.5e-24], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.2e+44], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.3e+209], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot 120 + \frac{x}{\frac{z}{60}}\\
\mathbf{if}\;z \leq -8.5 \cdot 10^{+60}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-24}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x - y}{t}\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{+44}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{+209}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -8.50000000000000064e60 or 2.3000000000000001e209 < z Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 89.9%
Taylor expanded in z around inf 86.9%
associate-*r/87.0%
*-commutative87.0%
associate-/l*87.0%
Simplified87.0%
if -8.50000000000000064e60 < z < 6.5e-24Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 80.8%
if 6.5e-24 < z < 9.20000000000000018e44Initial program 99.5%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 89.8%
if 9.20000000000000018e44 < z < 2.3000000000000001e209Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in x around 0 89.7%
fma-def89.8%
associate-*r/89.9%
Simplified89.9%
Taylor expanded in t around 0 80.5%
Final simplification82.7%
(FPCore (x y z t a) :precision binary64 (if (<= (* a 120.0) -0.0001) (* a 120.0) (if (<= (* a 120.0) 2e-15) (* 60.0 (/ (- x y) (- z t))) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -0.0001) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e-15) {
tmp = 60.0 * ((x - 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 ((a * 120.0d0) <= (-0.0001d0)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 2d-15) then
tmp = 60.0d0 * ((x - 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 ((a * 120.0) <= -0.0001) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e-15) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -0.0001: tmp = a * 120.0 elif (a * 120.0) <= 2e-15: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -0.0001) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 2e-15) tmp = Float64(60.0 * Float64(Float64(x - 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 ((a * 120.0) <= -0.0001) tmp = a * 120.0; elseif ((a * 120.0) <= 2e-15) tmp = 60.0 * ((x - y) / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -0.0001], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-15], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -0.0001:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-15}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -1.00000000000000005e-4 or 2.0000000000000002e-15 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 78.2%
if -1.00000000000000005e-4 < (*.f64 a 120) < 2.0000000000000002e-15Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 80.5%
Final simplification79.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -3.2e+39) (not (<= y 8e+69))) (+ (* a 120.0) (/ -60.0 (/ (- z t) y))) (+ (* a 120.0) (/ 60.0 (/ (- z t) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3.2e+39) || !(y <= 8e+69)) {
tmp = (a * 120.0) + (-60.0 / ((z - t) / y));
} else {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-3.2d+39)) .or. (.not. (y <= 8d+69))) then
tmp = (a * 120.0d0) + ((-60.0d0) / ((z - t) / y))
else
tmp = (a * 120.0d0) + (60.0d0 / ((z - t) / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3.2e+39) || !(y <= 8e+69)) {
tmp = (a * 120.0) + (-60.0 / ((z - t) / y));
} else {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -3.2e+39) or not (y <= 8e+69): tmp = (a * 120.0) + (-60.0 / ((z - t) / y)) else: tmp = (a * 120.0) + (60.0 / ((z - t) / x)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -3.2e+39) || !(y <= 8e+69)) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 / Float64(Float64(z - t) / y))); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(z - t) / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -3.2e+39) || ~((y <= 8e+69))) tmp = (a * 120.0) + (-60.0 / ((z - t) / y)); else tmp = (a * 120.0) + (60.0 / ((z - t) / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -3.2e+39], N[Not[LessEqual[y, 8e+69]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+39} \lor \neg \left(y \leq 8 \cdot 10^{+69}\right):\\
\;\;\;\;a \cdot 120 + \frac{-60}{\frac{z - t}{y}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\
\end{array}
\end{array}
if y < -3.19999999999999993e39 or 8.0000000000000006e69 < y Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 92.5%
associate-*r/92.4%
associate-/l*92.4%
Simplified92.4%
if -3.19999999999999993e39 < y < 8.0000000000000006e69Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 95.5%
Final simplification94.2%
(FPCore (x y z t a) :precision binary64 (if (<= (- x y) -1e+264) (* -60.0 (/ y (- z t))) (if (<= (- x y) 2e+168) (* 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+264) {
tmp = -60.0 * (y / (z - t));
} else if ((x - y) <= 2e+168) {
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+264)) then
tmp = (-60.0d0) * (y / (z - t))
else if ((x - y) <= 2d+168) 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+264) {
tmp = -60.0 * (y / (z - t));
} else if ((x - y) <= 2e+168) {
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+264: tmp = -60.0 * (y / (z - t)) elif (x - y) <= 2e+168: 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+264) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); elseif (Float64(x - y) <= 2e+168) 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+264) tmp = -60.0 * (y / (z - t)); elseif ((x - y) <= 2e+168) 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+264], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x - y), $MachinePrecision], 2e+168], 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^{+264}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;x - y \leq 2 \cdot 10^{+168}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if (-.f64 x y) < -1.00000000000000004e264Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
associate-/r/100.0%
Applied egg-rr100.0%
Taylor expanded in y around inf 64.8%
if -1.00000000000000004e264 < (-.f64 x y) < 1.9999999999999999e168Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 62.7%
if 1.9999999999999999e168 < (-.f64 x y) Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around 0 71.9%
Taylor expanded in a around 0 56.2%
Final simplification61.6%
(FPCore (x y z t a)
:precision binary64
(if (<= y -1.6e+38)
(+ (* a 120.0) (/ -60.0 (/ (- z t) y)))
(if (<= y 9.6e+69)
(+ (* a 120.0) (/ 60.0 (/ (- z t) x)))
(+ (* a 120.0) (/ (* y -60.0) (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.6e+38) {
tmp = (a * 120.0) + (-60.0 / ((z - t) / y));
} else if (y <= 9.6e+69) {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
} else {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-1.6d+38)) then
tmp = (a * 120.0d0) + ((-60.0d0) / ((z - t) / y))
else if (y <= 9.6d+69) then
tmp = (a * 120.0d0) + (60.0d0 / ((z - t) / x))
else
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.6e+38) {
tmp = (a * 120.0) + (-60.0 / ((z - t) / y));
} else if (y <= 9.6e+69) {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
} else {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.6e+38: tmp = (a * 120.0) + (-60.0 / ((z - t) / y)) elif y <= 9.6e+69: tmp = (a * 120.0) + (60.0 / ((z - t) / x)) else: tmp = (a * 120.0) + ((y * -60.0) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.6e+38) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 / Float64(Float64(z - t) / y))); elseif (y <= 9.6e+69) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(z - t) / x))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.6e+38) tmp = (a * 120.0) + (-60.0 / ((z - t) / y)); elseif (y <= 9.6e+69) tmp = (a * 120.0) + (60.0 / ((z - t) / x)); else tmp = (a * 120.0) + ((y * -60.0) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.6e+38], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.6e+69], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{+38}:\\
\;\;\;\;a \cdot 120 + \frac{-60}{\frac{z - t}{y}}\\
\mathbf{elif}\;y \leq 9.6 \cdot 10^{+69}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\end{array}
\end{array}
if y < -1.59999999999999993e38Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 91.8%
associate-*r/91.6%
associate-/l*91.6%
Simplified91.6%
if -1.59999999999999993e38 < y < 9.6000000000000007e69Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 95.5%
if 9.6000000000000007e69 < y Initial program 99.8%
Taylor expanded in x around 0 93.3%
Final simplification94.2%
(FPCore (x y z t a) :precision binary64 (+ (* a 120.0) (* (- x y) (/ 60.0 (- z t)))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + ((x - y) * (60.0 / (z - t)));
}
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) + ((x - y) * (60.0d0 / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + ((x - y) * (60.0 / (z - t)));
}
def code(x, y, z, t, a): return (a * 120.0) + ((x - y) * (60.0 / (z - t)))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(60.0 / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) + ((x - y) * (60.0 / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 + \left(x - y\right) \cdot \frac{60}{z - t}
\end{array}
Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (+ (* a 120.0) (/ 60.0 (/ (- z t) (- x y)))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + (60.0 / ((z - t) / (x - y)));
}
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) + (60.0d0 / ((z - t) / (x - y)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + (60.0 / ((z - t) / (x - y)));
}
def code(x, y, z, t, a): return (a * 120.0) + (60.0 / ((z - t) / (x - y)))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(z - t) / Float64(x - y)))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) + (60.0 / ((z - t) / (x - y))); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 + \frac{60}{\frac{z - t}{x - y}}
\end{array}
Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (+ (* a 120.0) (/ (- x y) (* (- z t) 0.016666666666666666))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + ((x - y) / ((z - t) * 0.016666666666666666));
}
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) + ((x - y) / ((z - t) * 0.016666666666666666d0))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + ((x - y) / ((z - t) * 0.016666666666666666));
}
def code(x, y, z, t, a): return (a * 120.0) + ((x - y) / ((z - t) * 0.016666666666666666))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) + Float64(Float64(x - y) / Float64(Float64(z - t) * 0.016666666666666666))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) + ((x - y) / ((z - t) * 0.016666666666666666)); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] / N[(N[(z - t), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 + \frac{x - y}{\left(z - t\right) \cdot 0.016666666666666666}
\end{array}
Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.8%
Applied egg-rr99.8%
*-commutative99.8%
clear-num99.7%
un-div-inv99.8%
div-inv99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -2.05e+120) (not (<= y 1.3e+262))) (* -60.0 (/ y (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.05e+120) || !(y <= 1.3e+262)) {
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 <= (-2.05d+120)) .or. (.not. (y <= 1.3d+262))) 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 <= -2.05e+120) || !(y <= 1.3e+262)) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -2.05e+120) or not (y <= 1.3e+262): 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 <= -2.05e+120) || !(y <= 1.3e+262)) 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 <= -2.05e+120) || ~((y <= 1.3e+262))) 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, -2.05e+120], N[Not[LessEqual[y, 1.3e+262]], $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 -2.05 \cdot 10^{+120} \lor \neg \left(y \leq 1.3 \cdot 10^{+262}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -2.05e120 or 1.3e262 < y Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 72.7%
if -2.05e120 < y < 1.3e262Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 58.9%
Final simplification61.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -7.2e+168) (not (<= y 1.3e+262))) (* 60.0 (/ y t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -7.2e+168) || !(y <= 1.3e+262)) {
tmp = 60.0 * (y / 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 <= (-7.2d+168)) .or. (.not. (y <= 1.3d+262))) then
tmp = 60.0d0 * (y / 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 <= -7.2e+168) || !(y <= 1.3e+262)) {
tmp = 60.0 * (y / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -7.2e+168) or not (y <= 1.3e+262): tmp = 60.0 * (y / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -7.2e+168) || !(y <= 1.3e+262)) tmp = Float64(60.0 * Float64(y / 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 <= -7.2e+168) || ~((y <= 1.3e+262))) tmp = 60.0 * (y / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -7.2e+168], N[Not[LessEqual[y, 1.3e+262]], $MachinePrecision]], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.2 \cdot 10^{+168} \lor \neg \left(y \leq 1.3 \cdot 10^{+262}\right):\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -7.1999999999999999e168 or 1.3e262 < y Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 81.3%
Taylor expanded in z around 0 59.9%
if -7.1999999999999999e168 < y < 1.3e262Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 57.0%
Final simplification57.4%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.02e+169) (* 60.0 (/ y t)) (if (<= y 5.2e+262) (* a 120.0) (* y (/ 60.0 t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.02e+169) {
tmp = 60.0 * (y / t);
} else if (y <= 5.2e+262) {
tmp = a * 120.0;
} else {
tmp = y * (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 (y <= (-1.02d+169)) then
tmp = 60.0d0 * (y / t)
else if (y <= 5.2d+262) then
tmp = a * 120.0d0
else
tmp = y * (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 (y <= -1.02e+169) {
tmp = 60.0 * (y / t);
} else if (y <= 5.2e+262) {
tmp = a * 120.0;
} else {
tmp = y * (60.0 / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.02e+169: tmp = 60.0 * (y / t) elif y <= 5.2e+262: tmp = a * 120.0 else: tmp = y * (60.0 / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.02e+169) tmp = Float64(60.0 * Float64(y / t)); elseif (y <= 5.2e+262) tmp = Float64(a * 120.0); else tmp = Float64(y * Float64(60.0 / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.02e+169) tmp = 60.0 * (y / t); elseif (y <= 5.2e+262) tmp = a * 120.0; else tmp = y * (60.0 / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.02e+169], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.2e+262], N[(a * 120.0), $MachinePrecision], N[(y * N[(60.0 / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.02 \cdot 10^{+169}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{+262}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{60}{t}\\
\end{array}
\end{array}
if y < -1.02000000000000005e169Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 74.6%
Taylor expanded in z around 0 53.1%
if -1.02000000000000005e169 < y < 5.1999999999999998e262Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 57.0%
if 5.1999999999999998e262 < y Initial program 100.0%
associate-/l*99.7%
Simplified99.7%
associate-/r/100.0%
Applied egg-rr100.0%
Taylor expanded in y around inf 99.7%
associate-*r/100.0%
Simplified100.0%
associate-/l*99.7%
associate-/r/100.0%
Applied egg-rr100.0%
Taylor expanded in z around 0 79.1%
Final simplification57.4%
(FPCore (x y z t a) :precision binary64 (if (<= x 2.7e+161) (* a 120.0) (* -60.0 (/ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= 2.7e+161) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (x / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= 2.7d+161) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (x / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= 2.7e+161) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (x / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= 2.7e+161: tmp = a * 120.0 else: tmp = -60.0 * (x / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= 2.7e+161) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(x / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= 2.7e+161) tmp = a * 120.0; else tmp = -60.0 * (x / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, 2.7e+161], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.7 \cdot 10^{+161}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\end{array}
\end{array}
if x < 2.6999999999999998e161Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 55.2%
if 2.6999999999999998e161 < x Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 73.8%
Taylor expanded in x around inf 70.7%
Taylor expanded in a around 0 51.6%
Final simplification54.8%
(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.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 51.3%
Final simplification51.3%
(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 2023213
(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)))