luca-fiorito-11 / sandy

Sampling nuclear data and uncertainty
MIT License
48 stars 29 forks source link

Handle e+0 Case in write_float Function #307

Closed janmalec closed 4 months ago

janmalec commented 4 months ago

The write_float function handles the e-0 case but does not address the e+0 case, leading to inconsistent formatting in scientific notation. This inconsistency results in improperly formatted ENDF files, causing processing to fail. The function should be updated to replace both e-0 with - and e+0 with + to ensure proper formatting and successful processing.

Example where the old behavior fails: sandy.write_float(1-1e-8)

luca-fiorito-11 commented 4 months ago

see #306

luca-fiorito-11 commented 4 months ago

closed with #308