
(FPCore (eh ew t) :precision binary64 (let* ((t_1 (atan (/ (* (- eh) (tan t)) ew)))) (fabs (- (* (* ew (cos t)) (cos t_1)) (* (* eh (sin t)) (sin t_1))))))
double code(double eh, double ew, double t) {
double t_1 = atan(((-eh * tan(t)) / ew));
return fabs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(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 * tan(t)) / ew))
code = abs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))))
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.atan(((-eh * Math.tan(t)) / ew));
return Math.abs((((ew * Math.cos(t)) * Math.cos(t_1)) - ((eh * Math.sin(t)) * Math.sin(t_1))));
}
def code(eh, ew, t): t_1 = math.atan(((-eh * math.tan(t)) / ew)) return math.fabs((((ew * math.cos(t)) * math.cos(t_1)) - ((eh * math.sin(t)) * math.sin(t_1))))
function code(eh, ew, t) t_1 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew)) return abs(Float64(Float64(Float64(ew * cos(t)) * cos(t_1)) - Float64(Float64(eh * sin(t)) * sin(t_1)))) end
function tmp = code(eh, ew, t) t_1 = atan(((-eh * tan(t)) / ew)); tmp = abs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1)))); end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, N[Abs[N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
\left|\left(ew \cdot \cos t\right) \cdot \cos t\_1 - \left(eh \cdot \sin t\right) \cdot \sin t\_1\right|
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (eh ew t) :precision binary64 (let* ((t_1 (atan (/ (* (- eh) (tan t)) ew)))) (fabs (- (* (* ew (cos t)) (cos t_1)) (* (* eh (sin t)) (sin t_1))))))
double code(double eh, double ew, double t) {
double t_1 = atan(((-eh * tan(t)) / ew));
return fabs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(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 * tan(t)) / ew))
code = abs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))))
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.atan(((-eh * Math.tan(t)) / ew));
return Math.abs((((ew * Math.cos(t)) * Math.cos(t_1)) - ((eh * Math.sin(t)) * Math.sin(t_1))));
}
def code(eh, ew, t): t_1 = math.atan(((-eh * math.tan(t)) / ew)) return math.fabs((((ew * math.cos(t)) * math.cos(t_1)) - ((eh * math.sin(t)) * math.sin(t_1))))
function code(eh, ew, t) t_1 = atan(Float64(Float64(Float64(-eh) * tan(t)) / ew)) return abs(Float64(Float64(Float64(ew * cos(t)) * cos(t_1)) - Float64(Float64(eh * sin(t)) * sin(t_1)))) end
function tmp = code(eh, ew, t) t_1 = atan(((-eh * tan(t)) / ew)); tmp = abs((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1)))); end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[((-eh) * N[Tan[t], $MachinePrecision]), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]}, N[Abs[N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{\left(-eh\right) \cdot \tan t}{ew}\right)\\
\left|\left(ew \cdot \cos t\right) \cdot \cos t\_1 - \left(eh \cdot \sin t\right) \cdot \sin t\_1\right|
\end{array}
\end{array}
(FPCore (eh ew t) :precision binary64 (let* ((t_1 (- (sin t))) (t_2 (atan (* (/ t_1 ew) (/ eh (cos t)))))) (fabs (fma (* t_1 eh) (sin t_2) (* (cos t_2) (* (cos t) ew))))))
double code(double eh, double ew, double t) {
double t_1 = -sin(t);
double t_2 = atan(((t_1 / ew) * (eh / cos(t))));
return fabs(fma((t_1 * eh), sin(t_2), (cos(t_2) * (cos(t) * ew))));
}
function code(eh, ew, t) t_1 = Float64(-sin(t)) t_2 = atan(Float64(Float64(t_1 / ew) * Float64(eh / cos(t)))) return abs(fma(Float64(t_1 * eh), sin(t_2), Float64(cos(t_2) * Float64(cos(t) * ew)))) end
code[eh_, ew_, t_] := Block[{t$95$1 = (-N[Sin[t], $MachinePrecision])}, Block[{t$95$2 = N[ArcTan[N[(N[(t$95$1 / ew), $MachinePrecision] * N[(eh / N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, N[Abs[N[(N[(t$95$1 * eh), $MachinePrecision] * N[Sin[t$95$2], $MachinePrecision] + N[(N[Cos[t$95$2], $MachinePrecision] * N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -\sin t\\
t_2 := \tan^{-1} \left(\frac{t\_1}{ew} \cdot \frac{eh}{\cos t}\right)\\
\left|\mathsf{fma}\left(t\_1 \cdot eh, \sin t\_2, \cos t\_2 \cdot \left(\cos t \cdot ew\right)\right)\right|
\end{array}
\end{array}
Initial program 99.8%
Taylor expanded in eh around 0
fp-cancel-sign-sub-invN/A
distribute-lft-neg-outN/A
distribute-rgt-neg-outN/A
mul-1-negN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
Applied rewrites99.8%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* (cos t) ew)) (t_2 (atan (/ (* eh (tan t)) (- ew)))))
(if (<=
(- (* (* ew (cos t)) (cos t_2)) (* (* eh (sin t)) (sin t_2)))
-1e-272)
(fabs
(*
t_1
(cos
(atan
(* t (fma (* t t) (* (/ eh ew) 0.3333333333333333) (/ eh ew)))))))
(/ (fma (* (/ (tan t) ew) eh) (* (sin t) eh) t_1) 1.0))))
double code(double eh, double ew, double t) {
double t_1 = cos(t) * ew;
double t_2 = atan(((eh * tan(t)) / -ew));
double tmp;
if ((((ew * cos(t)) * cos(t_2)) - ((eh * sin(t)) * sin(t_2))) <= -1e-272) {
tmp = fabs((t_1 * cos(atan((t * fma((t * t), ((eh / ew) * 0.3333333333333333), (eh / ew)))))));
} else {
tmp = fma(((tan(t) / ew) * eh), (sin(t) * eh), t_1) / 1.0;
}
return tmp;
}
function code(eh, ew, t) t_1 = Float64(cos(t) * ew) t_2 = atan(Float64(Float64(eh * tan(t)) / Float64(-ew))) tmp = 0.0 if (Float64(Float64(Float64(ew * cos(t)) * cos(t_2)) - Float64(Float64(eh * sin(t)) * sin(t_2))) <= -1e-272) tmp = abs(Float64(t_1 * cos(atan(Float64(t * fma(Float64(t * t), Float64(Float64(eh / ew) * 0.3333333333333333), Float64(eh / ew))))))); else tmp = Float64(fma(Float64(Float64(tan(t) / ew) * eh), Float64(sin(t) * eh), t_1) / 1.0); end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]}, Block[{t$95$2 = N[ArcTan[N[(N[(eh * N[Tan[t], $MachinePrecision]), $MachinePrecision] / (-ew)), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$2], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1e-272], N[Abs[N[(t$95$1 * N[Cos[N[ArcTan[N[(t * N[(N[(t * t), $MachinePrecision] * N[(N[(eh / ew), $MachinePrecision] * 0.3333333333333333), $MachinePrecision] + N[(eh / ew), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(N[(N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision] * eh), $MachinePrecision] * N[(N[Sin[t], $MachinePrecision] * eh), $MachinePrecision] + t$95$1), $MachinePrecision] / 1.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \cos t \cdot ew\\
t_2 := \tan^{-1} \left(\frac{eh \cdot \tan t}{-ew}\right)\\
\mathbf{if}\;\left(ew \cdot \cos t\right) \cdot \cos t\_2 - \left(eh \cdot \sin t\right) \cdot \sin t\_2 \leq -1 \cdot 10^{-272}:\\
\;\;\;\;\left|t\_1 \cdot \cos \tan^{-1} \left(t \cdot \mathsf{fma}\left(t \cdot t, \frac{eh}{ew} \cdot 0.3333333333333333, \frac{eh}{ew}\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{\tan t}{ew} \cdot eh, \sin t \cdot eh, t\_1\right)}{1}\\
\end{array}
\end{array}
if (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < -9.9999999999999993e-273Initial program 99.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites99.8%
Taylor expanded in eh around 0
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
lower-cos.f64N/A
lower-atan.f64N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
lower-sin.f6456.5
Applied rewrites56.5%
Taylor expanded in t around 0
Applied rewrites36.6%
if -9.9999999999999993e-273 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) Initial program 99.8%
Applied rewrites62.9%
lift-fma.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lower-fma.f6477.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f6477.9
Applied rewrites77.9%
Taylor expanded in eh around 0
Applied rewrites55.5%
Final simplification45.2%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* (/ (tan t) ew) eh)) (t_2 (atan (/ (* eh (tan t)) (- ew)))))
(if (<=
(- (* (* ew (cos t)) (cos t_2)) (* (* eh (sin t)) (sin t_2)))
-1e-272)
(fabs (* (cos (atan t_1)) ew))
(/ (fma t_1 (* (sin t) eh) (* (cos t) ew)) 1.0))))
double code(double eh, double ew, double t) {
double t_1 = (tan(t) / ew) * eh;
double t_2 = atan(((eh * tan(t)) / -ew));
double tmp;
if ((((ew * cos(t)) * cos(t_2)) - ((eh * sin(t)) * sin(t_2))) <= -1e-272) {
tmp = fabs((cos(atan(t_1)) * ew));
} else {
tmp = fma(t_1, (sin(t) * eh), (cos(t) * ew)) / 1.0;
}
return tmp;
}
function code(eh, ew, t) t_1 = Float64(Float64(tan(t) / ew) * eh) t_2 = atan(Float64(Float64(eh * tan(t)) / Float64(-ew))) tmp = 0.0 if (Float64(Float64(Float64(ew * cos(t)) * cos(t_2)) - Float64(Float64(eh * sin(t)) * sin(t_2))) <= -1e-272) tmp = abs(Float64(cos(atan(t_1)) * ew)); else tmp = Float64(fma(t_1, Float64(sin(t) * eh), Float64(cos(t) * ew)) / 1.0); end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision] * eh), $MachinePrecision]}, Block[{t$95$2 = N[ArcTan[N[(N[(eh * N[Tan[t], $MachinePrecision]), $MachinePrecision] / (-ew)), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$2], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1e-272], N[Abs[N[(N[Cos[N[ArcTan[t$95$1], $MachinePrecision]], $MachinePrecision] * ew), $MachinePrecision]], $MachinePrecision], N[(N[(t$95$1 * N[(N[Sin[t], $MachinePrecision] * eh), $MachinePrecision] + N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision] / 1.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\tan t}{ew} \cdot eh\\
t_2 := \tan^{-1} \left(\frac{eh \cdot \tan t}{-ew}\right)\\
\mathbf{if}\;\left(ew \cdot \cos t\right) \cdot \cos t\_2 - \left(eh \cdot \sin t\right) \cdot \sin t\_2 \leq -1 \cdot 10^{-272}:\\
\;\;\;\;\left|\cos \tan^{-1} t\_1 \cdot ew\right|\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(t\_1, \sin t \cdot eh, \cos t \cdot ew\right)}{1}\\
\end{array}
\end{array}
if (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < -9.9999999999999993e-273Initial program 99.8%
Taylor expanded in t around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites35.7%
Applied rewrites35.7%
if -9.9999999999999993e-273 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) Initial program 99.8%
Applied rewrites62.9%
lift-fma.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lower-fma.f6477.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f6477.9
Applied rewrites77.9%
Taylor expanded in eh around 0
Applied rewrites55.5%
Final simplification44.7%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (atan (/ (* eh (tan t)) (- ew)))))
(if (<=
(- (* (* ew (cos t)) (cos t_1)) (* (* eh (sin t)) (sin t_1)))
-1e-272)
(fabs (* (cos (atan (* (/ (tan t) ew) eh))) ew))
(* (cos t) ew))))
double code(double eh, double ew, double t) {
double t_1 = atan(((eh * tan(t)) / -ew));
double tmp;
if ((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))) <= -1e-272) {
tmp = fabs((cos(atan(((tan(t) / ew) * eh))) * ew));
} else {
tmp = cos(t) * ew;
}
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 = atan(((eh * tan(t)) / -ew))
if ((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))) <= (-1d-272)) then
tmp = abs((cos(atan(((tan(t) / ew) * eh))) * ew))
else
tmp = cos(t) * ew
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.atan(((eh * Math.tan(t)) / -ew));
double tmp;
if ((((ew * Math.cos(t)) * Math.cos(t_1)) - ((eh * Math.sin(t)) * Math.sin(t_1))) <= -1e-272) {
tmp = Math.abs((Math.cos(Math.atan(((Math.tan(t) / ew) * eh))) * ew));
} else {
tmp = Math.cos(t) * ew;
}
return tmp;
}
def code(eh, ew, t): t_1 = math.atan(((eh * math.tan(t)) / -ew)) tmp = 0 if (((ew * math.cos(t)) * math.cos(t_1)) - ((eh * math.sin(t)) * math.sin(t_1))) <= -1e-272: tmp = math.fabs((math.cos(math.atan(((math.tan(t) / ew) * eh))) * ew)) else: tmp = math.cos(t) * ew return tmp
function code(eh, ew, t) t_1 = atan(Float64(Float64(eh * tan(t)) / Float64(-ew))) tmp = 0.0 if (Float64(Float64(Float64(ew * cos(t)) * cos(t_1)) - Float64(Float64(eh * sin(t)) * sin(t_1))) <= -1e-272) tmp = abs(Float64(cos(atan(Float64(Float64(tan(t) / ew) * eh))) * ew)); else tmp = Float64(cos(t) * ew); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = atan(((eh * tan(t)) / -ew)); tmp = 0.0; if ((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))) <= -1e-272) tmp = abs((cos(atan(((tan(t) / ew) * eh))) * ew)); else tmp = cos(t) * ew; end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[(eh * N[Tan[t], $MachinePrecision]), $MachinePrecision] / (-ew)), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1e-272], N[Abs[N[(N[Cos[N[ArcTan[N[(N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * ew), $MachinePrecision]], $MachinePrecision], N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{eh \cdot \tan t}{-ew}\right)\\
\mathbf{if}\;\left(ew \cdot \cos t\right) \cdot \cos t\_1 - \left(eh \cdot \sin t\right) \cdot \sin t\_1 \leq -1 \cdot 10^{-272}:\\
\;\;\;\;\left|\cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right) \cdot ew\right|\\
\mathbf{else}:\\
\;\;\;\;\cos t \cdot ew\\
\end{array}
\end{array}
if (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < -9.9999999999999993e-273Initial program 99.8%
Taylor expanded in t around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites35.7%
Applied rewrites35.7%
if -9.9999999999999993e-273 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) Initial program 99.8%
Applied rewrites62.9%
Taylor expanded in eh around 0
*-commutativeN/A
lower-*.f64N/A
lower-cos.f6455.1
Applied rewrites55.1%
Final simplification44.6%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (atan (/ (* eh (tan t)) (- ew)))))
(if (<=
(- (* (* ew (cos t)) (cos t_1)) (* (* eh (sin t)) (sin t_1)))
-1e-272)
(fabs (* (cos (atan (/ (* (- eh) t) ew))) ew))
(* (cos t) ew))))
double code(double eh, double ew, double t) {
double t_1 = atan(((eh * tan(t)) / -ew));
double tmp;
if ((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))) <= -1e-272) {
tmp = fabs((cos(atan(((-eh * t) / ew))) * ew));
} else {
tmp = cos(t) * ew;
}
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 = atan(((eh * tan(t)) / -ew))
if ((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))) <= (-1d-272)) then
tmp = abs((cos(atan(((-eh * t) / ew))) * ew))
else
tmp = cos(t) * ew
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = Math.atan(((eh * Math.tan(t)) / -ew));
double tmp;
if ((((ew * Math.cos(t)) * Math.cos(t_1)) - ((eh * Math.sin(t)) * Math.sin(t_1))) <= -1e-272) {
tmp = Math.abs((Math.cos(Math.atan(((-eh * t) / ew))) * ew));
} else {
tmp = Math.cos(t) * ew;
}
return tmp;
}
def code(eh, ew, t): t_1 = math.atan(((eh * math.tan(t)) / -ew)) tmp = 0 if (((ew * math.cos(t)) * math.cos(t_1)) - ((eh * math.sin(t)) * math.sin(t_1))) <= -1e-272: tmp = math.fabs((math.cos(math.atan(((-eh * t) / ew))) * ew)) else: tmp = math.cos(t) * ew return tmp
function code(eh, ew, t) t_1 = atan(Float64(Float64(eh * tan(t)) / Float64(-ew))) tmp = 0.0 if (Float64(Float64(Float64(ew * cos(t)) * cos(t_1)) - Float64(Float64(eh * sin(t)) * sin(t_1))) <= -1e-272) tmp = abs(Float64(cos(atan(Float64(Float64(Float64(-eh) * t) / ew))) * ew)); else tmp = Float64(cos(t) * ew); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = atan(((eh * tan(t)) / -ew)); tmp = 0.0; if ((((ew * cos(t)) * cos(t_1)) - ((eh * sin(t)) * sin(t_1))) <= -1e-272) tmp = abs((cos(atan(((-eh * t) / ew))) * ew)); else tmp = cos(t) * ew; end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = N[ArcTan[N[(N[(eh * N[Tan[t], $MachinePrecision]), $MachinePrecision] / (-ew)), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(N[(ew * N[Cos[t], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision] - N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1e-272], N[Abs[N[(N[Cos[N[ArcTan[N[(N[((-eh) * t), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * ew), $MachinePrecision]], $MachinePrecision], N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \tan^{-1} \left(\frac{eh \cdot \tan t}{-ew}\right)\\
\mathbf{if}\;\left(ew \cdot \cos t\right) \cdot \cos t\_1 - \left(eh \cdot \sin t\right) \cdot \sin t\_1 \leq -1 \cdot 10^{-272}:\\
\;\;\;\;\left|\cos \tan^{-1} \left(\frac{\left(-eh\right) \cdot t}{ew}\right) \cdot ew\right|\\
\mathbf{else}:\\
\;\;\;\;\cos t \cdot ew\\
\end{array}
\end{array}
if (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) < -9.9999999999999993e-273Initial program 99.8%
Taylor expanded in t around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites35.7%
Taylor expanded in t around 0
Applied rewrites34.6%
if -9.9999999999999993e-273 < (-.f64 (*.f64 (*.f64 ew (cos.f64 t)) (cos.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew)))) (*.f64 (*.f64 eh (sin.f64 t)) (sin.f64 (atan.f64 (/.f64 (*.f64 (neg.f64 eh) (tan.f64 t)) ew))))) Initial program 99.8%
Applied rewrites62.9%
Taylor expanded in eh around 0
*-commutativeN/A
lower-*.f64N/A
lower-cos.f6455.1
Applied rewrites55.1%
Final simplification44.0%
(FPCore (eh ew t) :precision binary64 (fabs (- (* (* eh (sin t)) (sin (atan (/ (* eh (tan t)) (- ew))))) (* (* (cos (atan (* (/ (tan t) ew) eh))) (cos t)) ew))))
double code(double eh, double ew, double t) {
return fabs((((eh * sin(t)) * sin(atan(((eh * tan(t)) / -ew)))) - ((cos(atan(((tan(t) / ew) * eh))) * cos(t)) * ew)));
}
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 * sin(t)) * sin(atan(((eh * tan(t)) / -ew)))) - ((cos(atan(((tan(t) / ew) * eh))) * cos(t)) * ew)))
end function
public static double code(double eh, double ew, double t) {
return Math.abs((((eh * Math.sin(t)) * Math.sin(Math.atan(((eh * Math.tan(t)) / -ew)))) - ((Math.cos(Math.atan(((Math.tan(t) / ew) * eh))) * Math.cos(t)) * ew)));
}
def code(eh, ew, t): return math.fabs((((eh * math.sin(t)) * math.sin(math.atan(((eh * math.tan(t)) / -ew)))) - ((math.cos(math.atan(((math.tan(t) / ew) * eh))) * math.cos(t)) * ew)))
function code(eh, ew, t) return abs(Float64(Float64(Float64(eh * sin(t)) * sin(atan(Float64(Float64(eh * tan(t)) / Float64(-ew))))) - Float64(Float64(cos(atan(Float64(Float64(tan(t) / ew) * eh))) * cos(t)) * ew))) end
function tmp = code(eh, ew, t) tmp = abs((((eh * sin(t)) * sin(atan(((eh * tan(t)) / -ew)))) - ((cos(atan(((tan(t) / ew) * eh))) * cos(t)) * ew))); end
code[eh_, ew_, t_] := N[Abs[N[(N[(N[(eh * N[Sin[t], $MachinePrecision]), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(eh * N[Tan[t], $MachinePrecision]), $MachinePrecision] / (-ew)), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[(N[Cos[N[ArcTan[N[(N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Cos[t], $MachinePrecision]), $MachinePrecision] * ew), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\left(eh \cdot \sin t\right) \cdot \sin \tan^{-1} \left(\frac{eh \cdot \tan t}{-ew}\right) - \left(\cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right) \cdot \cos t\right) \cdot ew\right|
\end{array}
Initial program 99.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites99.8%
Final simplification99.8%
(FPCore (eh ew t) :precision binary64 (fabs (fma (tanh (asinh (/ (* (- t) eh) ew))) (* (sin t) eh) (* (* (cos t) (- ew)) (cos (atan (* (/ (tan t) ew) eh)))))))
double code(double eh, double ew, double t) {
return fabs(fma(tanh(asinh(((-t * eh) / ew))), (sin(t) * eh), ((cos(t) * -ew) * cos(atan(((tan(t) / ew) * eh))))));
}
function code(eh, ew, t) return abs(fma(tanh(asinh(Float64(Float64(Float64(-t) * eh) / ew))), Float64(sin(t) * eh), Float64(Float64(cos(t) * Float64(-ew)) * cos(atan(Float64(Float64(tan(t) / ew) * eh)))))) end
code[eh_, ew_, t_] := N[Abs[N[(N[Tanh[N[ArcSinh[N[(N[((-t) * eh), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(N[Sin[t], $MachinePrecision] * eh), $MachinePrecision] + N[(N[(N[Cos[t], $MachinePrecision] * (-ew)), $MachinePrecision] * N[Cos[N[ArcTan[N[(N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\mathsf{fma}\left(\tanh \sinh^{-1} \left(\frac{\left(-t\right) \cdot eh}{ew}\right), \sin t \cdot eh, \left(\cos t \cdot \left(-ew\right)\right) \cdot \cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right)\right)\right|
\end{array}
Initial program 99.8%
Taylor expanded in t around 0
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f6499.1
Applied rewrites99.1%
Applied rewrites99.1%
Final simplification99.1%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (* (sin t) eh)) (t_2 (/ (tan t) ew)))
(if (<= ew 2.8e+52)
(fabs
(fma
(tanh (asinh (/ (* (- t) eh) ew)))
t_1
(* (* (cos t) (- ew)) (cos (atan (/ (* eh t) ew))))))
(fabs
(/ (+ (* (cos t) ew) (* t_1 (* eh t_2))) (cosh (asinh (* t_2 eh))))))))
double code(double eh, double ew, double t) {
double t_1 = sin(t) * eh;
double t_2 = tan(t) / ew;
double tmp;
if (ew <= 2.8e+52) {
tmp = fabs(fma(tanh(asinh(((-t * eh) / ew))), t_1, ((cos(t) * -ew) * cos(atan(((eh * t) / ew))))));
} else {
tmp = fabs((((cos(t) * ew) + (t_1 * (eh * t_2))) / cosh(asinh((t_2 * eh)))));
}
return tmp;
}
function code(eh, ew, t) t_1 = Float64(sin(t) * eh) t_2 = Float64(tan(t) / ew) tmp = 0.0 if (ew <= 2.8e+52) tmp = abs(fma(tanh(asinh(Float64(Float64(Float64(-t) * eh) / ew))), t_1, Float64(Float64(cos(t) * Float64(-ew)) * cos(atan(Float64(Float64(eh * t) / ew)))))); else tmp = abs(Float64(Float64(Float64(cos(t) * ew) + Float64(t_1 * Float64(eh * t_2))) / cosh(asinh(Float64(t_2 * eh))))); end return tmp end
code[eh_, ew_, t_] := Block[{t$95$1 = N[(N[Sin[t], $MachinePrecision] * eh), $MachinePrecision]}, Block[{t$95$2 = N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision]}, If[LessEqual[ew, 2.8e+52], N[Abs[N[(N[Tanh[N[ArcSinh[N[(N[((-t) * eh), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * t$95$1 + N[(N[(N[Cos[t], $MachinePrecision] * (-ew)), $MachinePrecision] * N[Cos[N[ArcTan[N[(N[(eh * t), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision] + N[(t$95$1 * N[(eh * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Cosh[N[ArcSinh[N[(t$95$2 * eh), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sin t \cdot eh\\
t_2 := \frac{\tan t}{ew}\\
\mathbf{if}\;ew \leq 2.8 \cdot 10^{+52}:\\
\;\;\;\;\left|\mathsf{fma}\left(\tanh \sinh^{-1} \left(\frac{\left(-t\right) \cdot eh}{ew}\right), t\_1, \left(\cos t \cdot \left(-ew\right)\right) \cdot \cos \tan^{-1} \left(\frac{eh \cdot t}{ew}\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{\cos t \cdot ew + t\_1 \cdot \left(eh \cdot t\_2\right)}{\cosh \sinh^{-1} \left(t\_2 \cdot eh\right)}\right|\\
\end{array}
\end{array}
if ew < 2.8e52Initial program 99.8%
Taylor expanded in t around 0
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f6499.2
Applied rewrites99.2%
Applied rewrites99.2%
Taylor expanded in t around 0
lower-/.f64N/A
lower-*.f6494.6
Applied rewrites94.6%
if 2.8e52 < ew Initial program 99.8%
Taylor expanded in eh around 0
fp-cancel-sign-sub-invN/A
distribute-lft-neg-outN/A
distribute-rgt-neg-outN/A
mul-1-negN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
Applied rewrites99.8%
Applied rewrites97.7%
Final simplification95.2%
(FPCore (eh ew t)
:precision binary64
(if (<= ew 5.9e+91)
(fabs
(fma
(tanh (asinh (/ (* (- t) eh) ew)))
(* (sin t) eh)
(* (* (cos t) (- ew)) (cos (atan (/ (* eh t) ew))))))
(fabs (* (* (cos (atan (* (/ (tan t) ew) eh))) (cos t)) ew))))
double code(double eh, double ew, double t) {
double tmp;
if (ew <= 5.9e+91) {
tmp = fabs(fma(tanh(asinh(((-t * eh) / ew))), (sin(t) * eh), ((cos(t) * -ew) * cos(atan(((eh * t) / ew))))));
} else {
tmp = fabs(((cos(atan(((tan(t) / ew) * eh))) * cos(t)) * ew));
}
return tmp;
}
function code(eh, ew, t) tmp = 0.0 if (ew <= 5.9e+91) tmp = abs(fma(tanh(asinh(Float64(Float64(Float64(-t) * eh) / ew))), Float64(sin(t) * eh), Float64(Float64(cos(t) * Float64(-ew)) * cos(atan(Float64(Float64(eh * t) / ew)))))); else tmp = abs(Float64(Float64(cos(atan(Float64(Float64(tan(t) / ew) * eh))) * cos(t)) * ew)); end return tmp end
code[eh_, ew_, t_] := If[LessEqual[ew, 5.9e+91], N[Abs[N[(N[Tanh[N[ArcSinh[N[(N[((-t) * eh), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(N[Sin[t], $MachinePrecision] * eh), $MachinePrecision] + N[(N[(N[Cos[t], $MachinePrecision] * (-ew)), $MachinePrecision] * N[Cos[N[ArcTan[N[(N[(eh * t), $MachinePrecision] / ew), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[Cos[N[ArcTan[N[(N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Cos[t], $MachinePrecision]), $MachinePrecision] * ew), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;ew \leq 5.9 \cdot 10^{+91}:\\
\;\;\;\;\left|\mathsf{fma}\left(\tanh \sinh^{-1} \left(\frac{\left(-t\right) \cdot eh}{ew}\right), \sin t \cdot eh, \left(\cos t \cdot \left(-ew\right)\right) \cdot \cos \tan^{-1} \left(\frac{eh \cdot t}{ew}\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\left(\cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right) \cdot \cos t\right) \cdot ew\right|\\
\end{array}
\end{array}
if ew < 5.9000000000000002e91Initial program 99.8%
Taylor expanded in t around 0
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f6499.2
Applied rewrites99.2%
Applied rewrites99.2%
Taylor expanded in t around 0
lower-/.f64N/A
lower-*.f6493.9
Applied rewrites93.9%
if 5.9000000000000002e91 < ew Initial program 99.9%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites99.9%
Taylor expanded in eh around 0
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
lower-cos.f64N/A
lower-atan.f64N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
lower-sin.f6491.7
Applied rewrites91.7%
Applied rewrites91.7%
Final simplification93.5%
(FPCore (eh ew t)
:precision binary64
(let* ((t_1 (- (sin t))))
(if (or (<= ew -3.05e+25) (not (<= ew 3.8e-97)))
(fabs (* (* (cos (atan (* (/ (tan t) ew) eh))) (cos t)) ew))
(fabs (* (* t_1 eh) (sin (atan (* (/ t_1 ew) (/ eh (cos t))))))))))
double code(double eh, double ew, double t) {
double t_1 = -sin(t);
double tmp;
if ((ew <= -3.05e+25) || !(ew <= 3.8e-97)) {
tmp = fabs(((cos(atan(((tan(t) / ew) * eh))) * cos(t)) * ew));
} else {
tmp = fabs(((t_1 * eh) * sin(atan(((t_1 / ew) * (eh / cos(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) :: t_1
real(8) :: tmp
t_1 = -sin(t)
if ((ew <= (-3.05d+25)) .or. (.not. (ew <= 3.8d-97))) then
tmp = abs(((cos(atan(((tan(t) / ew) * eh))) * cos(t)) * ew))
else
tmp = abs(((t_1 * eh) * sin(atan(((t_1 / ew) * (eh / cos(t)))))))
end if
code = tmp
end function
public static double code(double eh, double ew, double t) {
double t_1 = -Math.sin(t);
double tmp;
if ((ew <= -3.05e+25) || !(ew <= 3.8e-97)) {
tmp = Math.abs(((Math.cos(Math.atan(((Math.tan(t) / ew) * eh))) * Math.cos(t)) * ew));
} else {
tmp = Math.abs(((t_1 * eh) * Math.sin(Math.atan(((t_1 / ew) * (eh / Math.cos(t)))))));
}
return tmp;
}
def code(eh, ew, t): t_1 = -math.sin(t) tmp = 0 if (ew <= -3.05e+25) or not (ew <= 3.8e-97): tmp = math.fabs(((math.cos(math.atan(((math.tan(t) / ew) * eh))) * math.cos(t)) * ew)) else: tmp = math.fabs(((t_1 * eh) * math.sin(math.atan(((t_1 / ew) * (eh / math.cos(t))))))) return tmp
function code(eh, ew, t) t_1 = Float64(-sin(t)) tmp = 0.0 if ((ew <= -3.05e+25) || !(ew <= 3.8e-97)) tmp = abs(Float64(Float64(cos(atan(Float64(Float64(tan(t) / ew) * eh))) * cos(t)) * ew)); else tmp = abs(Float64(Float64(t_1 * eh) * sin(atan(Float64(Float64(t_1 / ew) * Float64(eh / cos(t))))))); end return tmp end
function tmp_2 = code(eh, ew, t) t_1 = -sin(t); tmp = 0.0; if ((ew <= -3.05e+25) || ~((ew <= 3.8e-97))) tmp = abs(((cos(atan(((tan(t) / ew) * eh))) * cos(t)) * ew)); else tmp = abs(((t_1 * eh) * sin(atan(((t_1 / ew) * (eh / cos(t))))))); end tmp_2 = tmp; end
code[eh_, ew_, t_] := Block[{t$95$1 = (-N[Sin[t], $MachinePrecision])}, If[Or[LessEqual[ew, -3.05e+25], N[Not[LessEqual[ew, 3.8e-97]], $MachinePrecision]], N[Abs[N[(N[(N[Cos[N[ArcTan[N[(N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Cos[t], $MachinePrecision]), $MachinePrecision] * ew), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(t$95$1 * eh), $MachinePrecision] * N[Sin[N[ArcTan[N[(N[(t$95$1 / ew), $MachinePrecision] * N[(eh / N[Cos[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -\sin t\\
\mathbf{if}\;ew \leq -3.05 \cdot 10^{+25} \lor \neg \left(ew \leq 3.8 \cdot 10^{-97}\right):\\
\;\;\;\;\left|\left(\cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right) \cdot \cos t\right) \cdot ew\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\left(t\_1 \cdot eh\right) \cdot \sin \tan^{-1} \left(\frac{t\_1}{ew} \cdot \frac{eh}{\cos t}\right)\right|\\
\end{array}
\end{array}
if ew < -3.0500000000000001e25 or 3.8000000000000001e-97 < ew Initial program 99.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites99.8%
Taylor expanded in eh around 0
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
lower-cos.f64N/A
lower-atan.f64N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
lower-sin.f6479.1
Applied rewrites79.1%
Applied rewrites79.1%
if -3.0500000000000001e25 < ew < 3.8000000000000001e-97Initial program 99.8%
Taylor expanded in eh around inf
mul-1-negN/A
associate-*r*N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-sin.f64N/A
lower-sin.f64N/A
lower-atan.f64N/A
mul-1-negN/A
*-commutativeN/A
times-fracN/A
distribute-lft-neg-inN/A
Applied rewrites74.6%
Final simplification77.0%
(FPCore (eh ew t) :precision binary64 (fabs (* (* (cos (atan (* (/ (tan t) ew) eh))) (cos t)) ew)))
double code(double eh, double ew, double t) {
return fabs(((cos(atan(((tan(t) / ew) * eh))) * cos(t)) * ew));
}
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(((cos(atan(((tan(t) / ew) * eh))) * cos(t)) * ew))
end function
public static double code(double eh, double ew, double t) {
return Math.abs(((Math.cos(Math.atan(((Math.tan(t) / ew) * eh))) * Math.cos(t)) * ew));
}
def code(eh, ew, t): return math.fabs(((math.cos(math.atan(((math.tan(t) / ew) * eh))) * math.cos(t)) * ew))
function code(eh, ew, t) return abs(Float64(Float64(cos(atan(Float64(Float64(tan(t) / ew) * eh))) * cos(t)) * ew)) end
function tmp = code(eh, ew, t) tmp = abs(((cos(atan(((tan(t) / ew) * eh))) * cos(t)) * ew)); end
code[eh_, ew_, t_] := N[Abs[N[(N[(N[Cos[N[ArcTan[N[(N[(N[Tan[t], $MachinePrecision] / ew), $MachinePrecision] * eh), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Cos[t], $MachinePrecision]), $MachinePrecision] * ew), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\left(\cos \tan^{-1} \left(\frac{\tan t}{ew} \cdot eh\right) \cdot \cos t\right) \cdot ew\right|
\end{array}
Initial program 99.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites99.8%
Taylor expanded in eh around 0
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
lower-cos.f64N/A
lower-atan.f64N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
lower-sin.f6455.8
Applied rewrites55.8%
Applied rewrites55.8%
(FPCore (eh ew t) :precision binary64 (* (cos t) ew))
double code(double eh, double ew, double t) {
return cos(t) * ew;
}
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 = cos(t) * ew
end function
public static double code(double eh, double ew, double t) {
return Math.cos(t) * ew;
}
def code(eh, ew, t): return math.cos(t) * ew
function code(eh, ew, t) return Float64(cos(t) * ew) end
function tmp = code(eh, ew, t) tmp = cos(t) * ew; end
code[eh_, ew_, t_] := N[(N[Cos[t], $MachinePrecision] * ew), $MachinePrecision]
\begin{array}{l}
\\
\cos t \cdot ew
\end{array}
Initial program 99.8%
Applied rewrites29.4%
Taylor expanded in eh around 0
*-commutativeN/A
lower-*.f64N/A
lower-cos.f6426.0
Applied rewrites26.0%
(FPCore (eh ew t) :precision binary64 (fma (* ew (* -0.5 t)) t ew))
double code(double eh, double ew, double t) {
return fma((ew * (-0.5 * t)), t, ew);
}
function code(eh, ew, t) return fma(Float64(ew * Float64(-0.5 * t)), t, ew) end
code[eh_, ew_, t_] := N[(N[(ew * N[(-0.5 * t), $MachinePrecision]), $MachinePrecision] * t + ew), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(ew \cdot \left(-0.5 \cdot t\right), t, ew\right)
\end{array}
Initial program 99.8%
Applied rewrites29.4%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6412.7
Applied rewrites12.7%
Taylor expanded in ew around inf
Applied rewrites17.0%
Applied rewrites17.1%
(FPCore (eh ew t) :precision binary64 (* ew (fma -0.5 (* t t) 1.0)))
double code(double eh, double ew, double t) {
return ew * fma(-0.5, (t * t), 1.0);
}
function code(eh, ew, t) return Float64(ew * fma(-0.5, Float64(t * t), 1.0)) end
code[eh_, ew_, t_] := N[(ew * N[(-0.5 * N[(t * t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
ew \cdot \mathsf{fma}\left(-0.5, t \cdot t, 1\right)
\end{array}
Initial program 99.8%
Applied rewrites29.4%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6412.7
Applied rewrites12.7%
Taylor expanded in ew around inf
Applied rewrites17.0%
(FPCore (eh ew t) :precision binary64 (* -0.5 (* ew (* t t))))
double code(double eh, double ew, double t) {
return -0.5 * (ew * (t * 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 = (-0.5d0) * (ew * (t * t))
end function
public static double code(double eh, double ew, double t) {
return -0.5 * (ew * (t * t));
}
def code(eh, ew, t): return -0.5 * (ew * (t * t))
function code(eh, ew, t) return Float64(-0.5 * Float64(ew * Float64(t * t))) end
function tmp = code(eh, ew, t) tmp = -0.5 * (ew * (t * t)); end
code[eh_, ew_, t_] := N[(-0.5 * N[(ew * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
-0.5 \cdot \left(ew \cdot \left(t \cdot t\right)\right)
\end{array}
Initial program 99.8%
Applied rewrites29.4%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6412.7
Applied rewrites12.7%
Taylor expanded in ew around inf
Applied rewrites17.0%
Taylor expanded in t around inf
Applied rewrites3.2%
herbie shell --seed 2024347
(FPCore (eh ew t)
:name "Example 2 from Robby"
:precision binary64
(fabs (- (* (* ew (cos t)) (cos (atan (/ (* (- eh) (tan t)) ew)))) (* (* eh (sin t)) (sin (atan (/ (* (- eh) (tan t)) ew)))))))