Skip to content

Commit 83dc6c9

Browse files
committed
Omerc.fpcore
1 parent 59b1409 commit 83dc6c9

File tree

2 files changed

+111
-1
lines changed

2 files changed

+111
-1
lines changed

bench/omerc.fpcore

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
; Hard benchmarks extracted from growlibm/omerc.cpp Oblique Mercator setup, focusing on tight domain guards and coupled trig/hyperbolic transforms.
2+
3+
(FPCore (S V singam cosgam T)
4+
:name "omerc-hard-u-mix"
5+
:pre (and (> (fabs T) 1e-12)
6+
(< (fabs singam) 1)
7+
(< (fabs cosgam) 1)
8+
(< (fabs V) 1))
9+
(/ (- (* S singam) (* V cosgam)) T))
10+
11+
(FPCore (U ArB)
12+
:name "omerc-hard-log-ratio"
13+
:pre (and (< (fabs U) 0.999999)
14+
(> ArB 0))
15+
(* 0.5
16+
(* ArB
17+
(log (/ (- 1 U)
18+
(+ 1 U))))))
19+
20+
(FPCore (ArB S V singam cosgam temp)
21+
:name "omerc-hard-atan2-rot"
22+
:pre (and (>= (fabs temp) 1e-7)
23+
(< (fabs singam) 1)
24+
(< (fabs cosgam) 1)
25+
(< (fabs V) 1))
26+
(* ArB
27+
(atan2 (+ (* S cosgam)
28+
(* V singam))
29+
temp)))
30+
31+
(FPCore (Qp)
32+
:name "omerc-hard-sinh-sp"
33+
:pre (> Qp 0)
34+
(* 0.5
35+
(- Qp
36+
(/ 1 Qp))))
37+
38+
(FPCore (Qp)
39+
:name "omerc-hard-cosh-tp"
40+
:pre (> Qp 0)
41+
(* 0.5
42+
(+ Qp
43+
(/ 1 Qp))))
44+
45+
(FPCore (Vp Sp singam cosgam Tp)
46+
:name "omerc-hard-up-frac"
47+
:pre (and (> (fabs Tp) 1e-12)
48+
(< (fabs singam) 1)
49+
(< (fabs cosgam) 1)
50+
(< (fabs Vp) 1))
51+
(/ (+ (* Vp cosgam)
52+
(* Sp singam))
53+
Tp))
54+
55+
(FPCore (Esc Up)
56+
:name "omerc-hard-phi-scale"
57+
:pre (and (> Esc 0)
58+
(< (fabs Up) 0.999999))
59+
(/ Esc
60+
(sqrt (/ (+ 1 Up)
61+
(- 1 Up)))))
62+
63+
(FPCore (rB Sp Vp singam cosgam BrAu)
64+
:name "omerc-hard-lambda-atan2"
65+
:pre (and (< (fabs singam) 1)
66+
(< (fabs cosgam) 1)
67+
(< (fabs Vp) 1))
68+
(* -1
69+
(* rB
70+
(atan2 (- (* Sp cosgam)
71+
(* Vp singam))
72+
(cos BrAu)))))
73+
74+
(FPCore (B lamDiff denom)
75+
:name "omerc-hard-gamma0-atan"
76+
:pre (and (> (fabs denom) 1e-12)
77+
(< (fabs lamDiff) 10))
78+
(atan (/ (* 2 (sin (* B lamDiff)))
79+
denom)))
80+
81+
(FPCore (lamc F gamma0 B)
82+
:name "omerc-hard-lam0-shift"
83+
:pre (and (> (fabs B) 1e-12)
84+
(> (fabs F) 1e-12)
85+
(< (fabs (* (* 0.5 (- F (/ 1 F)))
86+
(tan gamma0)))
87+
0.999999))
88+
(let ((asinArg (* (* 0.5 (- F (/ 1 F)))
89+
(tan gamma0))))
90+
(- lamc
91+
(/ (asin asinArg)
92+
B))))
93+
94+
(FPCore (ArB D alpha_c)
95+
:name "omerc-hard-u0-atan"
96+
:pre (and (> ArB 0)
97+
(>= (- (* D D) 1) 0)
98+
(> (fabs (cos alpha_c)) 1e-12))
99+
(fabs (* ArB
100+
(atan (/ (sqrt (- (* D D) 1))
101+
(cos alpha_c))))))
102+
103+
(FPCore (ArB gamma0 fortpi)
104+
:name "omerc-hard-v-pole"
105+
:pre (and (> ArB 0)
106+
(< (fabs gamma0) 3)
107+
(> (tan (- fortpi (* 0.5 gamma0))) 0))
108+
(* ArB
109+
(log (tan (- fortpi
110+
(* 0.5 gamma0))))))

infra/nightly.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export PATH="$PATH:$HOME/.cargo/bin/"
88

99
# Seed is fixed for the whole day; this way two branches run the same seed
1010
SEED=$(date "+%Y%j")
11-
BENCHDIR="bench/growlibm-helmholtz.fpcore"
11+
BENCHDIR="bench/omerc.fpcore"
1212
REPORTDIR="reports"
1313
NUMITERS=10
1414

0 commit comments

Comments
 (0)