Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit 13d6870

Browse files
committed
Add script
1 parent 0a4caf2 commit 13d6870

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

etc/consts-cbrt.jl

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
using Printf
3+
using Remez
4+
5+
function main()
6+
run_one("f64", "hf64!", 53)
7+
end
8+
9+
function run_one(name::String, hf::String, precision::Integer)
10+
setprecision(precision)
11+
12+
println("Constants for ", name)
13+
14+
println("const ESCALE: [Self; 3] = [")
15+
for n in 0:2
16+
val = big(2) ^ (n / 3)
17+
@printf " %s(\"%a\"),\n" hf val
18+
end
19+
print("];")
20+
21+
end
22+
23+
main()

0 commit comments

Comments
 (0)