metanorma / atmospheric

International Standard Atmosphere / ICAO Standard Atmosphere (ISA) from ICAO 7488 / ISO 2533
BSD 2-Clause "Simplified" License
1 stars 1 forks source link

Add optional "high-precision" processing mode #34

Open ronaldtse opened 3 months ago

ronaldtse commented 3 months ago

This project is starting now, and we will need a mode that generates values of higher precision.

By higher precision I was just thinking of BigNumber, not some fancy way of reimplementing floats.

@newbthenewbd would you be able to handle this?

newbthenewbd commented 3 months ago

So that BigDecimal from earlier, but toggleable from within the code, this time? Well, got that foot in the door :)

ronaldtse commented 3 months ago

We can use a static class switch such as Atmospheric::Isa.set_precision(:high) to make the change.

newbthenewbd commented 3 months ago

Just as an aside, that new measured dependency hauls along a couple others, among them activesupport, which apparently may conflict with the latest json gem on some systems... like mine :joy:

Got an error like that, and had to downgrade ruby-json: https://gitlab.archlinux.org/archlinux/packaging/packages/wpscan/-/issues/1

So, if it's to remain just for ft<->m conversions, that dependency might be a bit of an overkill?

ronaldtse commented 3 months ago

@newbthenewbd oh no I did not realize activesupport became a dependency. Let's use another "meter to foot" conversion gem/mechanism.