Scilab Home Page | Wiki | Bug Tracker | Forge | Mailing List Archives | Scilab Online Help | File Exchange
ATOMS : Number details
Login with GitLab

Number

Integers algorithms
(2392 downloads for this version - 33720 downloads for all versions)
Details
Version
1.2
A more recent valid version exists: 1.4
Author
Michael Baudin
Owner Organization
Consortium Scilab - DIGITEO
Maintainers
Michael BAUDIN
Allan CORNET
Category
License
Dependencies
Creation Date
October 19, 2011
Source created on
Scilab 5.2.x
Binaries available on
Scilab 5.2.x:
Windows 64-bit Windows 32-bit Linux 64-bit Linux 32-bit macOS
Install command
--> atomsInstall("number")
Description
            Purpose
-------

The goal of this toolbox is to provide several Number theory related
algorithms. 
The toolbox is based on macros.
The implementation uses Scilab's double precision integers, 
therefore is limited to integers in the [-2^53,2^53] interval.

Features
--------

 * number_carmichael — Returns some Carmichael numbers.
 * number_coprime — Checks if two numbers are relatively prime.
 * number_extendedeuclid — Solves a linear Diophantine equation (Bezout
identity).
 * number_factor — Factors a number.
 * number_fermat — Returns the Fermat number 2^2^n + 1
 * number_gcd — Computes the greatest common divisor.
 * number_inversemod — Computes the modular multiplicative inverse.
 * number_isdivisor — Checks if a divides b.
 * number_isprime — Checks if a number is prime.
 * number_lcm — Least common multiple.
 * number_mersenne — Returns the Mersenne number 2^n - 1
 * number_minimumprimegap — Returns the number minimum prime gap.
 * number_multiprimality — Returns the number of prime factors of n.
 * number_powermod — Modular exponentiation.
 * number_primecount — Returns the value of the prime-counting function.
 * number_primes — Computes the list of all primes up to n.
 * number_primorial — Returns the product of all primes lower or equal to n
 * number_probableprime — Check if a number is a probable prime.
 * number_pseudoprime — Check if a number is a pseudo prime.
 * number_solvelinmod — Solves a linear modular equation.
 * number_ulamspiral — Returns the Ulam spiral.
 
Conversion

 * number_barygui — Plots a gui to see the digits of a number.
 * number_baryguiclose — Closes the bary GUI.
 * number_bin2hex — Converts a binary string into a hexadecimal string.
 * number_frombary — Compute a number from a matrix of digits.
 * number_hex2bin — Converts an hexadecimal string into a binary string.
 * number_tobary — Decompose a number into arbitrary basis.

Support

 * number_primes100 — Returns a matrix containing the 100 first primes.
 * number_primes1000 — Returns a matrix containing the 1000 first primes.
 * number_primes10000 — Returns a matrix containing the 10 000 first primes.
            
Files (2)
[156.59 kB]
Source code archive

[304.91 kB]
OS-independent binary for Scilab 5.2.x
Binary version
Automatically generated by the ATOMS compilation chain

News (0)
Comments (2)     Leave a comment 
Comment -- October 20, 2011, 10:53:11 AM    
The v1.2 is correctly packaged on ATOMS.
I checked it on Win Vista and Scilab 5.3.2:


-->atomsGetInstalled()
 ans  =
 
!apifun   0.3-1  allusers  SCI\contrib\apifun\0.3-1   I  !
!                                                        !
!assert   1.3-1  allusers  SCI\contrib\assert\1.3-1   I  !
!                                                        !
!dispmat  0.1-1  allusers  SCI\contrib\dispmat\0.1-1  I  !
!                                                        !
!helptbx  0.2-1  allusers  SCI\contrib\helptbx\0.2-1  I  !
!                                                        !
!number   1.2-2  allusers  SCI\contrib\number\1.2-2   I  !
!                                                        !
!specfun  0.4-1  allusers  SCI\contrib\specfun\0.4-1  A  !
-->atomsTest("number")
   TMPDIR = C:\Users\baudin\AppData\Local\Temp\SCI_TMP_8068_
   001/029 - [SCI\contrib\number\1.2-2] barygui....................passed 
   002/029 - [SCI\contrib\number\1.2-2] bin2hex....................passed 
   003/029 - [SCI\contrib\number\1.2-2] carmichael.................passed 
   004/029 - [SCI\contrib\number\1.2-2] coprime....................passed 
   005/029 - [SCI\contrib\number\1.2-2] extendedeuclid.............passed 
   006/029 - [SCI\contrib\number\1.2-2] factor.....................passed 
   007/029 - [SCI\contrib\number\1.2-2] factor_stress..............passed 
   008/029 - [SCI\contrib\number\1.2-2] factor_verbose.............passed 
   009/029 - [SCI\contrib\number\1.2-2] fermat.....................passed 
   010/029 - [SCI\contrib\number\1.2-2] frombary...................passed 
   011/029 - [SCI\contrib\number\1.2-2] gcd........................passed 
   012/029 - [SCI\contrib\number\1.2-2] hex2bin....................passed 
   013/029 - [SCI\contrib\number\1.2-2] inversemod.................passed 
   014/029 - [SCI\contrib\number\1.2-2] isdivisor..................passed
   015/029 - [SCI\contrib\number\1.2-2] isprime....................passed 
   016/029 - [SCI\contrib\number\1.2-2] isprime_stress.............passed 
   017/029 - [SCI\contrib\number\1.2-2] lcm........................passed 
   018/029 - [SCI\contrib\number\1.2-2] mersenne...................passed 
   019/029 - [SCI\contrib\number\1.2-2] minimumprimegap............passed 
   020/029 - [SCI\contrib\number\1.2-2] multiprimality.............passed 
   021/029 - [SCI\contrib\number\1.2-2] powermod...................passed 
   022/029 - [SCI\contrib\number\1.2-2] primes.....................passed 
   023/029 - [SCI\contrib\number\1.2-2] primes1000.................passed 
   024/029 - [SCI\contrib\number\1.2-2] primorial..................passed 
   025/029 - [SCI\contrib\number\1.2-2] probableprime..............passed 
   026/029 - [SCI\contrib\number\1.2-2] pseudoprime................passed 
   027/029 - [SCI\contrib\number\1.2-2] solvelinmod................passed 
   028/029 - [SCI\contrib\number\1.2-2] tobary.....................passed 
   029/029 - [SCI\contrib\number\1.2-2] ulamspiral.................passed 

Michaël
Comment -- October 20, 2011, 10:54:27 AM    
Here is the changelog of the versions 0.2 to 1.2.

number (1.2)
    * Added Ulam spiral.
    * Added ismember.
    * Added multiprimality.
    * Added minimumprimegap.
    * Fixed help page of bin2hex, hex2bin.
    * Updated tests to use assert module.
    * Removed demos generated from examples.
    * Use apifun_checkflint.
    * Use apifun_argindefault.

number (1.1)
    * Added bin2hex and hex2bin.
    * Checked arguments of tobary, frombary with apifun.
    * Updated implementation of factor to remove global variables (backward compatibility 
lost)
    * Updated implementation of isprime to remove global variables (backward compatibility

lost)
    * Removed cget, startup, configure to remove global variables.
    * Added more complete example in carmichael.
    * Used apifun in all functions: argument checking is more complete.
    * Extended lcm, gcd, factor and isprime to negative numbers.
    * Added number_primecount
    * make .xml from the txt notes

number (1.0)
    * Added missing number_checkrange
    * Created number_barygui
    * Created number_frombary
    * Renamed number_bary > number_tobary (backward compatibility lost)
    * Fixed bug in number_check.
    * Separated the help pages.
 -- Michael Baudin <michael.baudin@scilab.org>  Sep 2010

number (0.2)
    * Fixed startup script
    * Created number_powermod
    * Created number_check
    * Created number_pseudoprime
    * Created number_probableprime
    * Created number_bary
    * Created number_carmichael
    * Created number_fermat
    * Created number_mersenne
    * Created number_primes1000
    * Created number_inversemod
    * Created number_isdivisor
    * Created number_solvelinmod
    * Created number_extendedeuclid
    * Added a clear implementation of Pollard-rho and removed Pollard-floyd and Pollard-
brent
    * Added a warning message when status is false and is not an output argument
 -- Michael Baudin <michael.baudin@scilab.org>  Nov 2009
Leave a comment
You must register and log in before leaving a comment.
Login with GitLab
Email notifications
Send me email when this toolbox has changes, new files or a new release.
You must register and log in before setting up notifications.