~/talk

From JVM to JS: Implementing Math Functions in ClojureScript

Talkat Clojure/conj 2024 · 2024-10-23..10-25· [javascript]
slides:none on file

Builds a ClojureScript reimplementation that aims for parity with Java's Math, implemented Java's Math in ClojureScript and handling tricky cases like subnormals and NaNs. Uses ArrayBuffer/DataView bit fiddling to extract high/low 32-bit words and IEEE 754 64-bit parsing via ArrayBuffer/DataView to reproduce JVM behavior. Rewrites libc fdlibm routines like IEEEremainder, runs generative testing against the JVM across wide ranges, and lands the code in ClojureScript after community review and performance tuning.

AI-written summary · about

  1. 0:00The need for portable math
  2. 2:58JavaScript math limitations
  3. 6:03Understanding IEEE-754
  4. 12:04Safe integer representation
  5. 14:46Bit manipulation in JS
  6. 19:01Reimplementing math functions
  7. 22:28The challenge of IEEEremainder
  8. 27:10Testing on the JVM
  9. 32:03Community feedback
  10. 33:55Cross-platform testing
  11. 39:31Merging into ClojureScript
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.