Project

General

Profile

« Previous | Next » 

Revision 3a7b9ca9

Added by mame (Yusuke Endoh) 3 months ago

Fix Integer.sqrt to never exceed actual value

Integer.sqrt uses sqrt(3) from libm for small values.
This method must return a value less than or equal to the actual integer
square root, but libm's sqrt does not always guarantee that.

This change corrects that by decrementing the result if necessary.

Fixes [Bug #21217]