The Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.


Math Forum » Discussions » sci.math.* » sci.math

Topic: Prime/Twin Prime Generator
Replies: 48   Last Post: Sep 30, 2017 5:44 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Pubkeybreaker

Posts: 1,644
Registered: 2/12/07
Re: Prime/Twin Prime Generator
Posted: Aug 24, 2017 8:02 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On Thursday, August 24, 2017 at 7:33:56 AM UTC-4, Bill wrote:
> Pubkeybreaker wrote:
> > A correct algorithm produces correct outputs for all inputs.
>
> To be fair, I would say that a "correct algorithm" is one that lives up
> to its specifications. "Validating input" could be unnecessary and time
> consuming, for instance.


Unnecessary? Then who validates the inputs? Someone has to. Whether
it is done prior to invoking the algorithm, or during execution of the
algorithm, it is still necessary.





If I design a function to compute a (real)
> square root. It's not necessarily my job to indicate what happens if
> the function is passed -3;


Yes, it is. This is part of correct software engineering.


> This is sort of the philosophy of the C programming language--that
> people know what they are doing.


I'm sure that they do. Erroneous inputs still occur.
Checking inputs also guards against incomplete specification of the
algorithm.






Date Subject Author
8/24/17
Read Re: Prime/Twin Prime Generator
Pubkeybreaker
8/24/17
Read Re: Prime/Twin Prime Generator
Bill
8/24/17
Read Re: Prime/Twin Prime Generator
Pubkeybreaker
8/24/17
Read Re: Prime/Twin Prime Generator
Bill
8/24/17
Read Re: Prime/Twin Prime Generator
FromTheRafters
8/24/17
Read Re: Prime/Twin Prime Generator
Pubkeybreaker
8/24/17
Read Re: Prime/Twin Prime Generator
Bill
8/24/17
Read Re: Prime/Twin Prime Generator
FromTheRafters
8/24/17
Read Re: Prime/Twin Prime Generator
Bill
8/24/17
Read Re: Prime/Twin Prime Generator
Bill
8/24/17
Read Re: Prime/Twin Prime Generator
ELI SOLOMON
8/24/17
Read Re: Prime/Twin Prime Generator
Pubkeybreaker
8/24/17
Read Re: Prime/Twin Prime Generator
Peter Percival
8/24/17
Read Re: Prime/Twin Prime Generator
ELI SOLOMON
8/24/17
Read Re: Prime/Twin Prime Generator
Peter Percival
8/24/17
Read Re: Prime/Twin Prime Generator
ELI SOLOMON
8/24/17
Read Re: Prime/Twin Prime Generator
ELI SOLOMON
8/24/17
Read Re: Prime/Twin Prime Generator
Peter Percival
8/24/17
Read Re: Prime/Twin Prime Generator
Ben Bacarisse
8/24/17
Read Re: Prime/Twin Prime Generator
ELI SOLOMON
8/24/17
Read Re: Prime/Twin Prime Generator
FromTheRafters
8/26/17
Read Re: Prime/Twin Prime Generator
Peter Percival
8/26/17
Read Re: Prime/Twin Prime Generator
Pubkeybreaker
8/26/17
Read Re: Prime/Twin Prime Generator
Pubkeybreaker
8/26/17
Read Re: Prime/Twin Prime Generator
FromTheRafters
8/26/17
Read Re: Prime/Twin Prime Generator
FromTheRafters
8/24/17
Read Re: Prime/Twin Prime Generator
ELI SOLOMON
8/24/17
Read Re: Prime/Twin Prime Generator
FromTheRafters
8/24/17
Read Re: Prime/Twin Prime Generator
ELI SOLOMON
8/26/17
Read Re: Prime/Twin Prime Generator
Peter Percival
8/24/17
Read Re: Prime/Twin Prime Generator
ELI SOLOMON
8/24/17
Read Re: Prime/Twin Prime Generator
robersi
8/25/17
Read Re: Prime/Twin Prime Generator
Peter Percival
8/25/17
Read Re: Prime/Twin Prime Generator
FromTheRafters
8/24/17
Read Re: Prime/Twin Prime Generator
ELI SOLOMON
8/24/17
Read Re: Prime/Twin Prime Generator
ELI SOLOMON
8/24/17
Read Re: Prime/Twin Prime Generator
ELI SOLOMON
8/25/17
Read Re: Prime/Twin Prime Generator
ELI SOLOMON
8/25/17
Read Re: Prime/Twin Prime Generator
ELI SOLOMON
9/29/17
Read Re: Prime/Twin Prime Generator
ELI SOLOMON
9/29/17
Read Re: Prime/Twin Prime Generator
Peter Percival
9/29/17
Read Re: Prime/Twin Prime Generator
Pubkeybreaker
9/30/17
Read Re: Prime/Twin Prime Generator
Richard Tobin
9/30/17
Read Re: Prime/Twin Prime Generator
Pubkeybreaker
9/30/17
Read Re: Prime/Twin Prime Generator
Pubkeybreaker
9/30/17
Read Re: Prime/Twin Prime Generator
Richard Tobin
9/29/17
Read Re: Prime/Twin Prime Generator
FromTheRafters
9/30/17
Read Re: Prime/Twin Prime Generator
Richard Tobin

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2017. All Rights Reserved.