Totient function: Difference between revisions
Content added Content deleted
Line 1,280: | Line 1,280: | ||
totalPrimes := principal(100) |
totalPrimes := principal(100) |
||
msgbox % "total primes in 1 .. 100 = " totalPrimes |
msgbox % "total primes in 1 .. 100 = " totalPrimes |
||
totalPrimes := principal(1000) ; caution... |
totalPrimes := principal(1000) ; caution... pure gcd method |
||
msgbox % "total primes in 1 .. 1000 = " totalPrimes ; 3 minutes or more |
msgbox % "total primes in 1 .. 1000 = " totalPrimes ; takes 3 minutes or more |
||
;totalPrimes := principal(10000) |
;totalPrimes := principal(10000) |
||
;msgbox % "total primes in 1 .. 10000 = " totalPrimes |
;msgbox % "total primes in 1 .. 10000 = " totalPrimes |
||
Line 1,330: | Line 1,330: | ||
--------------------------- |
--------------------------- |
||
OK |
OK |
||
</pre> |
|||
=={{header|AWK}}== |
=={{header|AWK}}== |