package
0.0.0-20231208061952-f10d33120ced
Repository: https://github.com/liguoqinjim/go-labs.git
Documentation: pkg.go.dev

# README

浮点数

Nextafter returns the next representable float64 value after x towards y. 这个函数就是返回从x去向y,这个范围内,下一个可以表示出来的浮点数。

注意

浮点数的精度是靠M来表示的,float64的时候,可以有15-16位的精度

参考资料

  1. https://zh.wikipedia.org/wiki/%E6%B5%AE%E7%82%B9%E6%95%B0
  2. http://www.ruanyifeng.com/blog/2010/06/ieee_floating-point_representation.html
  3. https://www.zhihu.com/question/21711083