Bug 332971

Summary: scientific notation bug in genius
Product: [Fedora] Fedora Reporter: George Lebl <jirka>
Component: geniusAssignee: Gérard Milmeister <gemi>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 7   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-07 19:23:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch to fix scientific notation printing none

Description George Lebl 2007-10-15 18:19:18 UTC
Description of problem:

scientific notation screws up on output.  To test enter a large number into
genius for example 123123123123123123.0 (just anything with more digits than
MaxDigits, which is 12 by default) and you get some nonsense such as for the
above I get e17, instead of 1.23123123123e17

The problem is in the output routine using sprintf in a very funky way which
used to work (I admit it was stupid of me to do that but I wrote that code 10
years ago when I was young and stupid).  Anyway, upstream v 1.0.0 fixes this,
and I can also provide a simple patch to fix the problem.  I can't do that right
now but when I get home.

Comment 1 George Lebl 2007-10-16 15:36:58 UTC
Created attachment 228881 [details]
patch to fix scientific notation printing

A patch to fix the scientific notation printing.  Yes the code is not prettiest
but its correct now.  The problem was that sprintf used to allow the string
itself to be a parameter allowing something like sprintf(s,"%s...",s,...) but
that no longer works with recent gcc optimizations apparently.