newRPL: [UPDATED April 27-2017] Firmware for testing available for download
|
12-16-2015, 05:02 AM
Post: #176
|
|||
|
|||
RE: newRPL: [UPDATED Dec-02-2015] Firmware for testing available for download
(12-15-2015 07:23 PM)Francois Lanciault Wrote: The program computes the quantity of primes numbers less than a given number. So it is mostly integer, with a few square-root and modulo division. It does not used any advanced functions (like ISPRIME or such). It is not the fastest algorithm to do that job but it is faster than checking the primality of every numbers. I have implemented the program on about 100 calculators/computers so I have a good database of results! Hi Claudio, Here is the code : For HP-50G The main program newma Code:
This program uses a subroutine: ISPA as follow Code:
This is the version for the standard HP-50G. For newRPL, I made the following changes: - removed the dot after each constant (the dot was there because HP-50G is faster in float than in exact arithmetic. I believe newRPL is faster without trailing dot) - changed "TIME" for "TICKS" - changed the "C 'J' STO+" sequence to "C J + 'J' STO" And the corresponding HP-Prime program: Code:
Have fun. Francois |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)