Pages: 1 ... 5 6 [7]   Go Down
Author Topic: Arduino generating prime numbers  (Read 6612 times)
0 Members and 1 Guest are viewing this topic.
Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No I didn't, the library basically uses the standard number.c file which I found somewhere.
I thought you said you modified that library for Arduino.

I took the standard number.c file and added a class wrapper around it so you didn't have to muck around with malloc and free all over the place. So the low-level computations are the same.
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Code:
#include "Pseudoprimes.h";

Where is this file?
Logged

USA
Offline Offline
Sr. Member
****
Karma: 12
Posts: 322
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

"Pseudoprimes.h" ... Where is this file?

The text at reply #87, where the latest version of the sketch is attached, says that the included file - Pseudoprimes.h - still slumbers at reply #70.  But it didn't mean to say that; it meant to say it was attached to some other reply, since it's not at #70, and it was at reply #69 last time I saw it.

Fixed #87; attached a copy of sketch and included file here.

* PrimesTrialPseudoBarrett.ino (7.55 KB - downloaded 10 times.)
* Pseudoprimes.h (29.62 KB - downloaded 33 times.)
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ah yes, that's a lot faster. smiley
Logged

Pages: 1 ... 5 6 [7]   Go Up
Jump to: