# Tcl Library Source Code

Ticket Change Details
Overview

Artifact ID: fb316ca51d7952952c56738a2aefa6d6e830820e41c28d26b9ec0e662365a461 3c17835a2da341ad99c5e70007615f281f250534 find interval of Legendre and 2 other estimated primes from two entries anonymous 2018-07-31 00:57:43
Changes

1. Change assignee to "nobody"
2. Change closer to "nobody"
3. Change cmimetype to "text/plain"
4. Change comment to:

possibly, difference over interval using NumberPrimesLegendreModified (related previous ticket cd42b3ddf8,2017-05-28 ) would be useful to some. two numbers entered, limit1 and limit2 and difference returned. both limits must be greater than one. find interval of est. primes from two entries on positive number line. Inclusive, interval differences for numberPrimesGauss, numberPrimesLegendre, NumberPrimesLegendreModified might be useful. ## ### differenceNumberPrimesLegendreModified -- # Return the approximate difference number of primes # between a lower and higher limit as given values # for approximate number of primes based on the # modified formula by Legendre # # Arguments: # limit1 The lower limit for the interval, largest prime to be included in the l.limit # limit2 The upper limit for the interval, largest prime to be included in the u.mlimit # # Returns: # Approximate difference number of primes # proc ::math::numtheory::differenceNumberPrimesLegendreModified {limit1 limit2} { if { \$limit1 <= 1 } { return -code error "The lower limit must be larger than 1" } if { \$limit2 <= 1 } { return -code error "The upper limit must be larger than 1" }

set aa [::math::numtheory::numberPrimesLegendreModified [expr (\$limit1)]] set bb [::math::numtheory::numberPrimesLegendreModified [expr (\$limit2)]] expr ( \$bb-\$aa) } ####### statements invoking difference puts " [ ::math::numtheory::differenceNumberPrimesLegendreModified 100 200 ] " #puts " [ ::math::numtheory::differenceNumberPrimesLegendreModified 100 0 ] " invokes error.
5. Change foundin to "8.6"
6. Change is_private to "0"