Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/WinPooh32/math

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/WinPooh32/math

  • v1.0.5
  • Source
  • Go
  • Socket score

Version published
Created
Source

math

This was not written by the Engo project. The original author decided to remove the original project from GitHub, we were given permission to reupload the code as long as we did not credit them.

This library is a copy of the standard math library but for float32 (more common in computer graphics and games. Most of the function are simply casting the arguments as float64 and forwarding to the original math library (something you would have to do anyway, but slowly we are translating the original function to the float32 version.
ALL tests are passing, meaning whatever program you we're running using the 64 bit version should still be correct using this library (using the IEEE floating point definition of "correct").
I only care about i386 and amd64, but if I receive pull request for other architecture I will merge them (I can't test it so please send me proof that all test pass and benchmark are better :)

rewriten functions

The benchmark is based on my macbook pro, with an i386 processor but a x86_64 operating system. benchmark may produce different results on different computers. However if you see an architecture for which casting to float64, calling the standard lib then casting back to flaot32 is faster then my implementation please tell me.
✓ = Test passing.
✗ = Not implemented yet.
? = Implemented but not tested.
* = has no ASM implementation.

Absstatuslux mathcastingstd mathaccel
function name✓, ✗, ? or *benchmark for float32 using lux math packagebenchmark for casting a var to float64, doing the op then casting backbenchmark for float64 using standard math packageaccelleration between casting and lux math
Absstatuslux mathcastingstd mathaccel
software
amd642.10 ns/op2.37 ns/op2.08 ns/op+13%
3862.02 ns/op2.24 ns/op2.02 ns/op+11%
Sqrtstatuslux mathcastingstd mathaccel
software
amd642.33 ns/op4.70 ns/op0.33 ns/op+102%
3862.33 ns/op5.14 ns/op4.74 ns/op+121%
Acoshstatuslux mathcastingstd mathaccel
software43.5 ns/op75.8 ns/op40.3 ns/op+74%
Asinhstatuslux mathcastingstd mathaccel
software47.3 ns/op81.3 ns/op46.1 ns/op+72%
Gammastatuslux mathcastingstd mathaccel
software25.1 ns/op38.5 ns/op24.0 ns/op+53%
templatestatuslux mathcastingstd mathaccel
softwarens/opns/opns/op%
amd64ns/opns/opns/op%
i386ns/opns/opns/op%

FAQs

Package last updated on 25 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc