| Summary: | G4UIcmdWithADoubleAndUnit: loss of numeric precision when setting a default unit | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | Valentin <niess> |
| Component: | interfaces | Assignee: | asai |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | normal | CC: | asai |
| Priority: | P4 | ||
| Version: | 10.5 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Attachments: | Minimal example illustrating the problem | ||
|
Description
Valentin
2019-03-27 12:44:46 CET
Please issue a UI command "/control/useDoublePrecision" before any of other UI commands. Please note that this command is available from version 10.3.p02. *** This problem has been marked as a duplicate of problem 1921 *** Thank you. This solves the problem indeed. Still it doesn't look like a safe patch to me since then a user of my package **must** also issue the `/control/useDoublePrecision` command in order to get the proper behaviour. Maybe I could force set-it in my G4UImessenger constructor? But that would be spaming for other UI packages. So I'd rather not use the `SetDefaultUnit` method at moment. Thanks again for the support :) Cheers, Valentin You may hard-code this command in your main() or any other relevant location before any UI command could be executed. |