Skip to content

Commit

Permalink
update links
Browse files Browse the repository at this point in the history
  • Loading branch information
daanx committed Jan 15, 2024
1 parent c753dc2 commit 51f3b75
Show file tree
Hide file tree
Showing 29 changed files with 96 additions and 95 deletions.
2 changes: 1 addition & 1 deletion doc/book.html
Original file line number Diff line number Diff line change
Expand Up @@ -1194,7 +1194,7 @@
<div class="titleblock align-center para-block" style="text-align:center;line-adjust:0">
<div class="titleheader align-center" style="text-align:center;line-adjust:0">
<div class="title para-block" style="font-weight:bold;margin-bottom:0.5ex;font-size:xxx-large;line-adjust:0">The Koka Programming Language</div>
<div class="titlenote para-block" style="line-adjust:0"><span style="font-size:75%">(Daan Leijen, 2024-01-14)</span></div></div></div></div>
<div class="titlenote para-block" style="line-adjust:0"><span style="font-size:75%">(Daan Leijen, 2024-01-15)</span></div></div></div></div>
<div class="flexbody">

<div class="sidepanel">
Expand Down
2 changes: 1 addition & 1 deletion doc/std_core-source.html
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@
// &#42; &#96;D%(2^n) == D &amp; ((2^n) - 1) &#96; (with &#96;0 &lt;= n &lt;= 31&#96; and &#96;2^n&#96; means &#96;2&#96; to the power of &#96;n&#96; )
//
// See also &#95;Division and modulus for computer scientists, Daan Leijen, 2001&#95; for further information
// available at: &lt;http://research.microsoft.com/pubs/151917/divmodnote.pdf&gt; .
// available at: &lt;https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/divmodnote-letter.pdf&gt; .
</span><span class="decl-extern" id="int_fs_divmod"><span class="kw">pub</span> inline fip <span class="kw">extern</span> <a class="pp" href="https://koka-lang.github.io/koka/doc/std_core.html#int_fs_divmod">int/divmod<span class="pc"><span class="mo">std<span class="fslash">/</span>core<span class="fslash last">/</span></span><span class="lq">int<span class="fslash">/</span></span>divmod: <span class="tp sp">(</span><span class="tp tpp">x</span> <span class="tp kw op">:</span> <span class="tp">int</span><span class="tp sp">,</span> <span class="tp tpp">y</span> <span class="tp kw op">:</span> <span class="tp">int</span><span class="tp sp">)</span> <span class="tp kw op">-></span> <span class="tp sp">(</span><span class="tp">int</span><span class="tp sp">,</span> <span class="tp">int</span><span class="tp sp">)</span></span></a>(x<span class="tp kw op">:</span><a class="pp" href="https://koka-lang.github.io/koka/doc/std_core_types-source.html#type_space_int"><span class="tp">int</span><span class="pc"><span class="mo">std<span class="fslash">/</span>core<span class="fslash">/</span>types<span class="fslash last">/</span></span>int: <span class="co">V</span></span></a>,y<span class="tp kw op">:</span><a class="pp" href="https://koka-lang.github.io/koka/doc/std_core_types-source.html#type_space_int"><span class="tp">int</span><span class="pc"><span class="mo">std<span class="fslash">/</span>core<span class="fslash">/</span>types<span class="fslash last">/</span></span>int: <span class="co">V</span></span></a>) <span class="tp kw op">:</span> <a class="pp" href="https://koka-lang.github.io/koka/doc/std_core_types-source.html#type_space_tuple2"><span class="tp">(</span><span class="pc"><span class="mo">std<span class="fslash">/</span>core<span class="fslash">/</span>types<span class="fslash last">/</span></span>tuple2: <span class="tp sp">(</span><span class="co">V</span>, <span class="co">V</span>) <span class="kw op">-></span> <span class="co">V</span></span></a><a class="pp" href="https://koka-lang.github.io/koka/doc/std_core_types-source.html#type_space_int"><span class="tp">int</span><span class="pc"><span class="mo">std<span class="fslash">/</span>core<span class="fslash">/</span>types<span class="fslash last">/</span></span>int: <span class="co">V</span></span></a><span class="tp sp">,</span><a class="pp" href="https://koka-lang.github.io/koka/doc/std_core_types-source.html#type_space_int"><span class="tp">int</span><span class="pc"><span class="mo">std<span class="fslash">/</span>core<span class="fslash">/</span>types<span class="fslash last">/</span></span>int: <span class="co">V</span></span></a><span class="tp sp">)</span>
c <span class="st">"kk&#95;integer&#95;div&#95;mod&#95;tuple"</span>
cs <span class="st">"Primitive.IntDivMod"</span>
Expand Down
2 changes: 1 addition & 1 deletion doc/std_core.html
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ <h1 class="synopsis">Core functions.</h1>
</em> <code class="koka"><span class="co">D</span><span class="op">%</span>(<span class="number">2</span><span class="op"><sup></span>n) <span class="op">==</span> <span class="co">D</span> <span class="op">&#38;</span> ((<span class="number">2</span><span class="op"></sup></span>n) <span class="op"><span class="minus">-</span></span> <span class="number">1</span>)</code> (with <code class="koka"><span class="number">0</span> <span class="op">&#60;=</span> n <span class="op">&#60;=</span> <span class="number">31</span></code> and <code class="koka"><span class="number">2</span><span class="op">^</span>n</code> means <code class="koka"><span class="number">2</span></code> to the power of <code class="koka">n</code> )
<br>
See also <em class="em-low1">Division and modulus for computer scientists, Daan Leijen, 2001</em> for further information
available at: <a href="http://research.microsoft.com/pubs/151917/divmodnote.pdf" class="texturl monospace">http://&#8203;research.&#8203;microsoft.&#8203;com/&#8203;pubs/&#8203;151917/&#8203;divmodnote.&#8203;pdf</a> .
available at: <a href="https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/divmodnote-letter.pdf" class="texturl monospace">https://&#8203;www.&#8203;microsoft.&#8203;com/&#8203;en-&#8203;us/&#8203;research/&#8203;wp-&#8203;content/&#8203;uploads/&#8203;2016/&#8203;02/&#8203;divmodnote-&#8203;letter.&#8203;pdf</a> .
</p></div></div>
<div class="decl" id="int_fs_float32"><div class="header code"><span class="def"><span class="kw">fun</span>&nbsp;<a class="link" href="std_core-source.html#int_fs_float32"><span class="lq">int<span class="fslash">/</span></span>float32</a></span>( <span class="tp tpp">i</span> <span class="tp sp">:</span>&nbsp;<a class="pp" href="https://koka-lang.github.io/koka/doc/std_core_types.html#type_space_int"><span class="tp">int</span><span class="pc"><span class="mo">std<span class="fslash">/</span>core<span class="fslash">/</span>types<span class="fslash last">/</span></span>int: <span class="co">V</span></span></a> ) <span class="tp sp">:</span>&nbsp;<a class="pp" href="https://koka-lang.github.io/koka/doc/std_core_types.html#type_space_float32"><span class="tp">float32</span><span class="pc"><span class="mo">std<span class="fslash">/</span>core<span class="fslash">/</span>types<span class="fslash last">/</span></span>float32: <span class="co">V</span></span></a></div><div class="doc koka comment">

Expand Down
14 changes: 7 additions & 7 deletions doc/std_num_ddouble-source.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,32 +122,32 @@
T.\ Dekker.
&#95;A Floating-Point Technique for Extending the Available Precision&#95;.
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.
&#95;What Every Computer Scientist Should Know About Floating-point Arithmetic&#95;.
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&amp;rep=rep1&amp;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&amp;rep=rep1&amp;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.
&#95;Beating Floating Point at its Own Game: Posit Arithmetic&#95;. 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.
&#95;Quad-Double Arithmetic: Algorithms, Implementation, and Application&#95;.
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.
&#95;Library for double-double and quad-double arithmetic.&#95;
(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"' }
Expand All @@ -171,7 +171,7 @@
~

[ddwiki]: https://en.wikipedia.org/wiki/Quadruple-precision&#95;floating-point&#95;format#Double-double&#95;arithmetic
[qd]: http://crd-legacy.lbl.gov/~dhbailey/mpdist
[qd]: https://crd-legacy.lbl.gov/~dhbailey/mpdist

\/
&#42;/</span>
Expand Down
14 changes: 7 additions & 7 deletions doc/std_num_ddouble.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ <h1 class="synopsis">128-bit double-double floating point numbers.</h1>
to avoid magnifying rounding errors &#8211; in that case the result for IEEE 128-bit floats becomes:
</p>
<pre class="para-block pre-fenced pre-fenced4" style="display:block"><code>128-bit ieee x : 3.147842048749004252358852654945507<span class="code-escaped"><span style="color:#F88">92210</span></span>e-16</code></pre>
<p class="p noindent para-continued">The implementation is based closely on the excellent&nbsp;<a href="http://crd-legacy.lbl.gov/~dhbailey/mpdist" data-linkid="qd">QD</a> C++ library&nbsp;<span class="citations" style="target-element:bibitem">[<a href="#hida:qd" class="bibref localref" style="target-element:bibitem"><span class="cite-number">4</span></a>, <a href="#hida:qdlib" class="bibref localref" style="target-element:bibitem"><span class="cite-number">5</span></a>]</span>,
<p class="p noindent para-continued">The implementation is based closely on the excellent&nbsp;<a href="https://crd-legacy.lbl.gov/~dhbailey/mpdist" data-linkid="qd">QD</a> C++ library&nbsp;<span class="citations" style="target-element:bibitem">[<a href="#hida:qd" class="bibref localref" style="target-element:bibitem"><span class="cite-number">4</span></a>, <a href="#hida:qdlib" class="bibref localref" style="target-element:bibitem"><span class="cite-number">5</span></a>]</span>,
and assumes proper 64-bit IEEE <code class="koka"><a class="pp" href="https://koka-lang.github.io/koka/doc/std_core_types.html#type_space_float64"><span class="tp">float64</span><span class="pc"><span class="mo">std<span class="fslash">/</span>core<span class="fslash">/</span>types<span class="fslash last">/</span></span>float64: <span class="co">V</span></span></a></code>s with correct rounding.
Integers can be represented precisely up to 30 decimal digits (and a bit more&#8230;
up to 2<sup>106</sup> - 2).
Expand All @@ -128,20 +128,20 @@ <h1 class="synopsis">128-bit double-double floating point numbers.</h1>
<div id="dekker" class="bibitem" data-cite-label="1" style="text-indent:-2rem;margin-left:2rem;bibitem-label:[1];searchterm:Dekker+A+Floating-Point+Technique+for+Extending+the+Available+Precision"><span class="bibitem-before" style="padding-right:0.5em;display: inline-block; width:calc(2rem - 0.5em);display: inline-block; text-align:right;font-size:90%">[1]</span>T.&#160;Dekker.
<em class="em-low1">A Floating-Point Technique for Extending the Available Precision</em>.
Numerische&#160;Mathematik, vol. 18 (3), June 1971, 224&#8211;242.
<a href="http://gdz.sub.uni-goettingen.de/dms/resolveppn/?PPN=GDZPPN001170007">pdf</a>.&nbsp;<a href="http://www.bing.com/search?q=Dekker+A+Floating-Point+Technique+for+Extending+the+Available+Precision" class="bibsearch">&#128270;</a></div>
<a href="https://gdz.sub.uni-goettingen.de/dms/resolveppn/?PPN=GDZPPN001170007">pdf</a>.&nbsp;<a href="http://www.bing.com/search?q=Dekker+A+Floating-Point+Technique+for+Extending+the+Available+Precision" class="bibsearch">&#128270;</a></div>
<div id="goldberg:float" class="bibitem" data-cite-label="2" style="text-indent:-2rem;margin-left:2rem;bibitem-label:[2]"><span class="bibitem-before" style="padding-right:0.5em;display: inline-block; width:calc(2rem - 0.5em);display: inline-block; text-align:right;font-size:90%">[2]</span>David Goldberg.
<em class="em-low1">What Every Computer Scientist Should Know About Floating-point Arithmetic</em>.
ACM Computing Survey. vol. 23 (1), March 1991. doi:&nbsp;<a href="http://doi.org/10.1145/103162.103163">10.1145/103162.103163</a>.
<a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.22.6768&amp;rep=rep1&amp;type=pdf">pdf</a>.&nbsp;<a href="http://www.bing.com/search?q=" class="bibsearch">&#128270;</a></div>
ACM Computing Survey. vol. 23 (1), March 1991. doi:&nbsp;<a href="https://doi.org/10.1145/103162.103163">10.1145/103162.103163</a>.
<a href="https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.22.6768&amp;rep=rep1&amp;type=pdf">pdf</a>.&nbsp;<a href="http://www.bing.com/search?q=" class="bibsearch">&#128270;</a></div>
<div id="gustafson:posit" class="bibitem" data-cite-label="3" style="text-indent:-2rem;margin-left:2rem;bibitem-label:[3];searchterm:Gustafson+John+Beating+floating+point+at+its+own+game+posit+arithmetic"><span class="bibitem-before" style="padding-right:0.5em;display: inline-block; width:calc(2rem - 0.5em);display: inline-block; text-align:right;font-size:90%">[3]</span>John&#160;L. Gustafson and Isaac&#160;Yonemoto.
<em class="em-low1">Beating Floating Point at its Own Game: Posit Arithmetic</em>. 2017.
<a href="http://www.johngustafson.net/pdfs/BeatingFloatingPoint.pdf">pdf</a>.&nbsp;<a href="http://www.bing.com/search?q=Gustafson+John+Beating+floating+point+at+its+own+game+posit+arithmetic" class="bibsearch">&#128270;</a></div>
<a href="https://www.johngustafson.net/pdfs/BeatingFloatingPoint.pdf">pdf</a>.&nbsp;<a href="http://www.bing.com/search?q=Gustafson+John+Beating+floating+point+at+its+own+game+posit+arithmetic" class="bibsearch">&#128270;</a></div>
<div id="hida:qd" class="bibitem" data-cite-label="4" style="text-indent:-2rem;margin-left:2rem;bibitem-label:[4];searchterm:Hida+Quad-Double+Arithmetic:+Algorithms,+Implementation,+and+Application"><span class="bibitem-before" style="padding-right:0.5em;display: inline-block; width:calc(2rem - 0.5em);display: inline-block; text-align:right;font-size:90%">[4]</span>Yozo Hida,&#160;Xiaoye S.&#160;Li, and David&#160;H.&#160;Bailey.
<em class="em-low1">Quad-Double Arithmetic: Algorithms, Implementation, and Application</em>.
Lawrence Berkeley National Laboratory Technical Report LBNL-46996. 2000.&nbsp;<a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.5769">pdf</a>.&nbsp;<a href="http://www.bing.com/search?q=Hida+Quad-Double+Arithmetic:+Algorithms,+Implementation,+and+Application" class="bibsearch">&#128270;</a></div>
Lawrence Berkeley National Laboratory Technical Report LBNL-46996. 2000.&nbsp;<a href="https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.5769">pdf</a>.&nbsp;<a href="http://www.bing.com/search?q=Hida+Quad-Double+Arithmetic:+Algorithms,+Implementation,+and+Application" class="bibsearch">&#128270;</a></div>
<div id="hida:qdlib" class="bibitem" data-cite-label="5" style="text-indent:-2rem;margin-left:2rem;bibitem-label:[5];searchterm:Hida+Library+for+double-double+and+quad-double+arithmetic"><span class="bibitem-before" style="padding-right:0.5em;display: inline-block; width:calc(2rem - 0.5em);display: inline-block; text-align:right;font-size:90%">[5]</span>Yozo Hida,&#160;Xiaoye&#160;S.&#160;Li, and David&#160;H.&#160;Bailey.
<em class="em-low1">Library for double-double and quad-double arithmetic.</em>
(2007).&nbsp;<a href="http://www.jaist.ac.jp/~s1410018/papers/qd.pdf">pdf</a>.&nbsp;<a href="http://www.bing.com/search?q=Hida+Library+for+double-double+and+quad-double+arithmetic" class="bibsearch">&#128270;</a></div>
(2007).&nbsp;<a href="https://www.jaist.ac.jp/~s1410018/papers/qd.pdf">pdf</a>.&nbsp;<a href="http://www.bing.com/search?q=Hida+Library+for+double-double+and+quad-double+arithmetic" class="bibsearch">&#128270;</a></div>
<div id="lin" class="bibitem" data-cite-label="6" style="text-indent:-2rem;margin-left:2rem;bibitem-label:[6];searchterm:Linnainmaa+&quot;Software+for+Doubled-Precision+Floating-Point+Computations&quot;"><span class="bibitem-before" style="padding-right:0.5em;display: inline-block; width:calc(2rem - 0.5em);display: inline-block; text-align:right;font-size:90%">[6]</span>Seppo&#160;Linnainmaa.
<em class="em-low1">Software for Doubled-Precision Floating-Point Computations</em>.
ACM Transactions on Mathematical Software (TOMS), vol. 7 (3), Sept. 1981, 272&#8211;283.&nbsp;<a href="http://www.bing.com/search?q=Linnainmaa+&quot;Software+for+Doubled-Precision+Floating-Point+Computations&quot;" class="bibsearch">&#128270;</a></div>
Expand Down
4 changes: 2 additions & 2 deletions doc/std_num_float64-source.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
<span class="comment">// Smallest positive normalized float64 value
</span><span class="decl-val" id="flt_min"><span class="kw">pub</span> <span class="kw">val</span> <a class="pp" href="https://koka-lang.github.io/koka/doc/std_num_float64.html#flt_min">flt-min<span class="pc"><span class="mo">std<span class="fslash">/</span>num<span class="fslash">/</span>float64<span class="fslash last">/</span></span>flt<span class="dash">-</span>min: <span class="tp">float64</span></span></a> <span class="kw">=</span> <span class="number">0x1.0p-1022</span></span> <span class="comment">// 2.22507385850720138309e-308
</span>
<span class="comment">// Smallest positive subnormal value (i.e. [&#96;&#96;DBL&#95;TRUE&#95;MIN&#96;&#96;](http://en.cppreference.com/w/cpp/types/climits))
<span class="comment">// Smallest positive subnormal value (i.e. [&#96;&#96;DBL&#95;TRUE&#95;MIN&#96;&#96;](https://en.cppreference.com/w/cpp/types/climits))
</span><span class="decl-val" id="flt_true_min"><span class="kw">pub</span> <span class="kw">val</span> <a class="pp" href="https://koka-lang.github.io/koka/doc/std_num_float64.html#flt_true_min">flt-true-min<span class="pc"><span class="mo">std<span class="fslash">/</span>num<span class="fslash">/</span>float64<span class="fslash last">/</span></span>flt<span class="dash">-</span>true<span class="dash">-</span>min: <span class="tp">float64</span></span></a><span class="kw">=</span> <span class="number">0x1.0p-1074</span></span> <span class="comment">// 4.9406564584124654418e-324
</span>
<span class="comment">// Machine epsilon: the difference between 1.0 and the next representable &#96;:float64&#96; value.
Expand Down Expand Up @@ -495,7 +495,7 @@


<span class="comment">// Linear interpolation, calculating &#96;x + t&#42;(y - x)&#96; 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 &#96;x.is-finite &amp;&amp; y.is-finite&#96;, then:
// - exact: &#96;lerp(x,y,0.0) == x&#96; and &#96;lerp(x,y,1.0) == y&#96;
// - monotonic: if &#96;x &lt;= y&#96; and &#96;t1 &lt;= t2&#96;, then &#96;cmp( lerp(x,y,t1), lerp(x,y,t2) ) &lt;= Eq&#96; (and other cases)
Expand Down
Loading

0 comments on commit 51f3b75

Please sign in to comment.