diff --git a/doc/book.html b/doc/book.html index c57fc48cd..6be35063f 100644 --- a/doc/book.html +++ b/doc/book.html @@ -1194,7 +1194,7 @@
The Koka Programming Language
-
(Daan Leijen, 2024-01-14)
+
(Daan Leijen, 2024-01-15)
diff --git a/doc/std_core-source.html b/doc/std_core-source.html index da58d5458..24ca7cbb9 100644 --- a/doc/std_core-source.html +++ b/doc/std_core-source.html @@ -1034,7 +1034,7 @@ // * `D%(2^n) == D & ((2^n) - 1) ` (with `0 <= n <= 31` and `2^n` means `2` to the power of `n` ) // // See also _Division and modulus for computer scientists, Daan Leijen, 2001_ for further information -// available at: <http://research.microsoft.com/pubs/151917/divmodnote.pdf> . +// available at: <https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/divmodnote-letter.pdf> . pub inline fip extern int/divmodstd/core/int/divmod: (x : int, y : int) -> (int, int)(x:intstd/core/types/int: V,y:intstd/core/types/int: V) : (std/core/types/tuple2: (V, V) -> Vintstd/core/types/int: V,intstd/core/types/int: V) c "kk_integer_div_mod_tuple" cs "Primitive.IntDivMod" diff --git a/doc/std_core.html b/doc/std_core.html index 5c9a9e38e..cd7bd48c9 100644 --- a/doc/std_core.html +++ b/doc/std_core.html @@ -879,7 +879,7 @@

Core functions.

D%(2n) == D & ((2n) - 1) (with 0 <= n <= 31 and 2^n means 2 to the power of n )
See also Division and modulus for computer scientists, Daan Leijen, 2001 for further information - available at: http://​research.​microsoft.​com/​pubs/​151917/​divmodnote.​pdf . + available at: https://​www.​microsoft.​com/​en-​us/​research/​wp-​content/​uploads/​2016/​02/​divmodnote-​letter.​pdf .

fun int/float32( i : intstd/core/types/int: V ) : float32std/core/types/float32: V
diff --git a/doc/std_num_ddouble-source.html b/doc/std_num_ddouble-source.html index d54bf84f7..121c7e88c 100644 --- a/doc/std_num_ddouble-source.html +++ b/doc/std_num_ddouble-source.html @@ -122,32 +122,32 @@ T.\ Dekker. _A Floating-Point Technique for Extending the Available Precision_. Numerische\ Mathematik, vol. 18 (3), June 1971, 224--242. -[pdf](http://gdz.sub.uni-goettingen.de/dms/resolveppn/?PPN=GDZPPN001170007). +[pdf](https://gdz.sub.uni-goettingen.de/dms/resolveppn/?PPN=GDZPPN001170007). ~~ ~~ BibItem { #Goldberg:float; bibitem-label:"[2]"} David Goldberg. _What Every Computer Scientist Should Know About Floating-point Arithmetic_. -ACM Computing Survey. vol. 23 (1), March 1991. doi: [10.1145/103162.103163](http://doi.org/10.1145/103162.103163). -[pdf](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.22.6768&rep=rep1&type=pdf). +ACM Computing Survey. vol. 23 (1), March 1991. doi: [10.1145/103162.103163](https://doi.org/10.1145/103162.103163). +[pdf](https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.22.6768&rep=rep1&type=pdf). ~~ ~~ BibItem { #Gustafson:posit; bibitem-label:"[3]"; searchterm:"Gustafson+John+Beating+floating+point+at+its+own+game+posit+arithmetic"; } John\ L. Gustafson and Isaac\ Yonemoto. _Beating Floating Point at its Own Game: Posit Arithmetic_. 2017. -[pdf](http://www.johngustafson.net/pdfs/BeatingFloatingPoint.pdf). +[pdf](https://www.johngustafson.net/pdfs/BeatingFloatingPoint.pdf). ~~ ~~ BibItem { #Hida:qd; bibitem-label:"[4]"; searchterm:"Hida+Quad-Double+Arithmetic:+Algorithms,+Implementation,+and+Application" } Yozo Hida,\ Xiaoye S.\ Li, and David\ H.\ Bailey. _Quad-Double Arithmetic: Algorithms, Implementation, and Application_. -Lawrence Berkeley National Laboratory Technical Report LBNL-46996. 2000. [pdf](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.5769). +Lawrence Berkeley National Laboratory Technical Report LBNL-46996. 2000. [pdf](https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.5769). ~~ ~~ BibItem { #Hida:qdlib; bibitem-label:"[5]"; searchterm:"Hida+Library+for+double-double+and+quad-double+arithmetic" } Yozo Hida,\ Xiaoye\ S.\ Li, and David\ H.\ Bailey. _Library for double-double and quad-double arithmetic._ -(2007). [pdf](http://www.jaist.ac.jp/~s1410018/papers/qd.pdf). +(2007). [pdf](https://www.jaist.ac.jp/~s1410018/papers/qd.pdf). ~~ ~~ Bibitem { #lin; bibitem-label:"[6]"; searchterm:'Linnainmaa+"Software+for+Doubled-Precision+Floating-Point+Computations"' } @@ -171,7 +171,7 @@ ~ [ddwiki]: https://en.wikipedia.org/wiki/Quadruple-precision_floating-point_format#Double-double_arithmetic -[qd]: http://crd-legacy.lbl.gov/~dhbailey/mpdist +[qd]: https://crd-legacy.lbl.gov/~dhbailey/mpdist \/ */ diff --git a/doc/std_num_ddouble.html b/doc/std_num_ddouble.html index b92445faf..cebf6c602 100644 --- a/doc/std_num_ddouble.html +++ b/doc/std_num_ddouble.html @@ -118,7 +118,7 @@

128-bit double-double floating point numbers.

to avoid magnifying rounding errors – in that case the result for IEEE 128-bit floats becomes:

128-bit ieee x : 3.14784204874900425235885265494550792210e-16
-

The implementation is based closely on the excellent QD C++ library [4, 5], +

The implementation is based closely on the excellent QD C++ library [4, 5], and assumes proper 64-bit IEEE float64std/core/types/float64: Vs with correct rounding. Integers can be represented precisely up to 30 decimal digits (and a bit more… up to 2106 - 2). @@ -128,20 +128,20 @@

128-bit double-double floating point numbers.

[1]T. Dekker. A Floating-Point Technique for Extending the Available Precision. Numerische Mathematik, vol. 18 (3), June 1971, 224–242. -pdf🔎
+pdf🔎
[2]David Goldberg. What Every Computer Scientist Should Know About Floating-point Arithmetic. -ACM Computing Survey. vol. 23 (1), March 1991. doi: 10.1145/103162.103163. -pdf🔎
+ACM Computing Survey. vol. 23 (1), March 1991. doi: 10.1145/103162.103163. +pdf🔎
[3]John L. Gustafson and Isaac Yonemoto. Beating Floating Point at its Own Game: Posit Arithmetic. 2017. -pdf🔎
+pdf🔎
[4]Yozo Hida, Xiaoye S. Li, and David H. Bailey. Quad-Double Arithmetic: Algorithms, Implementation, and Application. -Lawrence Berkeley National Laboratory Technical Report LBNL-46996. 2000. pdf🔎
+Lawrence Berkeley National Laboratory Technical Report LBNL-46996. 2000. pdf🔎
[5]Yozo Hida, Xiaoye S. Li, and David H. Bailey. Library for double-double and quad-double arithmetic. -(2007). pdf🔎
+(2007). pdf🔎
[6]Seppo Linnainmaa. Software for Doubled-Precision Floating-Point Computations. ACM Transactions on Mathematical Software (TOMS), vol. 7 (3), Sept. 1981, 272–283. 🔎
diff --git a/doc/std_num_float64-source.html b/doc/std_num_float64-source.html index 0cf28e4b3..be5652ae9 100644 --- a/doc/std_num_float64-source.html +++ b/doc/std_num_float64-source.html @@ -90,7 +90,7 @@ // Smallest positive normalized float64 value pub val flt-minstd/num/float64/flt-min: float64 = 0x1.0p-1022 // 2.22507385850720138309e-308 -// Smallest positive subnormal value (i.e. [``DBL_TRUE_MIN``](http://en.cppreference.com/w/cpp/types/climits)) +// Smallest positive subnormal value (i.e. [``DBL_TRUE_MIN``](https://en.cppreference.com/w/cpp/types/climits)) pub val flt-true-minstd/num/float64/flt-true-min: float64= 0x1.0p-1074 // 4.9406564584124654418e-324 // Machine epsilon: the difference between 1.0 and the next representable `:float64` value. @@ -495,7 +495,7 @@ // Linear interpolation, calculating `x + t*(y - x)` but avoids troublesome edge cases. -// Follows the C++20 [specification](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p0811r3.html). +// Follows the C++20 [specification](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p0811r3.html). // In particular, if `x.is-finite && y.is-finite`, then: // - exact: `lerp(x,y,0.0) == x` and `lerp(x,y,1.0) == y` // - monotonic: if `x <= y` and `t1 <= t2`, then `cmp( lerp(x,y,t1), lerp(x,y,t2) ) <= Eq` (and other cases) diff --git a/doc/std_num_float64.html b/doc/std_num_float64.html index f5c336e5a..ebd199bf8 100644 --- a/doc/std_num_float64.html +++ b/doc/std_num_float64.html @@ -254,7 +254,7 @@

64-bit IEEE floating point numbers.

-

Smallest positive subnormal value (i.e. DBL_TRUE_MIN). +

Smallest positive subnormal value (i.e. DBL_TRUE_MIN).

@@ -321,7 +321,7 @@

64-bit IEEE floating point numbers.

Linear interpolation, calculating x + t*(y - x) but avoids troublesome edge cases. - Follows the C++20 specification. + Follows the C++20 specification. In particular, if x.is-finitestd/num/float64/is-finite: (d : float64) -> bool && y.is-finitestd/num/float64/is-finite: (d : float64) -> bool, then: - exact: lerpstd/num/float64/lerp: (x : float64, y : float64, t : float64) -> float64(x,y,0.0) == x and lerpstd/num/float64/lerp: (x : float64, y : float64, t : float64) -> float64(x,y,1.0) == y - monotonic: if x <= y and t1 <= t2, then cmp( lerpstd/num/float64/lerp: (x : float64, y : float64, t : float64) -> float64(x,y,t1), lerpstd/num/float64/lerp: (x : float64, y : float64, t : float64) -> float64(x,y,t2) ) <= Eqstd/core/types/Eq: order (and other cases) diff --git a/doc/std_num_int32-source.html b/doc/std_num_int32-source.html index 48442d559..05d5bb197 100644 --- a/doc/std_num_int32-source.html +++ b/doc/std_num_int32-source.html @@ -438,7 +438,7 @@ Of course `(min-int32 + 1) / -1` is again positive (namely `max-int32`). See also _Division and modulus for computer scientists, Daan Leijen, 2001_ -[pdf](http://research.microsoft.com/pubs/151917/divmodnote.pdf) . +[pdf](https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/divmodnote-letter.pdf) . */ pub fip fun (/)std/num/int32/(/): (x : int32, y : int32) -> int32( xx: int32 : int32std/core/types/int32: V, yy: int32 : int32std/core/types/int32: V ) : int32std/core/types/int32: V if (yy: int32 ==std/num/int32/(==): (int32, int32) -> bool 0.int32std/core/int32: (i : int) -> int32) then returnreturn: int32 0.int32std/core/int32: (i : int) -> int32 diff --git a/doc/std_num_int32.html b/doc/std_num_int32.html index e1350eb76..22570ac1b 100644 --- a/doc/std_num_int32.html +++ b/doc/std_num_int32.html @@ -80,7 +80,7 @@

32-bit signed integers.

Of course (min-int32std/num/int32/min-int32: int32 + 1) / -1 is again positive (namely max-int32std/num/int32/max-int32: int32).

See also Division and modulus for computer scientists, Daan Leijen, 2001 -pdf . +pdf .

diff --git a/doc/std_num_int64-source.html b/doc/std_num_int64-source.html index 1b1f65881..81e58a32d 100644 --- a/doc/std_num_int64-source.html +++ b/doc/std_num_int64-source.html @@ -455,7 +455,7 @@ Of course `(min-int64 + 1) / -1` is again positive (namely `max-int64`). See also _Division and modulus for computer scientists, Daan Leijen, 2001_ -[pdf](http://research.microsoft.com/pubs/151917/divmodnote.pdf) . +[pdf](https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/divmodnote-letter.pdf) . */ pub fip fun (/)std/num/int64/(/): (x : int64, y : int64) -> int64( xx: int64 : int64std/core/types/int64: V, yy: int64 : int64std/core/types/int64: V ) : int64std/core/types/int64: V if yy: int64 ==std/num/int64/(==): (int64, int64) -> bool 0.int64std/core/int64: (i : int) -> int64 returnreturn: int64 0.int64std/core/int64: (i : int) -> int64 diff --git a/doc/std_num_int64.html b/doc/std_num_int64.html index 83acb5d2e..a1d6249ca 100644 --- a/doc/std_num_int64.html +++ b/doc/std_num_int64.html @@ -91,7 +91,7 @@

64-bit signed integers.

Of course (min-int64std/num/int64/min-int64: int64 + 1) / -1 is again positive (namely max-int64std/num/int64/max-int64: int64).

See also Division and modulus for computer scientists, Daan Leijen, 2001 -pdf . +pdf .

diff --git a/doc/std_num_random-source.html b/doc/std_num_random-source.html index bb93f0b40..0beb286d8 100644 --- a/doc/std_num_random-source.html +++ b/doc/std_num_random-source.html @@ -54,7 +54,7 @@ // of 2^32. It has a 96-bit state, so the average period is 2^127. // The chance of a cycle of less than 2^(32+max(96-k,0)) is 2^-(32+k), // (e.g. the chance of a cycle of less than 2^48 is 2^-80). -// <http://pracrand.sourceforge.net/RNG_engines.txt> +// <https://pracrand.sourceforge.net/RNG_engines.txt>
abstract value struct sfcstd/num/random/sfc: V(xstd/num/random/sfc/x: (sfc : sfc) -> int32:int32std/core/types/int32: V, ystd/num/random/sfc/y: (sfc : sfc) -> int32:int32std/core/types/int32: V, zstd/num/random/sfc/z: (sfc : sfc) -> int32:int32std/core/types/int32: V, cntstd/num/random/sfc/cnt: (sfc : sfc) -> int32:int32std/core/types/int32: V) pub value struct sfc-resultstd/num/random/sfc-result: V( rndstd/num/random/sfc-result/rnd: (sfc-result) -> int32 : int32std/core/types/int32: V, rstatestd/num/random/sfc-result/rstate: (sfc-result) -> sfc : sfcstd/num/random/sfc: V ) diff --git a/doc/std_num_random.html b/doc/std_num_random.html index 0ca4bf598..f832bfe48 100644 --- a/doc/std_num_random.html +++ b/doc/std_num_random.html @@ -39,7 +39,7 @@

http://​pracrand.​sourceforge.​net/​RNG_​engines.​txt. + https://​pracrand.​sourceforge.​net/​RNG_​engines.​txt.

diff --git a/doc/std_os_env-source.html b/doc/std_os_env-source.html index 429a111ed..4ecddadb7 100644 --- a/doc/std_os_env-source.html +++ b/doc/std_os_env-source.html @@ -81,12 +81,12 @@ xsxs: list<string> -> xsxs: list<string>.dropstd/core/list/drop: (xs : list<string>, n : int) -> ndet list<string>(1) // Return the main OS name: windows, linux, macos, unix, posix, ios, tvos, watchos, unknown. -// Sometimes has a _dash_ subsystem, like: unix-\<freebsd,openbsd,dragonfly,bsd\>, and windows-mingw. +// Sometimes has a _dash_ subsystem, like: unix-&lt;freebsd,openbsd,dragonfly,bsd&gt;, and windows-mingw. pub extern get-os-namestd/os/env/get-os-name: () -> ndet string() : ndetstd/core/types/ndet: X stringstd/core/types/string: V c "kk_os_name" js inline "$std_core.host()" -// Return the main processor architecture: x64, x86, arm64, arm, riscv32, riscv64, alpha, ppc64, etc. +// Return the main processor architecture: x64, x86, arm64, arm32, riscv32, riscv64, alpha64, ppc64, etc. pub extern get-cpu-archstd/os/env/get-cpu-arch: () -> ndet string() : ndetstd/core/types/ndet: X stringstd/core/types/string: V c "kk_cpu_arch" js inline "$std_core.host()" @@ -102,7 +102,7 @@ c "kk_compiler_version" js inline "\"2\"" -// The backend compiler name. +// The backend compiler name, like `gcc`, `clang`, `cl`, `clang-cl`, `mingw`, or `icc` (and `js` for JavaScript). pub extern get-cc-namestd/os/env/get-cc-name: () -> ndet string() : ndetstd/core/types/ndet: X stringstd/core/types/string: V c "kk_cc_name" js inline "\"js\"" @@ -118,15 +118,15 @@ // // Note: Usually this equals the `get-cpu-size-bits` and `get-cpu-pointer-bits` on modern cpu's // but they can differ on segmented architectures. -// For example, on the old x86 FAR-NEAR model, the addresses are 32-bit but the maximum object size is 16-bit. +// For example, on the old x86 FAR-NEAR model, the addresses are 32-bit but the integer register size is 16-bit. // Or on the more recent-[x32 ABI](https://en.wikipedia.org/wiki/X32_ABI) -// the addresses and objects are 32-bits but the architecture has 64-bit registers. +// the addresses and object sizes are 32-bits but the architecture has 64-bit integer registers. pub extern get-cpu-int-bitsstd/os/env/get-cpu-int-bits: () -> ndet int() : ndetstd/core/types/ndet: X intstd/core/types/int: V c inline "kk_integer_from_size_t(CHAR_BIT*sizeof(kk_intx_t),kk_context())" js inline "32" // Return the processor maximum object size in bits (`8*sizeof(size_t)`). This is usually -// equal to the `get-cpu-arch-bits` but may be different on segmented architectures. +// equal to the `get-cpu-int-bits` but may be different on segmented architectures. pub extern get-cpu-size-bitsstd/os/env/get-cpu-size-bits: () -> ndet int() : ndetstd/core/types/ndet: X intstd/core/types/int: V c inline "kk_integer_from_size_t(CHAR_BIT*sizeof(size_t),kk_context())" js inline "32" @@ -144,7 +144,8 @@ js inline "32" // Return the size of boxed values in the heap (`8*sizeof(kk_box_t)`). This is usually -// equal to `8*sizeof(void*)` but can be less if compressed pointers are used. +// equal to `8*sizeof(void*)` but can be less if compressed pointers are used (when +// compiled with `--target=c64c` for example). pub extern get-cpu-boxed-bitsstd/os/env/get-cpu-boxed-bits: () -> ndet int() : ndetstd/core/types/ndet: X intstd/core/types/int: V c inline "kk_integer_from_size_t(CHAR_BIT*sizeof(kk_intb_t),kk_context())" js inline "32" diff --git a/doc/std_os_env.html b/doc/std_os_env.html index 8ba7e9cf6..a43ec8526 100644 --- a/doc/std_os_env.html +++ b/doc/std_os_env.html @@ -46,7 +46,7 @@

Access to the program environment and commmand line argumen

-

The backend compiler name. +

The backend compiler name, like gcc, clang, cl, clang-cl, mingw, or icc (and js for JavaScript).

@@ -59,12 +59,13 @@

Access to the program environment and commmand line argumen

-

Return the main processor architecture: x64, x86, arm64, arm, riscv32, riscv64, alpha, ppc64, etc. +

Return the main processor architecture: x64, x86, arm64, arm32, riscv32, riscv64, alpha64, ppc64, etc.

Return the size of boxed values in the heap (8*sizeof(kk_box_t)). This is usually - equal to 8*sizeof(void*) but can be less if compressed pointers are used. + equal to 8*sizeof(void*) but can be less if compressed pointers are used (when + compiled with --target=c64c for example).

@@ -77,9 +78,9 @@

Access to the program environment and commmand line argumen
Note: Usually this equals the get-cpu-size-bitsstd/os/env/get-cpu-size-bits: () -> ndet int and get-cpu-pointer-bitsstd/os/env/get-cpu-pointer-bits: () -> ndet int on modern cpu's but they can differ on segmented architectures. - For example, on the old x86 FAR-NEAR model, the addresses are 32-bit but the maximum object size is 16-bit. + For example, on the old x86 FAR-NEAR model, the addresses are 32-bit but the integer register size is 16-bit. Or on the more recent-x32 ABI - the addresses and objects are 32-bits but the architecture has 64-bit registers. + the addresses and object sizes are 32-bits but the architecture has 64-bit integer registers.

@@ -94,7 +95,7 @@

Access to the program environment and commmand line argumen

Return the processor maximum object size in bits (8*sizeof(size_t)). This is usually - equal to the get-cpu-arch-bits but may be different on segmented architectures. + equal to the get-cpu-int-bitsstd/os/env/get-cpu-int-bits: () -> ndet int but may be different on segmented architectures.

@@ -103,7 +104,7 @@

Access to the program environment and commmand line argumen

Return the main OS name: windows, linux, macos, unix, posix, ios, tvos, watchos, unknown. - Sometimes has a dash subsystem, like: unix-, and windows-mingw. + Sometimes has a dash subsystem, like: unix-<freebsd,openbsd,dragonfly,bsd>, and windows-mingw.

diff --git a/doc/std_text_unicode-source.html b/doc/std_text_unicode-source.html index e79453d60..db6e6c12a 100644 --- a/doc/std_text_unicode-source.html +++ b/doc/std_text_unicode-source.html @@ -76,7 +76,7 @@ // Normalization //-------------------------------------------------------------- -// Type of unicode [normalization](http://www.unicode.org/reports/tr15) +// Type of unicode [normalization](https://www.unicode.org/reports/tr15) pub type normalizationstd/text/unicode/normalization: V { // Canonical composition (default). Use composed characters when possible. con NFCstd/text/unicode/NFC: normalization diff --git a/doc/std_text_unicode.html b/doc/std_text_unicode.html index fe45acfb6..6c01c498a 100644 --- a/doc/std_text_unicode.html +++ b/doc/std_text_unicode.html @@ -32,7 +32,7 @@

-

Type of unicode normalization. +

Type of unicode normalization.

con NFC

Canonical composition (default). Use composed characters when possible. diff --git a/doc/std_time_astro-source.html b/doc/std_time_astro-source.html index 86d429915..39461c3df 100644 --- a/doc/std_time_astro-source.html +++ b/doc/std_time_astro-source.html @@ -73,7 +73,7 @@ seconds in a coordinate reference frame at the gravitational center of the solar system. TCB and TCG are related by a coordinate transformation taking into account relativistic effects (see IAU 2000 resolution - [B1.5](http://syrte.obspm.fr/IAU_resolutions/Resol-UAIEng.ps)). In the + [B1.5](https://syrte.obspm.fr/IAU_resolutions/Resol-UAIEng.ps)). In the library, instead of transforming TCG, we compute TCB from (the approximated) TDB (`ts-tdb`) using the IAU 2006 resolution [B3][IAU-B3]:\ TDB = TCB - L~b~ &times; (JD~TCB~ - T~0~) &times; 86400 + TDB~0~, @@ -116,26 +116,26 @@ L.\ Fairhead and P.\ Bretagnon. _An analytical formula for the time transformation TB-TT_. Astronomy and Astrophysics, vol. 229, no. 1, March 1990, p. 240--247. -[ADS](http://articles.adsabs.harvard.edu/cgi-bin/nph-iarticle_query?1990A%26A...229..240F) +[ADS](https://articles.adsabs.harvard.edu/cgi-bin/nph-iarticle_query?1990A%26A...229..240F) ~~ ~~ BibItem { #Kaplan:circ; bibitem-label:"[2]"; searchterm:"Kaplan+The+IAU+Resolutions+on+Astronomical+Reference+Systems" } George H.\ Kaplan. _The IAU Resolutions on Astronomical Reference Systems, Time Scales, and Earth Rotation Models -- Explanation and Implementation_. -USNO Circular [179](http://aa.usno.navy.mil/pubations/docs/Circular_179.pdf) +USNO Circular [179](https://aa.usno.navy.mil/pubations/docs/Circular_179.pdf) ~~ ~~ BibItem { #Seidelmann:why; bibitem-label:"[3]"; searchterm:"Seidelmann+Fukushima+Why+new+time+scales" } P.K.\ Seidelmann and T.\ Fukushima. _Why new time scales?_ Astronomy and Astrophysics, vol. 265, no. 2, p. 833--838. -[ADS](http://adsabs.harvard.edu/full/1992A%26A...265..833S) +[ADS](https://adsabs.harvard.edu/full/1992A%26A...265..833S) ~~ ~ -[IAU-B3]: http://www.iau.org/static/resolutions/IAU2006_Resol3.pdf +[IAU-B3]: https://www.iau.org/static/resolutions/IAU2006_Resol3.pdf [IAU-IV]: https://www.iers.org/IERS/EN/Science/Recommendations/recommendation4.html?nn=12932 [IERS-2010]: https://www.iers.org/SharedDocs/Publikationen/EN/IERS/pubations/tn/TechnNote36/tn36.pdf?__blob=pubationFile&v=1 [TIpropose]: https://syrte.obspm.fr/journees2004/pdf/McCarthy2.pdf#page=4 @@ -371,7 +371,7 @@ // a different TCB time scale (using `ts-tdb-create`) you can use // this function to create a TCB time scale from it. It computes // TCB from the provided TDB using the IAU 2006 resolution -// [B3](http://www.iau.org/static/resolutions/IAU2006_Resol3.pdf):\ TDB = TCB - +// [B3](https://www.iau.org/static/resolutions/IAU2006_Resol3.pdf):\ TDB = TCB - // L~b~ &times; (JD~TCB~ - T~0~) &times; 86400 + TDB~0~, with T~0~ = // 2443144.5003725, L~b~ = 1.55051976772&times;10^-8^, TDB~0~ = // -6.55&times;10^-5^. diff --git a/doc/std_time_astro.html b/doc/std_time_astro.html index 327132509..ccf140952 100644 --- a/doc/std_time_astro.html +++ b/doc/std_time_astro.html @@ -80,9 +80,9 @@

Time scales for astronomy (TT, TCG, TDB, and TCB).

seconds in a coordinate reference frame at the gravitational center of the solar system. TCB and TCG are related by a coordinate transformation taking into account relativistic effects (see IAU 2000 resolution - B1.5). In the + B1.5). In the library, instead of transforming TCG, we compute TCB from (the - approximated) TDB (ts-tdbstd/time/astro/ts-tdb: timescale) using the IAU 2006 resolution B3:
+ approximated) TDB (ts-tdbstd/time/astro/ts-tdb: timescale) using the IAU 2006 resolution B3:
TDB = TCB - Lb × (JDTCB - T0) × 86400 + TDB0, with T0 = 2443144.5003725, Lb = 1.55051976772×10-8, TDB0 = -6.55×10-5. @@ -120,15 +120,15 @@

Time scales for astronomy (TT, TCG, TDB, and TCB).

[1]L. Fairhead and P. Bretagnon. An analytical formula for the time transformation TB-TT. Astronomy and Astrophysics, vol. 229, no. 1, March 1990, p. 240–247. -ADS 🔎
+ADS 🔎
[2]George H. Kaplan. The IAU Resolutions on Astronomical Reference Systems, Time Scales, and Earth Rotation Models – Explanation and Implementation. -USNO Circular 179 🔎
+USNO Circular 179 🔎
[3]P.K. Seidelmann and T. Fukushima. Why new time scales? Astronomy and Astrophysics, vol. 265, no. 2, p. 833–838. -ADS 🔎

+ADS 🔎

.

@@ -164,7 +164,7 @@

Time scales for astronomy (TT, TCG, TDB, and TCB).

a different TCB time scale (using ts-tdb-createstd/time/astro/ts-tdb-create: (tdb-minus-tt : (timestamp) -> timespan) -> timescale) you can use this function to create a TCB time scale from it. It computes TCB from the provided TDB using the IAU 2006 resolution - B3: TDB = TCB - + B3: TDB = TCB - Lb × (JDTCB - T0) × 86400 + TDB0, with T0 = 2443144.5003725, Lb = 1.55051976772×10-8, TDB0 = -6.55×10-5. diff --git a/doc/std_time_calendar-source.html b/doc/std_time_calendar-source.html index 6b6d35c81..8966f6312 100644 --- a/doc/std_time_calendar-source.html +++ b/doc/std_time_calendar-source.html @@ -455,7 +455,7 @@ // This is a proleptic Gregorian // calendar except that it uses the year 0 for 1 BCE, -1 for 2 BCE etc. // -// You can create an ISO 8601 UTC calendar using the latest IETF leap +// You can create an ISO 8601 UTC calendar using the latest IERS leap // second data using [`cal-utc-load`](std_time_download.html#cal_utc_load). pub fun cal-utc-createstd/time/calendar/cal-utc-create: (leaps : leaps-table) -> calendar( leapsleaps: leaps-table : leaps-tablestd/time/utc/leaps-table: V ) : calendarstd/time/calendar/calendar: V val ts-utcts-utc: timescale = ts-utc-createstd/time/utc/ts-utc-create: (leaps : leaps-table) -> timescale(leapsleaps: leaps-table) diff --git a/doc/std_time_calendar.html b/doc/std_time_calendar.html index 6a19be2b4..a43d6f37d 100644 --- a/doc/std_time_calendar.html +++ b/doc/std_time_calendar.html @@ -88,7 +88,7 @@

Calendars.

using UTC time (ts-utc-createstd/time/utc/ts-utc-create: (leaps : leaps-table) -> timescale) given a provide leap second table (leaps-tablestd/time/utc/leaps-table: V). This is a proleptic Gregorian calendar except that it uses the year 0 for 1 BCE, -1 for 2 BCE etc. -

You can create an ISO 8601 UTC calendar using the latest IETF leap +

You can create an ISO 8601 UTC calendar using the latest IERS leap second data using cal-utc-load.
diff --git a/doc/std_time_chrono-source.html b/doc/std_time_chrono-source.html index f13bad317..cba40628a 100644 --- a/doc/std_time_chrono-source.html +++ b/doc/std_time_chrono-source.html @@ -49,7 +49,7 @@ // // This uses the best available system clock for the requested // timescale. For example -// it uses [``CLOCK_UTC``](http://www.madore.org/~david/computers/unix-leap-seconds.html) +// it uses [``CLOCK_UTC``](https://www.madore.org/~david/computers/unix-leap-seconds.html) // when available to get proper UTC time, or ``CLOCK_TAI`` for TAI time. // // Otherwise, it usually uses Unix (POSIX) time (``CLOCK_REALTIME``). diff --git a/doc/std_time_chrono.html b/doc/std_time_chrono.html index d76037287..70ed4a3fe 100644 --- a/doc/std_time_chrono.html +++ b/doc/std_time_chrono.html @@ -34,7 +34,7 @@

CLOCK_UTC + it uses CLOCK_UTC when available to get proper UTC time, or CLOCK_TAI for TAI time.
Otherwise, it usually uses Unix (POSIX) time (CLOCK_REALTIME). diff --git a/doc/std_time_date-source.html b/doc/std_time_date-source.html index a7d2c9bd2..57b6ce00e 100644 --- a/doc/std_time_date-source.html +++ b/doc/std_time_date-source.html @@ -271,7 +271,7 @@ ----------------------------------------------------------------------------*/ -// Return the ISO calendar date of Easter in a given year (Algorithm by [J.M. Oudin](http://aa.usno.navy.mil/faq/docs/easter.php)). +// Return the ISO calendar date of Easter in a given year (Algorithm by [J.M. Oudin](https://aa.usno.navy.mil/faq/docs/easter.php)). pub fun easterstd/time/date/easter: (year : int) -> date( yearyear: int : intstd/core/types/int: V ) : datestd/time/date/date: V val cc: int = yearyear: int/std/core/int/(/): (x : int, y : int) -> int100 val nn: int = yearyear: int -std/core/int/(-): (x : int, y : int) -> int 19*std/core/int/(*): (int, int) -> int(yearyear: int/std/core/int/(/): (x : int, y : int) -> int19) diff --git a/doc/std_time_date.html b/doc/std_time_date.html index 1f8e8a59f..7a6a9a6f4 100644 --- a/doc/std_time_date.html +++ b/doc/std_time_date.html @@ -109,7 +109,7 @@

Date, clock, and week days support.

Compare two dates by fields.

-

Return the ISO calendar date of Easter in a given year (Algorithm by J.M. Oudin). +

Return the ISO calendar date of Easter in a given year (Algorithm by J.M. Oudin).

Show a date in ISO format. Datestd/time/date/Date: (year : int, month : int, day : int) -> date(2000,1,1).show == "2000-01-01". diff --git a/doc/std_time_format-source.html b/doc/std_time_format-source.html index 7722916a1..0ba32dcc4 100644 --- a/doc/std_time_format-source.html +++ b/doc/std_time_format-source.html @@ -216,7 +216,7 @@ * ``Z``: timezone offset in hours and minutes separated by a colon, use ``Z`` for UTC time. * ``ZZ``: timezone offset in hours and minutes separated by colon, use an empty string for UTC time. * ``x``: fractional seconds since `min-time`. (``63610768799.429``) -* ``YYYYYY``: the year in [ECMAscript](http://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.15.1) 6 digits, prepended with the sign. (``+002016``,``-000023``,``+000000``) +* ``YYYYYY``: the year in [ECMAscript](https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.15.1) 6 digits, prepended with the sign. (``+002016``,``-000023``,``+000000``) * ``y``: the absolute value of the year as a number (without zero padding). Useful when displaying Julian (`cal-julian`) negative years as ``10 BC`` for example (e.g. ``"y E"``). * ``C``, ``CC``: the short or long calendar name. (The short name is empty for the standard ISO calendars). @@ -253,7 +253,7 @@ formattedformatted: string ++std/core/string/(++): (x : string, y : string) -> string format-liststd/time/format/format-list: (t : time, fmt : list<char>, locale : time-locale) -> string(tt: time, unsafe-decreasingstd/core/types/unsafe-decreasing: (x : list<char>) -> list<char>(restrest: list<char>), localelocale: time-locale) -fun format-patstd/time/format/format-pat: (t : time, h : char, fmt : list<char>, locale : time-locale) -> (string, list<char>)( tt: time : timestd/time/time/time: V, hh: char : charstd/core/types/char: V, fmtfmt: list<char> : liststd/core/list: V -> V<charstd/core/types/char: V>, localelocale: time-locale : time-localestd/time/locale/time-locale: V ) : (std/core/types/tuple2: (V, V) -> Vstringstd/core/types/string: V,liststd/core/list: V -> V<charstd/core/types/char: V>) +fun format-patstd/time/format/format-pat: (t : time, h : char, fmt : list<char>, locale : time-locale) -> (string, list<char>)( tt: time : timestd/time/time/time: V, hh: char : charstd/core/types/char: V, fmtfmt: list<char> : liststd/core/list: V -> V<charstd/core/types/char: V>, localelocale: time-locale : time-localestd/time/locale/time-locale: V ) : (std/core/types/tuple2: (V, V) -> Vstringstd/core/types/string: V,liststd/core/list: V -> V<charstd/core/types/char: V>) if hh: char==std/core/char/(==): (char, char) -> bool'"' ||std/core/types/(||): (x : bool, y : bool) -> bool hh: char==std/core/char/(==): (char, char) -> bool'\'' then // extract escaped part val (std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b)quotedquoted: list<char>,endend: list<char>)std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b) = fmtfmt: list<char>.spanstd/core/span: (xs : list<char>, predicate : (char) -> bool) -> (list<char>, list<char>)( fnfn: (c : char) -> bool(cc: char){ cc: char!=std/core/char/(!=): (char, char) -> boolhh: char } ) @@ -264,11 +264,11 @@ // match pattern val (std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b)hshs: list<char>,restrest: list<char>)std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b) = fmtfmt: list<char>.spanstd/core/span: (xs : list<char>, predicate : (char) -> bool) -> (list<char>, list<char>)(fnfn: (c : char) -> bool(cc: char){cc: char==std/core/char/(==): (char, char) -> boolhh: char}) val nn: int = hshs: list<char>.lengthstd/core/list/length: (xs : list<char>) -> int +std/core/int/(+): (x : int, y : int) -> int 1 - formatsstd/time/format/formats: list<(char, int, (time, int, time-locale) -> string)>.foreach-whilestd/core/foreach-while: (xs : list<(char, int, (time, int, time-locale) -> string)>, action : ((char, int, (time, int, time-locale) -> string)) -> maybe<(string, list<char>)>) -> maybe<(string, list<char>)> fnfn: (pattern : (char, int, (time, int, time-locale) -> string)) -> maybe<(string, list<char>)>(patternpattern: (char, int, (time, int, time-locale) -> string)) + formatsstd/time/format/formats: list<(char, int, (time, int, time-locale) -> string)>.foreach-whilestd/core/foreach-while: (xs : list<(char, int, (time, int, time-locale) -> string)>, action : ((char, int, (time, int, time-locale) -> string)) -> maybe<(string, list<char>)>) -> maybe<(string, list<char>)> fnfn: (pattern : (char, int, (time, int, time-locale) -> string)) -> maybe<(string, list<char>)>(patternpattern: (char, int, (time, int, time-locale) -> string)) val (std/core/types/Tuple3: forall<a,b,c> (fst : a, snd : b, thd : c) -> (a, b, c)cc: char,mm: int,ff: (time, int, time-locale) -> string)std/core/types/Tuple3: forall<a,b,c> (fst : a, snd : b, thd : c) -> (a, b, c) = patternpattern: (char, int, (time, int, time-locale) -> string) if cc: char!=std/core/char/(!=): (char, char) -> boolhh: char then Nothingstd/core/types/Nothing: forall<a> maybe<a> else Juststd/core/types/Just: forall<a> (value : a) -> maybe<a>((std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b)ff: (time, int, time-locale) -> string(tt: time,minstd/core/min: (i : int, j : int) -> int(nn: int,mm: int),localelocale: time-locale), restrest: list<char>)std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b)) .defaultstd/core/default: (m : maybe<(string, list<char>)>, nothing : (string, list<char>)) -> (string, list<char>)( (std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b)"",restrest: list<char>)std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b) ) // ignore if no match - else + else (std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b)hh: char.stringstd/core/char/string: (c : char) -> string,fmtfmt: list<char>)std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b) // return as-is /* diff --git a/doc/std_time_format.html b/doc/std_time_format.html index 18476737d..d17b434f5 100644 --- a/doc/std_time_format.html +++ b/doc/std_time_format.html @@ -84,7 +84,7 @@

x: fractional seconds since min-time. (63610768799.429) -
  • YYYYYY: the year in ECMAscript 6 digits, prepended with the sign. (+002016,-000023,+000000) +
  • YYYYYY: the year in ECMAscript 6 digits, prepended with the sign. (+002016,-000023,+000000)
  • y: the absolute value of the year as a number (without zero padding). Useful when displaying Julian (cal-julian) negative years as 10 BC for example (e.g. "y E"). diff --git a/doc/std_time_utc-source.html b/doc/std_time_utc-source.html index 0e3482b61..464478d9d 100644 --- a/doc/std_time_utc-source.html +++ b/doc/std_time_utc-source.html @@ -46,8 +46,8 @@ The occurrence of leap seconds cannot be reliably predicted though and the IERS -usually [announces](https://www.iers.org/SharedDocs/News/EN/BulletinC.html) -leap seconds about half a year in advance. The [IETF leap second][ietfl] +usually [announces](https://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat) +leap seconds about half a year in advance. The [IERS leap second][iersl] table contains a list of all currently announced leap seconds. _As such, any future duration calculation in UTC is essentially non-deterministic since it may be off by a number of (as yet unannounced) leap seconds_. This means @@ -156,7 +156,7 @@ ~ Begin TableFigure { #tab-utc; caption:"Leap second time steps since 1958. The function \ &Delta;(_date_) returns the number of days since _date_. Entries after \ - 1972 are based on [IETF data][ietfl]. The entries before 1972 are \ + 1972 are based on [IERS data][iersl]. The entries before 1972 are \ derived from the _Explanatory Supplement to the Astronomical Almanac_, by \ P. Kenneth Seidelmann [@Almanac, pages [86--87][astroa]]. Entries before 1961 are based on the \ time steps broadcast by the NIST [WWV] radio station."} @@ -274,7 +274,7 @@ [^fn-taiepoch]: The difference TAI-UT2 was supposed to be zero on 1958-01-01Z TAI but different observatories used their own versions of UT2 leading to longitude errors of a "few 0.01s" [@taiepoch]. At 1958-01-01 TAI the &Delta;T = TT - UT1 was 31.166s &plusmn; 0.003s - (see [historical &Delta;T](http://maia.usno.navy.mil/ser7/historic_deltat.data)), + (see [historical &Delta;T](https://maia.usno.navy.mil/ser7/historic_deltat.data)), which equals 1958-01-01T00:00:00.018 UT1 time. When we calculate UT2 using the current definition [@Almanac, page 85]: @@ -286,11 +286,11 @@ we get 1958-01-01T00:00:00.013023922Z UT2. A difference of about 0.013s with TAI. -[ietfl]: https://www.ietf.org/timezones/data/leap-seconds.list -[dat]: http://maia.usno.navy.mil/ser7/tai-utc.dat +[iersl]: https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list +[dat]: https://maia.usno.navy.mil/ser7/tai-utc.dat [astroa]: https://books.google.com/books?id=uJ4JhGJANb4C&lpg=PA87&vq=wwv&pg=PA87#v=onepage&q=wwv&f=false [utchistory]: https://syrte.obspm.fr/journees2004/pdf/Arias2.pdf -[taiepoch]:http://articles.adsabs.harvard.edu/cgi-bin/nph-iarticle_query?2000ASPC..208..175G&amp;data_type=PDF_HIGH&amp;whole_paper=YES&amp;type=PRINTER&amp;filetype=.pdf +[taiepoch]:https://articles.adsabs.harvard.edu/cgi-bin/nph-iarticle_query?2000ASPC..208..175G&amp;data_type=PDF_HIGH&amp;whole_paper=YES&amp;type=PRINTER&amp;filetype=.pdf [WWV]: https://www.nist.gov/time-and-frequency-services/nist-radio-stations/wwv [UTC]: std_time_astro.html [TAI]: std_time_astro.html @@ -352,7 +352,7 @@ 1973-01-01T00:00:00Z ```` -This works well for systems that support [``CLOCK_UTC``](http://www.madore.org/~david/computers/unix-leap-seconds.html). +This works well for systems that support [``CLOCK_UTC``](https://www.madore.org/~david/computers/unix-leap-seconds.html). */ pub fun float64/unix-instantstd/time/utc/float64/unix-instant: (u : float64, frac : ? float64, ts : ? timescale) -> instant( uu: float64 : float64std/core/types/float64: V, fracfrac: ? float64 : float64std/core/types/optional: V -> V = 0.0, tsts: ? timescale : timescalestd/core/types/optional: V -> V = ts-tistd/time/utc/ts-ti: timescale ) : instantstd/time/instant/instant: V val tt: timespan = timespanstd/time/timestamp/tuple64/timespan: (secs : float64, frac : float64) -> timespan(uu: float64,fracfrac: float64.fractionstd/num/float64/fraction: (d : float64) -> float64) @@ -476,7 +476,7 @@ // with leap seconds while still being quite precise. // See also: <https://www.cl.cam.ac.uk/~mgk25/time/utc-sls>. // -// You can create a UTC-SLS time scale based on the latest IETF leap second +// You can create a UTC-SLS time scale based on the latest IERS leap second // data using [`cal-utc-sls-load`](std_time_download.html#cal_utc_sls_load). pub fun ts-utc-sls-createstd/time/utc/ts-utc-sls-create: (leaps : leaps-table) -> timescale( leapsleaps: leaps-table : leaps-tablestd/time/utc/leaps-table: V ) : timescalestd/time/instant/timescale: V utc-sls-timescalestd/time/utc/utc-sls-timescale: (name : string, leaps : leaps-table, smooth : ? timespan) -> timescale( "UTC-SLS", leapsleaps: leaps-table ) @@ -711,7 +711,7 @@ // Default TI leaps table has leap second information up to the compiler release (currently `leaps-table-y2017`). pub val leaps-table-tistd/time/utc/leaps-table-ti: leaps-table : leaps-tablestd/time/utc/leaps-table: V = - val post72post72: leaps-table = parse-leap-secondsstd/time/utc/parse-leap-seconds: (leaps : string) -> leaps-table( default-ietf-leap-secondsstd/time/utc/default-ietf-leap-seconds: string ) + val post72post72: leaps-table = parse-leap-secondsstd/time/utc/parse-leap-seconds: (leaps : string) -> leaps-table( default-iers-leap-secondsstd/time/utc/default-iers-leap-seconds: string ) post72post72: leaps-table.extendstd/time/utc/extend: (leap1 : leaps-table, leap2 : leaps-table) -> leaps-table(leaps-table-pre1972std/time/utc/leaps-table-pre1972: leaps-table) // Leap second table up to 2017-01-01Z. @@ -742,7 +742,7 @@ // Parsing UTC leap second tables // ----------------------------------------------------------- -// Parse a leap second table from text `leaps` in the [IETF leap second](https://www.ietf.org/timezones/data/leap-seconds.list) +// Parse a leap second table from text `leaps` in the [IERS leap second][iersl] // file format. pub fun parse-leap-secondsstd/time/utc/parse-leap-seconds: (leaps : string) -> leaps-table( leapsleaps: string : stringstd/core/types/string: V ) : leaps-tablestd/time/utc/leaps-table: V @@ -780,9 +780,8 @@ val rxleap = regex(r"^[ \t]*(\d+)[ \t]+(\d+)[ \t]*(?:#.*)?$",multiLine=True) */ -// IETF leap second data valid until 2017-06-28 -val default-ietf-leap-secondsstd/time/utc/default-ietf-leap-seconds: string = "\n # From: https://www.ietf.org/timezones/data/leap-seconds.list\n # Updated through IERS Bulletin C52\n # File expires on: 28 June 2017\n #\n #@ 3707596800\n #\n 2272060800 10 # 1 Jan 1972\n 2287785600 11 # 1 Jul 1972\n 2303683200 12 # 1 Jan 1973\n 2335219200 13 # 1 Jan 1974\n 2366755200 14 # 1 Jan 1975\n 2398291200 15 # 1 Jan 1976\n 2429913600 16 # 1 Jan 1977\n 2461449600 17 # 1 Jan 1978\n 2492985600 18 # 1 Jan 1979\n 2524521600 19 # 1 Jan 1980\n 2571782400 20 # 1 Jul 1981\n 2603318400 21 # 1 Jul 1982\n 2634854400 22 # 1 Jul 1983\n 2698012800 23 # 1 Jul 1985\n 2776982400 24 # 1 Jan 1988\n 2840140800 25 # 1 Jan 1990\n 2871676800 26 # 1 Jan 1991\n 2918937600 27 # 1 Jul 1992\n 2950473600 28 # 1 Jul 1993\n 2982009600 29 # 1 Jul 1994\n 3029443200 30 # 1 Jan 1996\n 3076704000 31 # 1 Jul 1997\n 3124137600 32 # 1 Jan 1999\n 3345062400 33 # 1 Jan 2006\n 3439756800 34 # 1 Jan 2009\n 3550089600 35 # 1 Jul 2012\n 3644697600 36 # 1 Jul 2015\n 3692217600 37 # 1 Jan 2017" - // 3723753600 35 # 1 Jan 2018" //testing negative 2 seconds +// IERS leap second data valid until 2024-12-28 +val default-iers-leap-secondsstd/time/utc/default-iers-leap-seconds: string = "\n # From: https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list\n #\tUpdated through IERS Bulletin C (https://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat)\n # File expires on: 28 December 2024\n #\n #@\t3944332800\n #\n 2272060800 10 # 1 Jan 1972\n 2287785600 11 # 1 Jul 1972\n 2303683200 12 # 1 Jan 1973\n 2335219200 13 # 1 Jan 1974\n 2366755200 14 # 1 Jan 1975\n 2398291200 15 # 1 Jan 1976\n 2429913600 16 # 1 Jan 1977\n 2461449600 17 # 1 Jan 1978\n 2492985600 18 # 1 Jan 1979\n 2524521600 19 # 1 Jan 1980\n 2571782400 20 # 1 Jul 1981\n 2603318400 21 # 1 Jul 1982\n 2634854400 22 # 1 Jul 1983\n 2698012800 23 # 1 Jul 1985\n 2776982400 24 # 1 Jan 1988\n 2840140800 25 # 1 Jan 1990\n 2871676800 26 # 1 Jan 1991\n 2918937600 27 # 1 Jul 1992\n 2950473600 28 # 1 Jul 1993\n 2982009600 29 # 1 Jul 1994\n 3029443200 30 # 1 Jan 1996\n 3076704000 31 # 1 Jul 1997\n 3124137600 32 # 1 Jan 1999\n 3345062400 33 # 1 Jan 2006\n 3439756800 34 # 1 Jan 2009\n 3550089600 35 # 1 Jul 2012\n 3644697600 36 # 1 Jul 2015\n 3692217600 37 # 1 Jan 2017\n // 3723753600 35 # 1 Jan 2018" //testing negative 2 seconds // ----------------------------------------------------------- // Parsing TAI 'continuous' leap second tables from before 1972 @@ -792,7 +791,7 @@ val mjd-epoch-shiftstd/time/utc/mjd-epoch-shift: timespan = 51544.timespanstd/time/timestamp/int/timespan: (seconds : int, frac : ? float64) -> timespan // 2000-01-01Z - 1858-11-17Z modified julian date epoch // Parse the standard UTC leap second adjustment file in the "old" .dat format as -// in <http://maia.usno.navy.mil/ser7/tai-utc.dat>, where entries have the shape +// in <https://maia.usno.navy.mil/ser7/tai-utc.dat>, where entries have the shape // ```` // 1961 JAN 1 =JD 2437300.5 TAI-UTC= 1.4228180 S + (MJD - 37300.) X 0.001296 S // ```` @@ -800,7 +799,7 @@ // (`1.4228180`s), and the drift, starting at `37300` MJD of 0.001296s per day. // Lines that start with ``#`` are comments. As an extension you can have an // expiration date on a line that starts with ``#@`` followed by seconds since -// the NTP epoch (1900-01-01). Just as in a standard IETF leap second file. +// the NTP epoch (1900-01-01). Just as in a standard IERS leap second file. pub fun parse-leap-seconds-datstd/time/utc/parse-leap-seconds-dat: (leaps : string) -> leaps-table( leapsleaps: string : stringstd/core/types/string: V ) : leaps-tablestd/time/utc/leaps-table: V val adjustsadjusts: list<leap-adjust> = leapsleaps: string.linesstd/core/lines: (s : string) -> list<string>.flatmap-maybestd/core/flatmap-maybe: (xs : list<string>, f : (string) -> maybe<leap-adjust>) -> list<leap-adjust>(parse-taiadjuststd/time/utc/parse-taiadjust: (line : string) -> maybe<leap-adjust>).reversestd/core/reverse: (xs : list<leap-adjust>) -> list<leap-adjust> val expireexpire: instant = parse-leap-expirestd/time/utc/parse-leap-expire: (leaps : string, adjusts : list<leap-adjust>) -> instant(leapsleaps: string,adjustsadjusts: list<leap-adjust>) @@ -859,7 +858,7 @@ // change it to -85e-10 to end up with TAI-UTC == 0 at 1958-01-01. // (without a rate change it is a negative -0.0472380s). // Note the JD dates are at 0.29167 as the time steps were usually at 19:00h instead of midnight. -val default-leap-seconds-pre72std/time/utc/default-leap-seconds-pre72: string = "\n # from: Explanatory Supplement to the Astronomical Almanac, 1992 edition, pages 86--87.\n 1958 JAN 1 =JD 2436204.5 TAI-UTC= 0.0 S + (MJD - 36204.) X 0.00073458 S\n 1958 JAN 15 =JD 2436219.29167 TAI-UTC= 0.02 S + (MJD - 36204.) X 0.00073458 S\n 1958 FEB 5 =JD 2436240.29167 TAI-UTC= 0.04 S + (MJD - 36204.) X 0.00073458 S\n 1958 FEB 19 =JD 2436254.29167 TAI-UTC= 0.06 S + (MJD - 36204.) X 0.00073458 S\n 1958 APR 9 =JD 2436303.29167 TAI-UTC= 0.08 S + (MJD - 36204.) X 0.00073458 S\n 1958 JUN 11 =JD 2436366.29167 TAI-UTC= 0.10 S + (MJD - 36204.) X 0.00073458 S\n 1958 JUL 2 =JD 2436387.29167 TAI-UTC= 0.12 S + (MJD - 36204.) X 0.00073458 S\n 1958 JUL 16 =JD 2436401.29167 TAI-UTC= 0.14 S + (MJD - 36204.) X 0.00073458 S\n 1958 OCT 22 =JD 2436499.29167 TAI-UTC= 0.16 S + (MJD - 36204.) X 0.00073458 S\n 1958 NOV 26 =JD 2436534.29167 TAI-UTC= 0.18 S + (MJD - 36204.) X 0.00073458 S\n 1958 DEC 24 =JD 2436562.29167 TAI-UTC= 0.20 S + (MJD - 36204.) X 0.00073458 S\n\n 1959 JAN 1 =JD 2436569.5 TAI-UTC= 0.4681220 S + (MJD - 36569.) X 0.000864 S\n 1959 JAN 28 =JD 2436597.29167 TAI-UTC= 0.4881220 S + (MJD - 36569.) X 0.000864 S\n 1959 FEB 25 =JD 2436625.29167 TAI-UTC= 0.5081220 S + (MJD - 36569.) X 0.000864 S\n 1959 APR 5 =JD 2436664.29167 TAI-UTC= 0.5281220 S + (MJD - 36569.) X 0.000864 S\n 1959 AUG 26 =JD 2436807.29167 TAI-UTC= 0.5481220 S + (MJD - 36569.) X 0.000864 S\n 1959 SEP 30 =JD 2436842.29167 TAI-UTC= 0.5681220 S + (MJD - 36569.) X 0.000864 S\n 1959 NOV 4 =JD 2436877.29167 TAI-UTC= 0.5881220 S + (MJD - 36569.) X 0.000864 S\n 1959 NOV 18 =JD 2436891.29167 TAI-UTC= 0.6081220 S + (MJD - 36569.) X 0.000864 S\n 1959 DEC 16 =JD 2436919.29167 TAI-UTC= 0.6281220 S + (MJD - 36569.) X 0.000864 S\n 1960 JAN 1 =JD 2436934.5 TAI-UTC= 0.9434820 S + (MJD - 36934.) X 0.001296 S\n\n # from: http://maia.usno.navy.mil/ser7/tai-utc.dat\n 1961 JAN 1 =JD 2437300.5 TAI-UTC= 1.4228180 S + (MJD - 37300.) X 0.001296 S\n 1961 AUG 1 =JD 2437512.5 TAI-UTC= 1.3728180 S + (MJD - 37300.) X 0.001296 S\n 1962 JAN 1 =JD 2437665.5 TAI-UTC= 1.8458580 S + (MJD - 37665.) X 0.0011232S\n 1963 NOV 1 =JD 2438334.5 TAI-UTC= 1.9458580 S + (MJD - 37665.) X 0.0011232S\n 1964 JAN 1 =JD 2438395.5 TAI-UTC= 3.2401300 S + (MJD - 38761.) X 0.001296 S\n 1964 APR 1 =JD 2438486.5 TAI-UTC= 3.3401300 S + (MJD - 38761.) X 0.001296 S\n 1964 SEP 1 =JD 2438639.5 TAI-UTC= 3.4401300 S + (MJD - 38761.) X 0.001296 S\n 1965 JAN 1 =JD 2438761.5 TAI-UTC= 3.5401300 S + (MJD - 38761.) X 0.001296 S\n 1965 MAR 1 =JD 2438820.5 TAI-UTC= 3.6401300 S + (MJD - 38761.) X 0.001296 S\n 1965 JUL 1 =JD 2438942.5 TAI-UTC= 3.7401300 S + (MJD - 38761.) X 0.001296 S\n 1965 SEP 1 =JD 2439004.5 TAI-UTC= 3.8401300 S + (MJD - 38761.) X 0.001296 S\n 1966 JAN 1 =JD 2439126.5 TAI-UTC= 4.3131700 S + (MJD - 39126.) X 0.002592 S\n 1968 FEB 1 =JD 2439887.5 TAI-UTC= 4.2131700 S + (MJD - 39126.) X 0.002592 S" +val default-leap-seconds-pre72std/time/utc/default-leap-seconds-pre72: string = "\n # from: Explanatory Supplement to the Astronomical Almanac, 1992 edition, pages 86--87.\n 1958 JAN 1 =JD 2436204.5 TAI-UTC= 0.0 S + (MJD - 36204.) X 0.00073458 S\n 1958 JAN 15 =JD 2436219.29167 TAI-UTC= 0.02 S + (MJD - 36204.) X 0.00073458 S\n 1958 FEB 5 =JD 2436240.29167 TAI-UTC= 0.04 S + (MJD - 36204.) X 0.00073458 S\n 1958 FEB 19 =JD 2436254.29167 TAI-UTC= 0.06 S + (MJD - 36204.) X 0.00073458 S\n 1958 APR 9 =JD 2436303.29167 TAI-UTC= 0.08 S + (MJD - 36204.) X 0.00073458 S\n 1958 JUN 11 =JD 2436366.29167 TAI-UTC= 0.10 S + (MJD - 36204.) X 0.00073458 S\n 1958 JUL 2 =JD 2436387.29167 TAI-UTC= 0.12 S + (MJD - 36204.) X 0.00073458 S\n 1958 JUL 16 =JD 2436401.29167 TAI-UTC= 0.14 S + (MJD - 36204.) X 0.00073458 S\n 1958 OCT 22 =JD 2436499.29167 TAI-UTC= 0.16 S + (MJD - 36204.) X 0.00073458 S\n 1958 NOV 26 =JD 2436534.29167 TAI-UTC= 0.18 S + (MJD - 36204.) X 0.00073458 S\n 1958 DEC 24 =JD 2436562.29167 TAI-UTC= 0.20 S + (MJD - 36204.) X 0.00073458 S\n\n 1959 JAN 1 =JD 2436569.5 TAI-UTC= 0.4681220 S + (MJD - 36569.) X 0.000864 S\n 1959 JAN 28 =JD 2436597.29167 TAI-UTC= 0.4881220 S + (MJD - 36569.) X 0.000864 S\n 1959 FEB 25 =JD 2436625.29167 TAI-UTC= 0.5081220 S + (MJD - 36569.) X 0.000864 S\n 1959 APR 5 =JD 2436664.29167 TAI-UTC= 0.5281220 S + (MJD - 36569.) X 0.000864 S\n 1959 AUG 26 =JD 2436807.29167 TAI-UTC= 0.5481220 S + (MJD - 36569.) X 0.000864 S\n 1959 SEP 30 =JD 2436842.29167 TAI-UTC= 0.5681220 S + (MJD - 36569.) X 0.000864 S\n 1959 NOV 4 =JD 2436877.29167 TAI-UTC= 0.5881220 S + (MJD - 36569.) X 0.000864 S\n 1959 NOV 18 =JD 2436891.29167 TAI-UTC= 0.6081220 S + (MJD - 36569.) X 0.000864 S\n 1959 DEC 16 =JD 2436919.29167 TAI-UTC= 0.6281220 S + (MJD - 36569.) X 0.000864 S\n 1960 JAN 1 =JD 2436934.5 TAI-UTC= 0.9434820 S + (MJD - 36934.) X 0.001296 S\n\n # from: https://maia.usno.navy.mil/ser7/tai-utc.dat\n 1961 JAN 1 =JD 2437300.5 TAI-UTC= 1.4228180 S + (MJD - 37300.) X 0.001296 S\n 1961 AUG 1 =JD 2437512.5 TAI-UTC= 1.3728180 S + (MJD - 37300.) X 0.001296 S\n 1962 JAN 1 =JD 2437665.5 TAI-UTC= 1.8458580 S + (MJD - 37665.) X 0.0011232S\n 1963 NOV 1 =JD 2438334.5 TAI-UTC= 1.9458580 S + (MJD - 37665.) X 0.0011232S\n 1964 JAN 1 =JD 2438395.5 TAI-UTC= 3.2401300 S + (MJD - 38761.) X 0.001296 S\n 1964 APR 1 =JD 2438486.5 TAI-UTC= 3.3401300 S + (MJD - 38761.) X 0.001296 S\n 1964 SEP 1 =JD 2438639.5 TAI-UTC= 3.4401300 S + (MJD - 38761.) X 0.001296 S\n 1965 JAN 1 =JD 2438761.5 TAI-UTC= 3.5401300 S + (MJD - 38761.) X 0.001296 S\n 1965 MAR 1 =JD 2438820.5 TAI-UTC= 3.6401300 S + (MJD - 38761.) X 0.001296 S\n 1965 JUL 1 =JD 2438942.5 TAI-UTC= 3.7401300 S + (MJD - 38761.) X 0.001296 S\n 1965 SEP 1 =JD 2439004.5 TAI-UTC= 3.8401300 S + (MJD - 38761.) X 0.001296 S\n 1966 JAN 1 =JD 2439126.5 TAI-UTC= 4.3131700 S + (MJD - 39126.) X 0.002592 S\n 1968 FEB 1 =JD 2439887.5 TAI-UTC= 4.2131700 S + (MJD - 39126.) X 0.002592 S" /* fun parse-leap-expire( leaps : string, adjusts : list<leap-adjust>) : instant diff --git a/doc/std_time_utc.html b/doc/std_time_utc.html index 49e4aea7c..2086efccf 100644 --- a/doc/std_time_utc.html +++ b/doc/std_time_utc.html @@ -48,8 +48,8 @@

    The occurrence of leap seconds cannot be reliably predicted though and the IERS -usually announces -leap seconds about half a year in advance. The IETF leap second +usually announces +leap seconds about half a year in advance. The IERS leap second table contains a list of all currently announced leap seconds. As such, any future duration calculation in UTC is essentially non-deterministic since it may be off by a number of (as yet unannounced) leap seconds. This means @@ -99,8 +99,8 @@

    date. Therefore, the difference started as 2.6972788s (as there were 669 days between 1962-01-01 and 1963-11-01) and increased linearly up to 2.7657940s on 1964-01-01Z. For dates between 1961-01-01Z and 1972-01-01Z -the library calculates the UTC time based on the historical USNO -drift data (see Table 1). +the library calculates the UTC time based on the historical USNO +drift data (see Table 1).

    Here are some interesting time steps that occurred in this time frame:

    @@ -170,7 +170,7 @@

    showing the seconds at 60 just before 19:00h.

    1.4. All historical leap second adjustments

    -

    Table 1 shows all leap second time steps from 1958 up to 2017. This table +

    Table 1 shows all leap second time steps from 1958 up to 2017. This table is calculated and uses historical data for time steps before 1972.

    @@ -246,7 +246,7 @@


    -
    Table 1. Leap second time steps since 1958. The function Δ(date) returns the number of days since date. Entries after 1972 are based on IETF data. The entries before 1972 are derived from the Explanatory Supplement to the Astronomical Almanac, by P. Kenneth Seidelmann [2, pages 86–87]. Entries before 1961 are based on the time steps broadcast by the NIST WWV radio station.

    +
    Table 1. Leap second time steps since 1958. The function Δ(date) returns the number of days since date. Entries after 1972 are based on IERS data. The entries before 1972 are derived from the Explanatory Supplement to the Astronomical Almanac, by P. Kenneth Seidelmann [2, pages 86–87]. Entries before 1961 are based on the time steps broadcast by the NIST WWV radio station.

    – Daan Leijen, 2016.

    References

    @@ -263,7 +263,7 @@

    pdf 🔎

    +pdf 🔎
  • [4]Jay Lieske. Precession Matrix Based on IAU (1976). System of Astronomical Constants, Astronomy & Astrophysics, Vol. 73, pages 282–284. 1979. @@ -293,14 +293,14 @@

    Parse the standard UTC leap second adjustment file in the “old” .dat format as - in http://​maia.​usno.​navy.​mil/​ser7/​tai-​utc.​dat, where entries have the shape + in https://​maia.​usno.​navy.​mil/​ser7/​tai-​utc.​dat, where entries have the shape

       1961 JAN  1 =JD 2437300.5  TAI-UTC=   1.4228180 S + (MJD - 37300.) X 0.001296 S

    which specifies the start time (jdstd/time/instant/jd: (i : instant, ts : timescale) -> ddouble 2437300.5), new TAI-UTC offset (1.4228180s), and the drift, starting at 37300 MJD of 0.001296s per day. Lines that start with # are comments. As an extension you can have an expiration date on a line that starts with #@ followed by seconds since - the NTP epoch (1900-01-01). Just as in a standard IETF leap second file. + the NTP epoch (1900-01-01). Just as in a standard IERS leap second file.

     NTP time scale is equal @@ -326,7 +326,7 @@

    https://​www.​cl.​cam.​ac.​uk/​~mgk25/​time/​utc-​sls.
    - You can create a UTC-SLS time scale based on the latest IETF leap second + You can create a UTC-SLS time scale based on the latest IERS leap second data using cal-utc-sls-load.

    @@ -372,7 +372,7 @@

    -

    This works well for systems that support CLOCK_UTC. +

    This works well for systems that support CLOCK_UTC.

    @@ -453,7 +453,7 @@

    1.The difference TAI-UT2 was supposed to be zero on 1958-01-01Z TAI but different observatories used their own versions of UT2 leading to longitude errors of a “few 0.01s” [3]. At 1958-01-01 TAI the ΔT = TT - UT1 was 31.166s ± 0.003s -(see historical ΔT), +(see historical ΔT), which equals 1958-01-01T00:00:00.018 UT1 time. When we calculate UT2 using the current definition [2, page 85]: