source: trip-planner-front/node_modules/hdr-histogram-js/assembly/ulp.ts@ 59329aa

Last change on this file since 59329aa was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 384 bytes
Line 
1/*
2 * This is a AssemblyScript port of the original Java version, which was written by
3 * Gil Tene as described in
4 * https://github.com/HdrHistogram/HdrHistogram
5 * and released to the public domain, as explained at
6 * http://creativecommons.org/publicdomain/zero/1.0/
7 */
8
9const ulp = (x: f64): f64 =>
10 Math.abs(x - reinterpret<f64>(reinterpret<u64>(x) ^ 1));
11
12export default ulp;
Note: See TracBrowser for help on using the repository browser.