Ulam spiral
|
12-22-2013, 09:15 PM
(This post was last modified: 12-22-2013 09:48 PM by Tugdual.)
Post: #1
|
|||
|
|||
Ulam spiral
Explanation is here http://en.wikipedia.org/wiki/Ulam_spiral
The code is nothing special... Code:
And here is the Sacks version (note: why do I have to use approx???) Code:
|
|||
12-25-2013, 07:09 PM
Post: #2
|
|||
|
|||
RE: Ulam spiral
Posted by Gilles Carpentier on 22 July 2013, 5:38 p.m.
Code:
another one ! Regards, Damien. |
|||
08-28-2020, 11:09 AM
Post: #3
|
|||
|
|||
RE: Ulam spiral
Hi all,
Damien's code doesn't work for me in HP Prime Pro app for iOS, nor in HP Prime Virtual Calculator for Windows... I have the last versions in both cases. When I run the app I obtain the same error message : "Error: Bad argument type" on "IF isprime(n) THEN" What am I doing wrong ? Does isprime() function work in emulators programs ? I'm new to HP Prime and it's my first program, thanks in advance for any help. Olivier |
|||
08-28-2020, 01:14 PM
Post: #4
|
|||
|
|||
RE: Ulam spiral
(08-28-2020 11:09 AM)logoliv Wrote: Hi all, Try this: Go into CAS Setup, then make sure that the checkbox at the end of the 3rd line ("Change apparent integers into exact integers") is enabled. No guarantees, but that fixed the problem on my Prime. <0|ɸ|0> -Joe- |
|||
08-28-2020, 02:33 PM
(This post was last modified: 08-28-2020 11:31 PM by logoliv.)
Post: #5
|
|||
|
|||
RE: Ulam spiral
Thanks for your answer Joe.
The checkbox is already enabled, and the listbox for Integers is on "Decimal". I've also tested checking the CAS checkbox in the program creation screen, but it doesn't work either. I liked to program HP48 in sysRPL or Saturn assembly, and wanted to give HP Prime a try so I bought the Pro version on the App Store for my iPad... and the first simple program I test doesn't work and I don't even know why |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 6 Guest(s)