Function Repository Resource:

MachineIntegerQ

Check if a number falls into the range of machine-sized integers for your computer

Contributed by: Wolfram Research
 ResourceFunction["MachineIntegerQ"][expr] returns True if expr corresponds to a machine‐sized integer, and False otherwise.

Details and Options

On a typical computer system, machine‐sized integers must lie in the range -231+1 to +231-1 or -263+1 to +263-1.
Results from the Wolfram Language are not affected by whether an integer is machine sized or not; the speed of operations may, however, be affected.

Examples

Basic Examples

Check whether numbers are machine integers or not:

 In[1]:=
 Out[1]=
 In[2]:=
 Out[2]=

The largest machine integer on this machine:

 In[3]:=
 Out[3]=
 In[4]:=
 Out[4]=

The next integer is not a machine integer:

 In[5]:=
 Out[5]=
 In[6]:=
 Out[6]=

The smallest machine integer on this machine:

 In[7]:=
 Out[7]=
 In[8]:=
 Out[8]=

The preceding integer is not a machine integer:

 In[9]:=
 Out[9]=
 In[10]:=
 Out[10]=

Requirements

Wolfram Language 11.3 (March 2018) or above