STR #1381

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

Return to Bugs & Features | Roadmap 1.1 ]

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:

Receive EMails Don't Receive EMails

Trouble Report Files:

No files


Trouble Report Comments:


Name/Time/Date Text top right image
 
#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
 
bottom left image   bottom right image

Return to Bugs & Features ]

 
 

Comments are owned by the poster. All other content is copyright 1998-2022 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.