newRPL: Alpha demo 0.9 released [UPDATED 20171025]

08262017, 04:40 AM
(This post was last modified: 08262017 05:19 AM by The Shadow.)
Post: #60




RE: newRPL: Alpha demo 0.9 released [UPDATED 20170824]
(08262017 01:31 AM)Claudio L. Wrote: I looked at the algorithm. It produces a 64bit integer. Even if presented as a 0.0 to 1.0 range, it has a granularity of 5e20 (actually 2^64). I wonder if it's enough for newRPL with a default precision of 32 digits? In other words, if it provides 18 random digits, what do we fill the other 14 with? Simple. You generate as many sets of 18 digits as you need to fit the precision and stick them together. (In my RPL implementation, I've just been adding them together as strings.) Any excess gets rounded off as usual. The only thing you have to watch out for is to pad the front of a set of 18 with leading 0's if necessary. Incidentally, I've been encountering some oddities with the editor. It seems that when programs get past a certain size, you get weird errors. Like, a variable I've been using all along suddenly gets changed to 'INVALID_COMMAND', or I suddenly get an error of 'Invalid word' when I try to exit. I haven't done anything I know of to justify these things. EDIT: Oh, and I coded a quick version of what we called >NFMT above (though I called it >NFS to emphasize it produces a string) and it is very useful. It's especially nice for getting all the digits of a number, and to shed those pesky dots marking uncertainty. In fact I've got a little program XDOT that does nothing except get rid of dots. (It's just << "#.A#" >NFS STR> >>) Might make a useful command, similar to oldRPL R>I, though working on nonintegers. Even better, it works on lists of numbers all at once. By the way, some commands mark uncertainty when they shouldn't. For example, sqrt(4) gives 2. rather than 2 EDIT: Just found some oddities with complex arithmetic. If at 32 digits of precision you do: (16 16) (1 1) 5 ^ / You get (4 1.25E31) instead of (4 0). 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)