Elektrine lite

← Feed

@simon_brooke@mastodon.scot

Post #1782134

2026-04-27 18:10 UTC

@vnikolov @screwlisp OK, I've not got further than basic peano arithmetic yet. #PostScarcitySoftware is a very big project and although yes of course one day it should have very sophisticated mathematics libraries, I'm nowhere near that. My naive expectation is that if I start something like exponentiation with integers and rationals, then the result should be an integer or a rational. I would be *satisfied* with a complex result, provided that the components were integer or rational. /Continued

Replies (2)

  • @simon_brooke@mastodon.scot 2026-04-27 18:21

    @vnikolov @screwlisp If I have to go floating point, then I am planning on using using 128 bit floats so I should get reasonable precision on them, too; but you inevitably risk losing precision when you move away from explicit rationals to floats. https://git.journeyman.cc/simon/post-scarcity/src/commit/c1408090c12b0189d1285c57b18eb0ee113e0ba2/src/memory/consspaceobject.h#L583

    Open ##1782135

  • @vnikolov@ieji.de 2026-04-27 18:56

    I believe the following two must be kept _separate_ as much as possible, at least when _specifying_ the behavior of exponentiation with rational arguments: (1) whether the result is a real number; (2) whether both the real and imaginary parts of the result are rational. (For the second item, of course, rational includes integer.) For example, for (expt 16/81 3/4) both are true; for (expt 1/2 3/4) only (1) is true; for (expt -1 1/2) only (2) is true. Anyway, I am just a side observer here who doesn't understand what you are driving at. @simon_brooke @screwlisp

    Open ##1782136