Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > sci.math > #382495

Re: Prime/Twin Prime Generator

From Bill <BILL_NOSPAM@whoknows.net>
Newsgroups sci.math
Subject Re: Prime/Twin Prime Generator
Date 2017-08-24 08:36 -0400
Organization NewsGuy - Unlimited Usenet $23.95
Message-ID <onmh9302u16@news7.newsguy.com> (permalink)
References <568787694.44796.1503541541239.JavaMail.root@sodium.mathforum.org> <64e2a882-bfca-4a21-9894-91750ceb05fa@googlegroups.com> <onmdoa0taj@news6.newsguy.com> <67013e98-a4ad-49fe-9da8-2ef40d716069@googlegroups.com>

Show all headers | View raw


Pubkeybreaker wrote:
> 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.
>
>
>

I didn't say no validation should be done. It's all about where the 
function is called from.  For instance, maybe another function has 
already validated the inputs.  We are not talking about what I would 
consider a function invoked directly by the user. My qualifications for 
my point of view is an MS in computer science.  If you would like good 
performance, you don't do the same thing more than once (redundantly).

Back to sci.math | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Prime/Twin Prime Generator ELI SOLOMON <mathdiscoverer@gmail.com> - 2017-08-23 18:59 -0400
  Re: Prime/Twin Prime Generator Peter Percival <peterxpercival@hotmail.com> - 2017-08-24 05:07 +0100
  Re: Prime/Twin Prime Generator Pubkeybreaker <pubkeybreaker@aol.com> - 2017-08-24 02:57 -0700
    Re: Prime/Twin Prime Generator Bill <BILL_NOSPAM@whoknows.net> - 2017-08-24 07:32 -0400
      Re: Prime/Twin Prime Generator FromTheRafters <erratic@nomail.afraid.org> - 2017-08-24 07:44 -0400
        Re: Prime/Twin Prime Generator Pubkeybreaker <pubkeybreaker@aol.com> - 2017-08-24 05:04 -0700
          Re: Prime/Twin Prime Generator FromTheRafters <erratic@nomail.afraid.org> - 2017-08-24 08:49 -0400
          Re: Prime/Twin Prime Generator Bill <BILL_NOSPAM@whoknows.net> - 2017-08-24 08:53 -0400
        Re: Prime/Twin Prime Generator Bill <BILL_NOSPAM@whoknows.net> - 2017-08-24 08:44 -0400
          Re: Prime/Twin Prime Generator richard@cogsci.ed.ac.uk (Richard Tobin) - 2017-08-24 13:01 +0000
            Re: Prime/Twin Prime Generator Bill <BILL_NOSPAM@whoknows.net> - 2017-08-24 09:07 -0400
            Re: Prime/Twin Prime Generator FromTheRafters <erratic@nomail.afraid.org> - 2017-08-24 09:59 -0400
      Re: Prime/Twin Prime Generator Pubkeybreaker <pubkeybreaker@aol.com> - 2017-08-24 05:02 -0700
        Re: Prime/Twin Prime Generator Bill <BILL_NOSPAM@whoknows.net> - 2017-08-24 08:36 -0400
          Re: Prime/Twin Prime Generator Pubkeybreaker <pubkeybreaker@aol.com> - 2017-08-24 05:42 -0700
            Re: Prime/Twin Prime Generator Bill <BILL_NOSPAM@whoknows.net> - 2017-08-24 08:50 -0400
              Re: Prime/Twin Prime Generator FromTheRafters <erratic@nomail.afraid.org> - 2017-08-24 09:23 -0400
              Re: Prime/Twin Prime Generator Pubkeybreaker <pubkeybreaker@aol.com> - 2017-08-24 07:11 -0700
            Re: Prime/Twin Prime Generator Bill <BILL_NOSPAM@whoknows.net> - 2017-08-24 08:58 -0400
          Re: Prime/Twin Prime Generator FromTheRafters <erratic@nomail.afraid.org> - 2017-08-24 09:15 -0400
        Re: Prime/Twin Prime Generator Bill <BILL_NOSPAM@whoknows.net> - 2017-08-24 08:38 -0400
          Re: Prime/Twin Prime Generator Bill <BILL_NOSPAM@whoknows.net> - 2017-08-24 09:04 -0400

csiph-web