Skip to content
  • Takashi Kokubun's avatar
    9abd48df
    merge revision(s) 3a7b9ca9: [Backport #21217] · 9abd48df
    Takashi Kokubun authored
    	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]
    9abd48df
    merge revision(s) 3a7b9ca9: [Backport #21217]
    Takashi Kokubun authored
    	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]
Loading