Skip to content

Parsing of scientific notation in IN file #1827

@jonmaddock

Description

@jonmaddock

In GitLab by @timothy-nunn on Apr 5, 2023, 17:36

I am getting an interesting error when experimenting with new VMCON which forces initial values of iteration variables to be greater than or equal to their lower bound (and upper bound). The following keeps occuring:

gapoh (for example) will be enabled as an iteration variable with some bounds set in the IN file

ixc = 42 * gapoh
boundl(42) = 0.05
boundu(42) = 0.1

Next gapoh will be set in the IN file, and the last time it is set will look as follows

gapoh          =  5.0000E-02

New VMCON will throw an error claiming gapoh is below its lower bound. This error is fixed by setting the above line to its equivalent decimal notation

gapoh          =  0.05

This suggests some weird rounding may be occurring when parsing the scientific notation which causes the value to become ever so slightly greater than 0.05, on the floating point level.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions