[Ada] Avoid artificial underflow in System.Val_Real

Pierre-Marie de Rodat derodat@adacore.com
Wed Dec 16 13:15:35 GMT 2020


The final computation now needs to be protected against artificial
underflow when the value is very small.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* libgnat/s-valrea.adb (Maxexp32): New constant array.
	(Maxexp64): Likewise.
	(Maxexp80): Likewise.
	(Integer_to_Real): New local constants Maxexp and B.
	When the exponent is too negative, do the divison in two steps.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 2958 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20201216/dd4acbf6/attachment-0001.bin>


More information about the Gcc-patches mailing list