Tcl Library Source Code

Ticket Change Details
Login
Overview

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

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed 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. foundin changed to: "8.6"
  6. is_private changed to: "0"
  7. login: "anonymous"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "6a35629ae8c91b8189de05be9d12871d9ac9f8f9"
  10. resolution changed to: "None"
  11. severity changed to: "Cosmetic"
  12. status changed to: "Open"
  13. submitter changed to: "anonymous"
  14. subsystem changed to: "math :: special"
  15. title changed to:
     find interval of Legendre and 2 other estimated primes from two entries
    
  16. type changed to: "Patch"