| [ Return to Bugs & Features | Roadmap 1.1 | SVN ⇄ GIT ]
STR #1381
Application: | FLTK Library |
Status: | 1 - Closed w/Resolution |
Priority: | 3 - Moderate, e.g. unable to compile the software |
Scope: | 3 - Applies to all machines and operating systems |
Subsystem: | Core Library |
Summary: | Fl_Preferences has accuracy "issues" saving and restoring doubles and floats |
Version: | 1.1-current |
Created By: | ianmacarthur |
Assigned To: | matt |
Fix Version: | 1.1-current (SVN: v5331) |
Update Notification: | |
Trouble Report Files:
No files
Trouble Report Comments:
|
#1 | ianmacarthur 12:12 Jul 29, 2006 |
| Using Fl_Preferences to save and restore the values of double or float parameters causes a loss of resolution, as the default implementation stores the values in plain text (which is a very good thing) but with only 6 decimal places (which is nowhere near enough digits for a typical float, let alone a double.)
I would ask that more digits, maybe at least 9, better 12, be stored after the decimal.
Our current implementation works around this issue by storing the prefs by sprintf'ing the value to more digits and saving the string, but still just uses the default double or float method to reload them and this seems to work satisfactorily.
-- Ian | |
|
#2 | matt 00:31 Aug 18, 2006 |
| Fixed in Subversion repository.
Added optional "precision" argument for storing floats and doubles | |
[ Return to Bugs & Features ]
|
| |