This thread is intended to post "patches" to the Fpulib package as soon as errors are reported and corrected. I also asked the administrator to replace the entire package with the modifications.

For those who may already have downloaded it previously, only the modified files will be available here, without the need to download the whole thing every time.


One small error has already been reported in one of the library modules. Although the result may rarely have been affected, the error also had the potential of contaminating some registers.

The opportunity was also taken to complete the comments in the source code of the module.

The attached FpulibX1.zip file contains the updated Fpu.lib and the modified FpuFLtoA.asm files only. Simply overwrite your existing ones with the new ones.

Raymond
Posted on 2002-12-21 20:43:33 by Raymond
Somehow, the promised .zip file did not seem to get attached to my previous post.

It should now be here.
Posted on 2002-12-21 20:51:13 by Raymond
I should check mail more often :)
Posted on 2002-12-23 14:57:00 by Hiroshimator
An almost unnoticeable flaw was noticed in the FpuFLtoA function: the last digit was not rounded.

This has now been corrected and the opportunity was taken to add another option in the function.

Since the number of decimals specified was only taking the least significant byte of the DWORD passed as a parameter, the second byte can now be used to specify the position of the decimal point with the regular decimal format, spaces being used to pad the front end of the null-terminated string result. (The high word of the parameter is not used and ignored.)

(Note that the decimal point is always the 3rd character with the scientific notation and the new option will not apply to it).

(Note also that such formatting can line up decimal points only if you use a monospace font for display or printing.)

The new option allows up to 17 digits to be specified before the decimal point. This caters to the sign and the maximum of 16 digits to be returned by the function in the result.

Also, if an error is detected by the function, the null-terminated word ERROR will now be written to the specified result buffer. The program can still use its own error messaging when an error is reported by EAX, or send this output directly to the user.

The Help file has been updated to reflect these changes.

For those of you who already have the Fpu.lib package included in MASM32v8, or have downloaded a previous version from this site, the attached Fpulib11x.zip only contains the source code file of the FpuFLtoA function, the compiled library file (Fpu.lib) and the Help file (Fpulib.hlp). Simply unzip and replace the existing files with the new ones.

For those who may not already have the library, the attached Fpulib11.zip contains the source code for all the functions, the .lib file, the .inc file and the extensive .hlp file.

Enjoy

Raymond
Posted on 2003-04-25 22:32:33 by Raymond
Can't seem to attach two files to the same message.

Here's the fpulib11.zip

Raymond
Posted on 2003-04-25 22:38:04 by Raymond
Ray,

Thanks for posting this upgrade, I know from the feedback that the FP package has been very popular with many people so keeping it up to date with the rounding improvement will just make it better.

Regards,

hutch@movsd.com
Posted on 2003-04-26 03:55:57 by hutch--
A minor flaw has been noticed in the FpuFLtoA function: the leading 1 was not displayed when a value slightly less than an integral power of 10 is rounded to that power of 10. This has now been corrected.

For those of you who already have the Fpu.lib package included in MASM32v8, or have downloaded a previous version from this site, the attached Fpulib12x.zip only contains the source code file of the FpuFLtoA function and the compiled library file (Fpu.lib). Simply unzip and replace the existing files with the new ones.

For those who may not already have the library, the attached Fpulib12.zip in the very next posting (can't attach 2 files in the same posting) contains the source code for all the functions, the .lib file, the .inc file and the extensive .hlp file.

BTW the FloatToStr procedure of the masm32.lib in the MASM32 package seems to have a similar flaw.

Enjoy

Raymond
Posted on 2003-07-25 19:11:04 by Raymond
Attached is the full Fpulib package promised in the previous posting.

Raymond
Posted on 2003-07-25 19:13:48 by Raymond