An algorithm to square floating-point numbers with IEEE-754. Turned to be slower than normal squaring.
This is the algorithm I created: typedef union { uint32_t i; float f; } f32; # define square(x) ((x)*(x)) f32 f32_sqr(f32 u) { const uint64_t m = (u.i & 0x7FFFFF);… Weiterlesen »An algorithm to square floating-point numbers with IEEE-754. Turned to be slower than normal squaring.