Yeah this is exactly what I do under the hood. All the data is stored as Ints, charts use double for speed, views use decimal to display stuff properly in the user locale.
P.S. Doubles are absolute evil for calculations:
@Test
func test() {
var a = Decimal(100.4449315513924) * 100 // It's me being dumb, not noticing that
let b = NSDecimalNumber(decimal: a).intValue
#expect(b == 10044) // Expectation failed: (b → -8402) == 1044
}
hm, I don't have any other ways to prove it. The thing is - I thought this is something LLM can't write about.
Just imagine a prompt: "Hey Claude, go ahead and come up with idea why GnuCash stores numbers as fractions and come up with an article for HN". I actually tried it and god damn thing came up with something very similar :D
P.S. Doubles are absolute evil for calculations: