Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

`fp64wgsl` is a WebGPU shader library for high-precision, 64-bit floating point math. This library has been verified against several high-precision floating point libraries and is tested to be correct within 0.5 ULP.

For support on this library, please reach out to the author via email at sienna at linux dot com. Pull requests not accepted.

It contains these supported functions:

* fp64_abs(a)
* fp64_acos(x)
* fp64_add(a, b)
* fp64_asin(x)
* fp64_atan(x)
* fp64_atan2(y, x)
* fp64_cos(x)
* fp64_div(a, b)
* fp64_eq(a, b)
* fp64_from_f32(v)
* fp64_from_i32(v)
* fp64_ge(a, b)
* fp64_gt(a, b)
* fp64_inf(sign)
* fp64_is_inf(v)
* fp64_is_nan(v)
* fp64_is_zero(v)
* fp64_le(a, b)
* fp64_lt(a, b)
* fp64_mantissa(v)
* fp64_mul(a, b)
* fp64_nan()
* fp64_neg(a)
* fp64_neg_zero()
* fp64_round_to_i32(v)
* fp64_sin(x)
* fp64_sqrt(a)
* fp64_sub(a, b)
* fp64_tan(x)
* fp64_zero()

Other functions are considered to be internal their usage is not advised or supported.

Performance is roughly 30% slower than native f32 for addition, subtraction, and multiplication. For division and square root, performance is about 13× slower than native f32. For trigonometric functions, performance is about 100–500× slower than native f32.

To reference this, use this reference:

@software{satterwhite_fp64wgsl_2026,
  author       = {Sienna Meridian Satterwhite},
  title        = {siennathesane/fp64wgsl: v1.0.0},
  month        = aug,
  year         = 2026,
  publisher    = {Zenodo},
  version      = {v1.0.0},
  doi          = {10.5281/zenodo.22018377},
  url          = {https://doi.org/10.5281/zenodo.22018377},
}

About

High-precision 64-bit floating point math library for WebGPU

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages