
(FPCore (eh ew t) :precision binary64 (let* ((t_1 (atan (/ (/ eh ew) (tan t))))) (fabs (+ (* (* ew (sin t)) (cos t_1)) (* (* eh (cos t)) (sin t_1))))))
double code(double eh, double ew, double t) {
double t_1 = atan(((eh / ew) / tan(t)));
return fabs((((ew * sin(t)) * cos(t_1)) + ((eh * cos(t)) * sin(t_1))));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(eh, ew, t)
use fmin_fmax_functions
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: t_1
t_1 = atan(((eh / ew) / tan(t)))
code = abs((((ew * sin(t)) * cos(t_1)) + ((eh * cos(t)) * sin(t_1))))
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.atan(((eh / ew) / Math.tan(t)));
return Math.abs((((ew * Math.sin(t)) * Math.cos(t_1)) + ((eh * Math.cos(t)) * Math.sin(t_1))));
}
def code(eh, ew, t): t_1 = math.atan(((eh / ew) / math.tan(t))) return math.fabs((((ew * math.sin(t)) * math.cos(t_1)) + ((eh * math.cos(t)) * math.sin(t_1))))
function code(eh, ew, t) t_1 = atan(Float64(Float64(eh / ew) / tan(t))) return abs(Float64(Float64(Float64(ew * sin(t)) * cos(t_1)) + Float64(Float64(eh * cos(t)) * sin(t_1)))) end
function tmp = code(eh, ew, t) t_1 = atan(((eh / ew) / tan(t))); tmp = abs((((ew * sin(t)) * cos(t_1)) + ((eh * cos(t)) * sin(t_1)))); end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[(eh / ew), $MachinePrecision] / N[Tan[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, N[Abs[N[(N[(N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision] + N[(N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\\
\left|\left(ew \cdot \sin t\right) \cdot \cos t\_1 + \left(eh \cdot \cos t\right) \cdot \sin t\_1\right|
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (eh ew t) :precision binary64 (let* ((t_1 (atan (/ (/ eh ew) (tan t))))) (fabs (+ (* (* ew (sin t)) (cos t_1)) (* (* eh (cos t)) (sin t_1))))))
double code(double eh, double ew, double t) {
double t_1 = atan(((eh / ew) / tan(t)));
return fabs((((ew * sin(t)) * cos(t_1)) + ((eh * cos(t)) * sin(t_1))));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(eh, ew, t)
use fmin_fmax_functions
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: t_1
t_1 = atan(((eh / ew) / tan(t)))
code = abs((((ew * sin(t)) * cos(t_1)) + ((eh * cos(t)) * sin(t_1))))
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.atan(((eh / ew) / Math.tan(t)));
return Math.abs((((ew * Math.sin(t)) * Math.cos(t_1)) + ((eh * Math.cos(t)) * Math.sin(t_1))));
}
def code(eh, ew, t): t_1 = math.atan(((eh / ew) / math.tan(t))) return math.fabs((((ew * math.sin(t)) * math.cos(t_1)) + ((eh * math.cos(t)) * math.sin(t_1))))
function code(eh, ew, t) t_1 = atan(Float64(Float64(eh / ew) / tan(t))) return abs(Float64(Float64(Float64(ew * sin(t)) * cos(t_1)) + Float64(Float64(eh * cos(t)) * sin(t_1)))) end
function tmp = code(eh, ew, t) t_1 = atan(((eh / ew) / tan(t))); tmp = abs((((ew * sin(t)) * cos(t_1)) + ((eh * cos(t)) * sin(t_1)))); end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[(eh / ew), $MachinePrecision] / N[Tan[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, N[Abs[N[(N[(N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision] + N[(N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\\
\left|\left(ew \cdot \sin t\right) \cdot \cos t\_1 + \left(eh \cdot \cos t\right) \cdot \sin t\_1\right|
\end{array}
\end{array}
(FPCore (eh ew t) :precision binary64 (fabs (+ (* (* eh (cos t)) (sin (atan (/ eh (* (tan t) ew))))) (* (* ew (sin t)) (cos (atan (/ (/ eh ew) (tan t))))))))
double code(double eh, double ew, double t) {
return fabs((((eh * cos(t)) * sin(atan((eh / (tan(t) * ew))))) + ((ew * sin(t)) * cos(atan(((eh / ew) / tan(t)))))));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(eh, ew, t)
use fmin_fmax_functions
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
code = abs((((eh * cos(t)) * sin(atan((eh / (tan(t) * ew))))) + ((ew * sin(t)) * cos(atan(((eh / ew) / tan(t)))))))
end function
public static double code(double eh, double ew, double t) {
return Math.abs((((eh * Math.cos(t)) * Math.sin(Math.atan((eh / (Math.tan(t) * ew))))) + ((ew * Math.sin(t)) * Math.cos(Math.atan(((eh / ew) / Math.tan(t)))))));
}
def code(eh, ew, t): return math.fabs((((eh * math.cos(t)) * math.sin(math.atan((eh / (math.tan(t) * ew))))) + ((ew * math.sin(t)) * math.cos(math.atan(((eh / ew) / math.tan(t)))))))
function code(eh, ew, t) return abs(Float64(Float64(Float64(eh * cos(t)) * sin(atan(Float64(eh / Float64(tan(t) * ew))))) + Float64(Float64(ew * sin(t)) * cos(atan(Float64(Float64(eh / ew) / tan(t))))))) end
function tmp = code(eh, ew, t) tmp = abs((((eh * cos(t)) * sin(atan((eh / (tan(t) * ew))))) + ((ew * sin(t)) * cos(atan(((eh / ew) / tan(t))))))); end
code[eh_, ew_, t_] := N[Abs[N[(N[(N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(eh / N[(N[Tan[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Cos[N[ArcTan[N[(N[(eh / ew), $MachinePrecision] / N[Tan[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\left(eh \cdot \cos t\right) \cdot \sin \tan^{-1} \left(\frac{eh}{\tan t \cdot ew}\right) + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\right|
\end{array}
Initial program 99.8%
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6499.8
Applied rewrites99.8%
Final simplification99.8%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (cos (atan (/ (/ eh ew) t))))
(t_2 (* ew (sin t)))
(t_3 (* eh (cos t)))
(t_4 (atan (/ (/ eh ew) (tan t)))))
(if (<= (fabs (+ (* t_3 (sin t_4)) (* t_2 (cos t_4)))) 5e+50)
(fabs
(*
(fma
(* (/ (cos t) ew) eh)
(tanh (asinh (/ (/ eh (tan t)) ew)))
(* t_1 (sin t)))
ew))
(fabs (+ (* t_3 (sin (atan (/ eh (* ew t))))) (* t_2 t_1))))))
double code(double eh, double ew, double t) {
double t_1 = cos(atan(((eh / ew) / t)));
double t_2 = ew * sin(t);
double t_3 = eh * cos(t);
double t_4 = atan(((eh / ew) / tan(t)));
double tmp;
if (fabs(((t_3 * sin(t_4)) + (t_2 * cos(t_4)))) <= 5e+50) {
tmp = fabs((fma(((cos(t) / ew) * eh), tanh(asinh(((eh / tan(t)) / ew))), (t_1 * sin(t))) * ew));
} else {
tmp = fabs(((t_3 * sin(atan((eh / (ew * t))))) + (t_2 * t_1)));
}
return tmp;
}
function code(eh, ew, t) t_1 = cos(atan(Float64(Float64(eh / ew) / t))) t_2 = Float64(ew * sin(t)) t_3 = Float64(eh * cos(t)) t_4 = atan(Float64(Float64(eh / ew) / tan(t))) tmp = 0.0 if (abs(Float64(Float64(t_3 * sin(t_4)) + Float64(t_2 * cos(t_4)))) <= 5e+50) tmp = abs(Float64(fma(Float64(Float64(cos(t) / ew) * eh), tanh(asinh(Float64(Float64(eh / tan(t)) / ew))), Float64(t_1 * sin(t))) * ew)); else tmp = abs(Float64(Float64(t_3 * sin(atan(Float64(eh / Float64(ew * t))))) + Float64(t_2 * t_1))); end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[Cos[N[ArcTan[N[(N[(eh / ew), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[ArcTan[N[(N[(eh / ew), $MachinePrecision] / N[Tan[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[Abs[N[(N[(t$95$3 * N[Sin[t$95$4], $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * N[Cos[t$95$4], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 5e+50], N[Abs[N[(N[(N[(N[(N[Cos[t], $MachinePrecision] / ew), $MachinePrecision] * eh), $MachinePrecision] * N[Tanh[N[ArcSinh[N[(N[(eh / N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] + N[(t$95$1 * N[Sin[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * ew), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(t$95$3 * N[Sin[N[ArcTan[N[(eh / N[(ew * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{t}\right)\\
t_2 := ew \cdot \sin t\\
t_3 := eh \cdot \cos t\\
t_4 := \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\\
\mathbf{if}\;\left|t\_3 \cdot \sin t\_4 + t\_2 \cdot \cos t\_4\right| \leq 5 \cdot 10^{+50}:\\
\;\;\;\;\left|\mathsf{fma}\left(\frac{\cos t}{ew} \cdot eh, \tanh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right), t\_1 \cdot \sin t\right) \cdot ew\right|\\
\mathbf{else}:\\
\;\;\;\;\left|t\_3 \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot t}\right) + t\_2 \cdot t\_1\right|\\
\end{array}
\end{array}
if (fabs.f64 (+.f64 (*.f64 (*.f64 ew (sin.f64 t)) (cos.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))) (*.f64 (*.f64 eh (cos.f64 t)) (sin.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))))) < 5e50Initial program 99.9%
Taylor expanded in ew around inf
Applied rewrites99.9%
Applied rewrites99.7%
Taylor expanded in t around 0
Applied rewrites99.4%
if 5e50 < (fabs.f64 (+.f64 (*.f64 (*.f64 ew (sin.f64 t)) (cos.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))) (*.f64 (*.f64 eh (cos.f64 t)) (sin.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))))) Initial program 99.7%
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6499.7
Applied rewrites99.7%
Taylor expanded in t around 0
Applied rewrites93.7%
Taylor expanded in t around 0
Applied rewrites93.7%
Final simplification95.8%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* ew (sin t)))
(t_2 (* eh (cos t)))
(t_3 (/ (/ eh (tan t)) ew))
(t_4 (atan (/ (/ eh ew) (tan t)))))
(if (<= (fabs (+ (* t_2 (sin t_4)) (* t_1 (cos t_4)))) 4e-45)
(fabs (/ (fma (* (cos t) t_3) eh (* (sin t) ew)) (cosh (asinh t_3))))
(fabs
(+
(* t_2 (sin (atan (/ eh (* ew t)))))
(* t_1 (cos (atan (/ (/ eh ew) t)))))))))
double code(double eh, double ew, double t) {
double t_1 = ew * sin(t);
double t_2 = eh * cos(t);
double t_3 = (eh / tan(t)) / ew;
double t_4 = atan(((eh / ew) / tan(t)));
double tmp;
if (fabs(((t_2 * sin(t_4)) + (t_1 * cos(t_4)))) <= 4e-45) {
tmp = fabs((fma((cos(t) * t_3), eh, (sin(t) * ew)) / cosh(asinh(t_3))));
} else {
tmp = fabs(((t_2 * sin(atan((eh / (ew * t))))) + (t_1 * cos(atan(((eh / ew) / t))))));
}
return tmp;
}
function code(eh, ew, t) t_1 = Float64(ew * sin(t)) t_2 = Float64(eh * cos(t)) t_3 = Float64(Float64(eh / tan(t)) / ew) t_4 = atan(Float64(Float64(eh / ew) / tan(t))) tmp = 0.0 if (abs(Float64(Float64(t_2 * sin(t_4)) + Float64(t_1 * cos(t_4)))) <= 4e-45) tmp = abs(Float64(fma(Float64(cos(t) * t_3), eh, Float64(sin(t) * ew)) / cosh(asinh(t_3)))); else tmp = abs(Float64(Float64(t_2 * sin(atan(Float64(eh / Float64(ew * t))))) + Float64(t_1 * cos(atan(Float64(Float64(eh / ew) / t)))))); end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(eh / N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]}, Block[{t$95$4 = N[ArcTan[N[(N[(eh / ew), $MachinePrecision] / N[Tan[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[Abs[N[(N[(t$95$2 * N[Sin[t$95$4], $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[Cos[t$95$4], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 4e-45], N[Abs[N[(N[(N[(N[Cos[t], $MachinePrecision] * t$95$3), $MachinePrecision] * eh + N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision] / N[Cosh[N[ArcSinh[t$95$3], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(t$95$2 * N[Sin[N[ArcTan[N[(eh / N[(ew * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[Cos[N[ArcTan[N[(N[(eh / ew), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := ew \cdot \sin t\\
t_2 := eh \cdot \cos t\\
t_3 := \frac{\frac{eh}{\tan t}}{ew}\\
t_4 := \tan^{-1} \left(\frac{\frac{eh}{ew}}{\tan t}\right)\\
\mathbf{if}\;\left|t\_2 \cdot \sin t\_4 + t\_1 \cdot \cos t\_4\right| \leq 4 \cdot 10^{-45}:\\
\;\;\;\;\left|\frac{\mathsf{fma}\left(\cos t \cdot t\_3, eh, \sin t \cdot ew\right)}{\cosh \sinh^{-1} t\_3}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|t\_2 \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot t}\right) + t\_1 \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{t}\right)\right|\\
\end{array}
\end{array}
if (fabs.f64 (+.f64 (*.f64 (*.f64 ew (sin.f64 t)) (cos.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))) (*.f64 (*.f64 eh (cos.f64 t)) (sin.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))))) < 3.99999999999999994e-45Initial program 99.9%
Applied rewrites93.6%
if 3.99999999999999994e-45 < (fabs.f64 (+.f64 (*.f64 (*.f64 ew (sin.f64 t)) (cos.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))) (*.f64 (*.f64 eh (cos.f64 t)) (sin.f64 (atan.f64 (/.f64 (/.f64 eh ew) (tan.f64 t))))))) Initial program 99.8%
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6499.8
Applied rewrites99.8%
Taylor expanded in t around 0
Applied rewrites93.7%
Taylor expanded in t around 0
Applied rewrites93.7%
Final simplification93.7%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* eh (cos t))))
(if (<= t 1.45e+234)
(fabs
(+
(* t_1 (sin (atan (/ eh (* ew t)))))
(* (* ew (sin t)) (cos (atan (/ (/ eh ew) t))))))
(fabs t_1))))
double code(double eh, double ew, double t) {
double t_1 = eh * cos(t);
double tmp;
if (t <= 1.45e+234) {
tmp = fabs(((t_1 * sin(atan((eh / (ew * t))))) + ((ew * sin(t)) * cos(atan(((eh / ew) / t))))));
} else {
tmp = fabs(t_1);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(eh, ew, t)
use fmin_fmax_functions
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = eh * cos(t)
if (t <= 1.45d+234) then
tmp = abs(((t_1 * sin(atan((eh / (ew * t))))) + ((ew * sin(t)) * cos(atan(((eh / ew) / t))))))
else
tmp = abs(t_1)
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = eh * Math.cos(t);
double tmp;
if (t <= 1.45e+234) {
tmp = Math.abs(((t_1 * Math.sin(Math.atan((eh / (ew * t))))) + ((ew * Math.sin(t)) * Math.cos(Math.atan(((eh / ew) / t))))));
} else {
tmp = Math.abs(t_1);
}
return tmp;
}
def code(eh, ew, t): t_1 = eh * math.cos(t) tmp = 0 if t <= 1.45e+234: tmp = math.fabs(((t_1 * math.sin(math.atan((eh / (ew * t))))) + ((ew * math.sin(t)) * math.cos(math.atan(((eh / ew) / t)))))) else: tmp = math.fabs(t_1) return tmp
function code(eh, ew, t) t_1 = Float64(eh * cos(t)) tmp = 0.0 if (t <= 1.45e+234) tmp = abs(Float64(Float64(t_1 * sin(atan(Float64(eh / Float64(ew * t))))) + Float64(Float64(ew * sin(t)) * cos(atan(Float64(Float64(eh / ew) / t)))))); else tmp = abs(t_1); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = eh * cos(t); tmp = 0.0; if (t <= 1.45e+234) tmp = abs(((t_1 * sin(atan((eh / (ew * t))))) + ((ew * sin(t)) * cos(atan(((eh / ew) / t)))))); else tmp = abs(t_1); end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, 1.45e+234], N[Abs[N[(N[(t$95$1 * N[Sin[N[ArcTan[N[(eh / N[(ew * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Cos[N[ArcTan[N[(N[(eh / ew), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[t$95$1], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := eh \cdot \cos t\\
\mathbf{if}\;t \leq 1.45 \cdot 10^{+234}:\\
\;\;\;\;\left|t\_1 \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot t}\right) + \left(ew \cdot \sin t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{t}\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|t\_1\right|\\
\end{array}
\end{array}
if t < 1.44999999999999993e234Initial program 99.8%
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6499.8
Applied rewrites99.8%
Taylor expanded in t around 0
Applied rewrites92.2%
Taylor expanded in t around 0
Applied rewrites92.2%
if 1.44999999999999993e234 < t Initial program 99.4%
Applied rewrites48.1%
lift-cosh.f64N/A
lift-asinh.f64N/A
cosh-asinhN/A
+-commutativeN/A
rem-square-sqrtN/A
+-commutativeN/A
cosh-asinhN/A
lift-asinh.f64N/A
lift-cosh.f64N/A
+-commutativeN/A
cosh-asinhN/A
lift-asinh.f64N/A
lift-cosh.f64N/A
Applied rewrites38.4%
Taylor expanded in eh around inf
Applied rewrites99.4%
Final simplification92.5%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* (sin t) ew)) (t_2 (* (tan t) ew)) (t_3 (* eh (cos t))))
(if (<= t -9e+28)
(fabs
(/
(fma (/ (* (cos t) eh) t_2) eh t_1)
(sqrt (+ 1.0 (pow (/ eh t_2) 2.0)))))
(if (<= t 8.2e+45)
(fabs
(+
(* t_3 (sin (atan (/ eh (* ew t)))))
(* (* ew t) (cos (atan (/ (/ eh ew) t))))))
(if (<= t 1.45e+234)
(fabs
(/
(fma (/ (* (/ (cos t) ew) eh) (tan t)) eh t_1)
(sqrt (+ 1.0 (pow (/ (/ eh (tan t)) ew) 2.0)))))
(fabs t_3))))))
double code(double eh, double ew, double t) {
double t_1 = sin(t) * ew;
double t_2 = tan(t) * ew;
double t_3 = eh * cos(t);
double tmp;
if (t <= -9e+28) {
tmp = fabs((fma(((cos(t) * eh) / t_2), eh, t_1) / sqrt((1.0 + pow((eh / t_2), 2.0)))));
} else if (t <= 8.2e+45) {
tmp = fabs(((t_3 * sin(atan((eh / (ew * t))))) + ((ew * t) * cos(atan(((eh / ew) / t))))));
} else if (t <= 1.45e+234) {
tmp = fabs((fma((((cos(t) / ew) * eh) / tan(t)), eh, t_1) / sqrt((1.0 + pow(((eh / tan(t)) / ew), 2.0)))));
} else {
tmp = fabs(t_3);
}
return tmp;
}
function code(eh, ew, t) t_1 = Float64(sin(t) * ew) t_2 = Float64(tan(t) * ew) t_3 = Float64(eh * cos(t)) tmp = 0.0 if (t <= -9e+28) tmp = abs(Float64(fma(Float64(Float64(cos(t) * eh) / t_2), eh, t_1) / sqrt(Float64(1.0 + (Float64(eh / t_2) ^ 2.0))))); elseif (t <= 8.2e+45) tmp = abs(Float64(Float64(t_3 * sin(atan(Float64(eh / Float64(ew * t))))) + Float64(Float64(ew * t) * cos(atan(Float64(Float64(eh / ew) / t)))))); elseif (t <= 1.45e+234) tmp = abs(Float64(fma(Float64(Float64(Float64(cos(t) / ew) * eh) / tan(t)), eh, t_1) / sqrt(Float64(1.0 + (Float64(Float64(eh / tan(t)) / ew) ^ 2.0))))); else tmp = abs(t_3); end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]}, Block[{t$95$2 = N[(N[Tan[t], $MachinePrecision] * ew), $MachinePrecision]}, Block[{t$95$3 = N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9e+28], N[Abs[N[(N[(N[(N[(N[Cos[t], $MachinePrecision] * eh), $MachinePrecision] / t$95$2), $MachinePrecision] * eh + t$95$1), $MachinePrecision] / N[Sqrt[N[(1.0 + N[Power[N[(eh / t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 8.2e+45], N[Abs[N[(N[(t$95$3 * N[Sin[N[ArcTan[N[(eh / N[(ew * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[(ew * t), $MachinePrecision] * N[Cos[N[ArcTan[N[(N[(eh / ew), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 1.45e+234], N[Abs[N[(N[(N[(N[(N[(N[Cos[t], $MachinePrecision] / ew), $MachinePrecision] * eh), $MachinePrecision] / N[Tan[t], $MachinePrecision]), $MachinePrecision] * eh + t$95$1), $MachinePrecision] / N[Sqrt[N[(1.0 + N[Power[N[(N[(eh / N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[t$95$3], $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sin t \cdot ew\\
t_2 := \tan t \cdot ew\\
t_3 := eh \cdot \cos t\\
\mathbf{if}\;t \leq -9 \cdot 10^{+28}:\\
\;\;\;\;\left|\frac{\mathsf{fma}\left(\frac{\cos t \cdot eh}{t\_2}, eh, t\_1\right)}{\sqrt{1 + {\left(\frac{eh}{t\_2}\right)}^{2}}}\right|\\
\mathbf{elif}\;t \leq 8.2 \cdot 10^{+45}:\\
\;\;\;\;\left|t\_3 \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot t}\right) + \left(ew \cdot t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{t}\right)\right|\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{+234}:\\
\;\;\;\;\left|\frac{\mathsf{fma}\left(\frac{\frac{\cos t}{ew} \cdot eh}{\tan t}, eh, t\_1\right)}{\sqrt{1 + {\left(\frac{\frac{eh}{\tan t}}{ew}\right)}^{2}}}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|t\_3\right|\\
\end{array}
\end{array}
if t < -8.9999999999999994e28Initial program 99.7%
Applied rewrites73.6%
lift-cosh.f64N/A
lift-asinh.f64N/A
cosh-asinhN/A
+-commutativeN/A
rem-square-sqrtN/A
+-commutativeN/A
cosh-asinhN/A
lift-asinh.f64N/A
lift-cosh.f64N/A
+-commutativeN/A
cosh-asinhN/A
lift-asinh.f64N/A
lift-cosh.f64N/A
Applied rewrites68.1%
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
lift-tan.f64N/A
associate-*r/N/A
*-commutativeN/A
lift-*.f64N/A
lower-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-tan.f64N/A
lower-*.f6468.0
Applied rewrites68.0%
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
lift-*.f64N/A
lower-/.f6468.2
Applied rewrites68.2%
if -8.9999999999999994e28 < t < 8.20000000000000025e45Initial program 99.9%
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6499.9
Applied rewrites99.9%
Taylor expanded in t around 0
Applied rewrites99.9%
Taylor expanded in t around 0
Applied rewrites99.9%
Taylor expanded in t around 0
Applied rewrites95.7%
if 8.20000000000000025e45 < t < 1.44999999999999993e234Initial program 99.4%
Applied rewrites83.6%
lift-cosh.f64N/A
lift-asinh.f64N/A
cosh-asinhN/A
+-commutativeN/A
rem-square-sqrtN/A
+-commutativeN/A
cosh-asinhN/A
lift-asinh.f64N/A
lift-cosh.f64N/A
+-commutativeN/A
cosh-asinhN/A
lift-asinh.f64N/A
lift-cosh.f64N/A
Applied rewrites79.9%
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
*-commutativeN/A
associate-/l/N/A
lift-/.f64N/A
associate-*r/N/A
lift-/.f64N/A
associate-/l*N/A
lift-*.f64N/A
lift-/.f64N/A
lower-/.f6479.9
lift-/.f64N/A
lift-*.f64N/A
associate-*l/N/A
lift-/.f64N/A
lower-*.f6479.9
Applied rewrites79.9%
if 1.44999999999999993e234 < t Initial program 99.4%
Applied rewrites48.1%
lift-cosh.f64N/A
lift-asinh.f64N/A
cosh-asinhN/A
+-commutativeN/A
rem-square-sqrtN/A
+-commutativeN/A
cosh-asinhN/A
lift-asinh.f64N/A
lift-cosh.f64N/A
+-commutativeN/A
cosh-asinhN/A
lift-asinh.f64N/A
lift-cosh.f64N/A
Applied rewrites38.4%
Taylor expanded in eh around inf
Applied rewrites99.4%
Final simplification87.7%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* (tan t) ew))
(t_2
(fabs
(/
(fma (/ (* (cos t) eh) t_1) eh (* (sin t) ew))
(sqrt (+ 1.0 (pow (/ eh t_1) 2.0))))))
(t_3 (* eh (cos t))))
(if (<= t -9e+28)
t_2
(if (<= t 8.2e+45)
(fabs
(+
(* t_3 (sin (atan (/ eh (* ew t)))))
(* (* ew t) (cos (atan (/ (/ eh ew) t))))))
(if (<= t 1.45e+234) t_2 (fabs t_3))))))
double code(double eh, double ew, double t) {
double t_1 = tan(t) * ew;
double t_2 = fabs((fma(((cos(t) * eh) / t_1), eh, (sin(t) * ew)) / sqrt((1.0 + pow((eh / t_1), 2.0)))));
double t_3 = eh * cos(t);
double tmp;
if (t <= -9e+28) {
tmp = t_2;
} else if (t <= 8.2e+45) {
tmp = fabs(((t_3 * sin(atan((eh / (ew * t))))) + ((ew * t) * cos(atan(((eh / ew) / t))))));
} else if (t <= 1.45e+234) {
tmp = t_2;
} else {
tmp = fabs(t_3);
}
return tmp;
}
function code(eh, ew, t) t_1 = Float64(tan(t) * ew) t_2 = abs(Float64(fma(Float64(Float64(cos(t) * eh) / t_1), eh, Float64(sin(t) * ew)) / sqrt(Float64(1.0 + (Float64(eh / t_1) ^ 2.0))))) t_3 = Float64(eh * cos(t)) tmp = 0.0 if (t <= -9e+28) tmp = t_2; elseif (t <= 8.2e+45) tmp = abs(Float64(Float64(t_3 * sin(atan(Float64(eh / Float64(ew * t))))) + Float64(Float64(ew * t) * cos(atan(Float64(Float64(eh / ew) / t)))))); elseif (t <= 1.45e+234) tmp = t_2; else tmp = abs(t_3); end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Tan[t], $MachinePrecision] * ew), $MachinePrecision]}, Block[{t$95$2 = N[Abs[N[(N[(N[(N[(N[Cos[t], $MachinePrecision] * eh), $MachinePrecision] / t$95$1), $MachinePrecision] * eh + N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(1.0 + N[Power[N[(eh / t$95$1), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9e+28], t$95$2, If[LessEqual[t, 8.2e+45], N[Abs[N[(N[(t$95$3 * N[Sin[N[ArcTan[N[(eh / N[(ew * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[(ew * t), $MachinePrecision] * N[Cos[N[ArcTan[N[(N[(eh / ew), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 1.45e+234], t$95$2, N[Abs[t$95$3], $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan t \cdot ew\\
t_2 := \left|\frac{\mathsf{fma}\left(\frac{\cos t \cdot eh}{t\_1}, eh, \sin t \cdot ew\right)}{\sqrt{1 + {\left(\frac{eh}{t\_1}\right)}^{2}}}\right|\\
t_3 := eh \cdot \cos t\\
\mathbf{if}\;t \leq -9 \cdot 10^{+28}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 8.2 \cdot 10^{+45}:\\
\;\;\;\;\left|t\_3 \cdot \sin \tan^{-1} \left(\frac{eh}{ew \cdot t}\right) + \left(ew \cdot t\right) \cdot \cos \tan^{-1} \left(\frac{\frac{eh}{ew}}{t}\right)\right|\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{+234}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\left|t\_3\right|\\
\end{array}
\end{array}
if t < -8.9999999999999994e28 or 8.20000000000000025e45 < t < 1.44999999999999993e234Initial program 99.6%
Applied rewrites77.9%
lift-cosh.f64N/A
lift-asinh.f64N/A
cosh-asinhN/A
+-commutativeN/A
rem-square-sqrtN/A
+-commutativeN/A
cosh-asinhN/A
lift-asinh.f64N/A
lift-cosh.f64N/A
+-commutativeN/A
cosh-asinhN/A
lift-asinh.f64N/A
lift-cosh.f64N/A
Applied rewrites73.2%
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
lift-tan.f64N/A
associate-*r/N/A
*-commutativeN/A
lift-*.f64N/A
lower-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-tan.f64N/A
lower-*.f6473.1
Applied rewrites73.1%
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
lift-*.f64N/A
lower-/.f6473.2
Applied rewrites73.2%
if -8.9999999999999994e28 < t < 8.20000000000000025e45Initial program 99.9%
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6499.9
Applied rewrites99.9%
Taylor expanded in t around 0
Applied rewrites99.9%
Taylor expanded in t around 0
Applied rewrites99.9%
Taylor expanded in t around 0
Applied rewrites95.7%
if 1.44999999999999993e234 < t Initial program 99.4%
Applied rewrites48.1%
lift-cosh.f64N/A
lift-asinh.f64N/A
cosh-asinhN/A
+-commutativeN/A
rem-square-sqrtN/A
+-commutativeN/A
cosh-asinhN/A
lift-asinh.f64N/A
lift-cosh.f64N/A
+-commutativeN/A
cosh-asinhN/A
lift-asinh.f64N/A
lift-cosh.f64N/A
Applied rewrites38.4%
Taylor expanded in eh around inf
Applied rewrites99.4%
Final simplification87.7%
(FPCore (eh ew t)
:precision binary64
(if (or (<= eh -3.2e+45) (not (<= eh 3.1e-129)))
(fabs (* eh (cos t)))
(fabs
(/
(fma (/ (/ eh ew) t) eh (* (sin t) ew))
(cosh (asinh (/ (/ eh (tan t)) ew)))))))
double code(double eh, double ew, double t) {
double tmp;
if ((eh <= -3.2e+45) || !(eh <= 3.1e-129)) {
tmp = fabs((eh * cos(t)));
} else {
tmp = fabs((fma(((eh / ew) / t), eh, (sin(t) * ew)) / cosh(asinh(((eh / tan(t)) / ew)))));
}
return tmp;
}
function code(eh, ew, t) tmp = 0.0 if ((eh <= -3.2e+45) || !(eh <= 3.1e-129)) tmp = abs(Float64(eh * cos(t))); else tmp = abs(Float64(fma(Float64(Float64(eh / ew) / t), eh, Float64(sin(t) * ew)) / cosh(asinh(Float64(Float64(eh / tan(t)) / ew))))); end return tmp end
code[eh_, ew_, t_] := If[Or[LessEqual[eh, -3.2e+45], N[Not[LessEqual[eh, 3.1e-129]], $MachinePrecision]], N[Abs[N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[(N[(eh / ew), $MachinePrecision] / t), $MachinePrecision] * eh + N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision] / N[Cosh[N[ArcSinh[N[(N[(eh / N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;eh \leq -3.2 \cdot 10^{+45} \lor \neg \left(eh \leq 3.1 \cdot 10^{-129}\right):\\
\;\;\;\;\left|eh \cdot \cos t\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{\mathsf{fma}\left(\frac{\frac{eh}{ew}}{t}, eh, \sin t \cdot ew\right)}{\cosh \sinh^{-1} \left(\frac{\frac{eh}{\tan t}}{ew}\right)}\right|\\
\end{array}
\end{array}
if eh < -3.2000000000000003e45 or 3.1e-129 < eh Initial program 99.8%
Applied rewrites37.9%
lift-cosh.f64N/A
lift-asinh.f64N/A
cosh-asinhN/A
+-commutativeN/A
rem-square-sqrtN/A
+-commutativeN/A
cosh-asinhN/A
lift-asinh.f64N/A
lift-cosh.f64N/A
+-commutativeN/A
cosh-asinhN/A
lift-asinh.f64N/A
lift-cosh.f64N/A
Applied rewrites32.5%
Taylor expanded in eh around inf
Applied rewrites83.9%
if -3.2000000000000003e45 < eh < 3.1e-129Initial program 99.8%
Applied rewrites94.8%
Taylor expanded in t around 0
Applied rewrites85.9%
Final simplification84.7%
(FPCore (eh ew t)
:precision binary64
(if (or (<= eh -3.3e+44) (not (<= eh 3.1e-129)))
(fabs (* eh (cos t)))
(fabs
(/
(fma (/ (/ eh ew) t) eh (* (sin t) ew))
(sqrt (+ 1.0 (pow (/ (/ eh (tan t)) ew) 2.0)))))))
double code(double eh, double ew, double t) {
double tmp;
if ((eh <= -3.3e+44) || !(eh <= 3.1e-129)) {
tmp = fabs((eh * cos(t)));
} else {
tmp = fabs((fma(((eh / ew) / t), eh, (sin(t) * ew)) / sqrt((1.0 + pow(((eh / tan(t)) / ew), 2.0)))));
}
return tmp;
}
function code(eh, ew, t) tmp = 0.0 if ((eh <= -3.3e+44) || !(eh <= 3.1e-129)) tmp = abs(Float64(eh * cos(t))); else tmp = abs(Float64(fma(Float64(Float64(eh / ew) / t), eh, Float64(sin(t) * ew)) / sqrt(Float64(1.0 + (Float64(Float64(eh / tan(t)) / ew) ^ 2.0))))); end return tmp end
code[eh_, ew_, t_] := If[Or[LessEqual[eh, -3.3e+44], N[Not[LessEqual[eh, 3.1e-129]], $MachinePrecision]], N[Abs[N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[(N[(eh / ew), $MachinePrecision] / t), $MachinePrecision] * eh + N[(N[Sin[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(1.0 + N[Power[N[(N[(eh / N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;eh \leq -3.3 \cdot 10^{+44} \lor \neg \left(eh \leq 3.1 \cdot 10^{-129}\right):\\
\;\;\;\;\left|eh \cdot \cos t\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{\mathsf{fma}\left(\frac{\frac{eh}{ew}}{t}, eh, \sin t \cdot ew\right)}{\sqrt{1 + {\left(\frac{\frac{eh}{\tan t}}{ew}\right)}^{2}}}\right|\\
\end{array}
\end{array}
if eh < -3.30000000000000013e44 or 3.1e-129 < eh Initial program 99.8%
Applied rewrites37.9%
lift-cosh.f64N/A
lift-asinh.f64N/A
cosh-asinhN/A
+-commutativeN/A
rem-square-sqrtN/A
+-commutativeN/A
cosh-asinhN/A
lift-asinh.f64N/A
lift-cosh.f64N/A
+-commutativeN/A
cosh-asinhN/A
lift-asinh.f64N/A
lift-cosh.f64N/A
Applied rewrites32.5%
Taylor expanded in eh around inf
Applied rewrites83.9%
if -3.30000000000000013e44 < eh < 3.1e-129Initial program 99.8%
Applied rewrites94.8%
lift-cosh.f64N/A
lift-asinh.f64N/A
cosh-asinhN/A
+-commutativeN/A
rem-square-sqrtN/A
+-commutativeN/A
cosh-asinhN/A
lift-asinh.f64N/A
lift-cosh.f64N/A
+-commutativeN/A
cosh-asinhN/A
lift-asinh.f64N/A
lift-cosh.f64N/A
Applied rewrites86.8%
Taylor expanded in t around 0
Applied rewrites80.5%
Final simplification82.4%
(FPCore (eh ew t) :precision binary64 (if (or (<= eh -4.1e+43) (not (<= eh 3.1e-129))) (fabs (* eh (cos t))) (fabs (* ew (sin t)))))
double code(double eh, double ew, double t) {
double tmp;
if ((eh <= -4.1e+43) || !(eh <= 3.1e-129)) {
tmp = fabs((eh * cos(t)));
} else {
tmp = fabs((ew * sin(t)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(eh, ew, t)
use fmin_fmax_functions
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: tmp
if ((eh <= (-4.1d+43)) .or. (.not. (eh <= 3.1d-129))) then
tmp = abs((eh * cos(t)))
else
tmp = abs((ew * sin(t)))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double tmp;
if ((eh <= -4.1e+43) || !(eh <= 3.1e-129)) {
tmp = Math.abs((eh * Math.cos(t)));
} else {
tmp = Math.abs((ew * Math.sin(t)));
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if (eh <= -4.1e+43) or not (eh <= 3.1e-129): tmp = math.fabs((eh * math.cos(t))) else: tmp = math.fabs((ew * math.sin(t))) return tmp
function code(eh, ew, t) tmp = 0.0 if ((eh <= -4.1e+43) || !(eh <= 3.1e-129)) tmp = abs(Float64(eh * cos(t))); else tmp = abs(Float64(ew * sin(t))); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if ((eh <= -4.1e+43) || ~((eh <= 3.1e-129))) tmp = abs((eh * cos(t))); else tmp = abs((ew * sin(t))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[Or[LessEqual[eh, -4.1e+43], N[Not[LessEqual[eh, 3.1e-129]], $MachinePrecision]], N[Abs[N[(eh * N[Cos[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;eh \leq -4.1 \cdot 10^{+43} \lor \neg \left(eh \leq 3.1 \cdot 10^{-129}\right):\\
\;\;\;\;\left|eh \cdot \cos t\right|\\
\mathbf{else}:\\
\;\;\;\;\left|ew \cdot \sin t\right|\\
\end{array}
\end{array}
if eh < -4.1e43 or 3.1e-129 < eh Initial program 99.8%
Applied rewrites37.9%
lift-cosh.f64N/A
lift-asinh.f64N/A
cosh-asinhN/A
+-commutativeN/A
rem-square-sqrtN/A
+-commutativeN/A
cosh-asinhN/A
lift-asinh.f64N/A
lift-cosh.f64N/A
+-commutativeN/A
cosh-asinhN/A
lift-asinh.f64N/A
lift-cosh.f64N/A
Applied rewrites32.5%
Taylor expanded in eh around inf
Applied rewrites83.9%
if -4.1e43 < eh < 3.1e-129Initial program 99.8%
Applied rewrites94.8%
Taylor expanded in eh around 0
Applied rewrites71.4%
Final simplification78.5%
(FPCore (eh ew t) :precision binary64 (if (or (<= t -2e-42) (not (<= t 5.5e-34))) (fabs (* ew (sin t))) (fabs eh)))
double code(double eh, double ew, double t) {
double tmp;
if ((t <= -2e-42) || !(t <= 5.5e-34)) {
tmp = fabs((ew * sin(t)));
} else {
tmp = fabs(eh);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(eh, ew, t)
use fmin_fmax_functions
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-2d-42)) .or. (.not. (t <= 5.5d-34))) then
tmp = abs((ew * sin(t)))
else
tmp = abs(eh)
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double tmp;
if ((t <= -2e-42) || !(t <= 5.5e-34)) {
tmp = Math.abs((ew * Math.sin(t)));
} else {
tmp = Math.abs(eh);
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if (t <= -2e-42) or not (t <= 5.5e-34): tmp = math.fabs((ew * math.sin(t))) else: tmp = math.fabs(eh) return tmp
function code(eh, ew, t) tmp = 0.0 if ((t <= -2e-42) || !(t <= 5.5e-34)) tmp = abs(Float64(ew * sin(t))); else tmp = abs(eh); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if ((t <= -2e-42) || ~((t <= 5.5e-34))) tmp = abs((ew * sin(t))); else tmp = abs(eh); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[Or[LessEqual[t, -2e-42], N[Not[LessEqual[t, 5.5e-34]], $MachinePrecision]], N[Abs[N[(ew * N[Sin[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[eh], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-42} \lor \neg \left(t \leq 5.5 \cdot 10^{-34}\right):\\
\;\;\;\;\left|ew \cdot \sin t\right|\\
\mathbf{else}:\\
\;\;\;\;\left|eh\right|\\
\end{array}
\end{array}
if t < -2.00000000000000008e-42 or 5.50000000000000014e-34 < t Initial program 99.6%
Applied rewrites74.3%
Taylor expanded in eh around 0
Applied rewrites54.3%
if -2.00000000000000008e-42 < t < 5.50000000000000014e-34Initial program 100.0%
Applied rewrites49.7%
lift-cosh.f64N/A
lift-asinh.f64N/A
cosh-asinhN/A
+-commutativeN/A
rem-square-sqrtN/A
+-commutativeN/A
cosh-asinhN/A
lift-asinh.f64N/A
lift-cosh.f64N/A
+-commutativeN/A
cosh-asinhN/A
lift-asinh.f64N/A
lift-cosh.f64N/A
Applied rewrites43.3%
Taylor expanded in t around 0
Applied rewrites74.8%
Final simplification64.3%
(FPCore (eh ew t) :precision binary64 (if (or (<= eh -2.5e-70) (not (<= eh 6.9e-130))) (fabs eh) (fabs (* ew t))))
double code(double eh, double ew, double t) {
double tmp;
if ((eh <= -2.5e-70) || !(eh <= 6.9e-130)) {
tmp = fabs(eh);
} else {
tmp = fabs((ew * t));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(eh, ew, t)
use fmin_fmax_functions
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
real(8) :: tmp
if ((eh <= (-2.5d-70)) .or. (.not. (eh <= 6.9d-130))) then
tmp = abs(eh)
else
tmp = abs((ew * t))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double tmp;
if ((eh <= -2.5e-70) || !(eh <= 6.9e-130)) {
tmp = Math.abs(eh);
} else {
tmp = Math.abs((ew * t));
}
return tmp;
}
def code(eh, ew, t): tmp = 0 if (eh <= -2.5e-70) or not (eh <= 6.9e-130): tmp = math.fabs(eh) else: tmp = math.fabs((ew * t)) return tmp
function code(eh, ew, t) tmp = 0.0 if ((eh <= -2.5e-70) || !(eh <= 6.9e-130)) tmp = abs(eh); else tmp = abs(Float64(ew * t)); end return tmp end
function tmp_2 = code(eh, ew, t) tmp = 0.0; if ((eh <= -2.5e-70) || ~((eh <= 6.9e-130))) tmp = abs(eh); else tmp = abs((ew * t)); end tmp_2 = tmp; end
code[eh_, ew_, t_] := If[Or[LessEqual[eh, -2.5e-70], N[Not[LessEqual[eh, 6.9e-130]], $MachinePrecision]], N[Abs[eh], $MachinePrecision], N[Abs[N[(ew * t), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;eh \leq -2.5 \cdot 10^{-70} \lor \neg \left(eh \leq 6.9 \cdot 10^{-130}\right):\\
\;\;\;\;\left|eh\right|\\
\mathbf{else}:\\
\;\;\;\;\left|ew \cdot t\right|\\
\end{array}
\end{array}
if eh < -2.4999999999999999e-70 or 6.90000000000000035e-130 < eh Initial program 99.8%
Applied rewrites42.9%
lift-cosh.f64N/A
lift-asinh.f64N/A
cosh-asinhN/A
+-commutativeN/A
rem-square-sqrtN/A
+-commutativeN/A
cosh-asinhN/A
lift-asinh.f64N/A
lift-cosh.f64N/A
+-commutativeN/A
cosh-asinhN/A
lift-asinh.f64N/A
lift-cosh.f64N/A
Applied rewrites37.3%
Taylor expanded in t around 0
Applied rewrites54.5%
if -2.4999999999999999e-70 < eh < 6.90000000000000035e-130Initial program 99.8%
Applied rewrites97.6%
Taylor expanded in eh around 0
Applied rewrites75.1%
Taylor expanded in t around 0
Applied rewrites40.8%
Final simplification49.7%
(FPCore (eh ew t) :precision binary64 (fabs eh))
double code(double eh, double ew, double t) {
return fabs(eh);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(eh, ew, t)
use fmin_fmax_functions
real(8), intent (in) :: eh
real(8), intent (in) :: ew
real(8), intent (in) :: t
code = abs(eh)
end function
public static double code(double eh, double ew, double t) {
return Math.abs(eh);
}
def code(eh, ew, t): return math.fabs(eh)
function code(eh, ew, t) return abs(eh) end
function tmp = code(eh, ew, t) tmp = abs(eh); end
code[eh_, ew_, t_] := N[Abs[eh], $MachinePrecision]
\begin{array}{l}
\\
\left|eh\right|
\end{array}
Initial program 99.8%
Applied rewrites62.4%
lift-cosh.f64N/A
lift-asinh.f64N/A
cosh-asinhN/A
+-commutativeN/A
rem-square-sqrtN/A
+-commutativeN/A
cosh-asinhN/A
lift-asinh.f64N/A
lift-cosh.f64N/A
+-commutativeN/A
cosh-asinhN/A
lift-asinh.f64N/A
lift-cosh.f64N/A
Applied rewrites55.8%
Taylor expanded in t around 0
Applied rewrites43.2%
herbie shell --seed 2025026
(FPCore (eh ew t)
:name "Example from Robby"
:precision binary64
(fabs (+ (* (* ew (sin t)) (cos (atan (/ (/ eh ew) (tan t))))) (* (* eh (cos t)) (sin (atan (/ (/ eh ew) (tan t))))))))