Questions tagged [iec10967]

ISO/IEC 10967, language-independent arithmetic (LIA), is a series of standards on computer arithmetic. It is compatible with ISO/IEC/IEEE 60559:2011, better known as IEEE 754-2008, and indeed much of the specifications are for IEEE 754 special values (though such values are not required by LIA itself, unless the parameter iec559 is true). Via Wikipedia

ISO/IEC 10967, Language independent arithmetic (LIA), is a series of standards on computer arithmetic.

It is compatible with ISO/IEC/IEEE 60559:2011, a known as IEEE 754-2008, and indeed much of the specifications are for IEEE 754 special values (though such values are not required by LIA itself, unless the parameter iec559 is true). Via Wikipedia

It is publicly available at: standards.iso.org/ittf/PubliclyAvailableStandards/ under Information technology -- Language independent arithmetic

Status: Active Standard

Programmers writing programs that perform a significant amount of numeric processing have often not been certain how a program will perform when run under a given language processor.

Programming language standards have traditionally been somewhat weak in the area of numeric processing, seldom providing an adequate specification of the properties of arithmetic datatypes, particularly floating point numbers. Often they do not even require much in the way of documentation of the actual arithmetic datatypes by a conforming language processor.

It is the intent of this part of ISO/IEC 10967 to help to redress these shortcomings, by setting out precise definitions of integer and floating point datatypes, and requirements for documentation.


First part: ISO/IEC 10967-1:2012 Integer and Floating Point Arithmetic

Specifies properties of many of the integer and floating point datatypes available in a variety of programming languages in common use for mathematical and numerical applications.

Its goal is to ensure that the properties of the arithmetic on a conforming datatype are made available to the programmer. /text snippet via ANSII.org


Second part: ISO/IEC 10967-2:2001 Elementary Numerical Functions

It defines the properties of numerical approximations for many of the real elementary numerical functions available in standard libraries for a variety of programming languages in common use for mathematical and numerical applications. /text snippet via ANSII.org


Third part: ISO/IEC 10967-3:2006 Complex Integer and Floating Point Arithmetic and Complex Elementary Numerical Functions It is based on ISO/IEC 10967-2 and ISO/IEC 10967-1, as well as IEC 60559.

It specifies the properties of complex and imaginary integer datatypes and floating point datatypes, basic operations on values of these datatypes as well as some numerical functions for which operand or result values are of imaginary or complex integer datatypes or imaginary or complex floating point datatypes constructed from integer and floating point datatypes satisfying the requirements of ISO/IEC 10967-1.

These operations and functions are available in a variety of programming languages in common use for mathematical and numerical applications. /text snippet via ANSII.org


Prepared by the Joint Technical Committee ISO/IEC JTC 1, Information technology, Subcommittee SC 22, Programming languages, their environments and system software interfaces.

Developed by the JTC1/SC22/WG11 International Standardization Working Group, under the collaboration between ISO International Organization for Standardization and IEC International Electrotechnical Commission.

Adopted by:

  • ANSI American National Standards Institute
  • BSI British Standards Institution
  • CSA Group Canadian Standards Association
7 questions
1007
votes
65 answers

Count the number of set bits in a 32-bit integer

8 bits representing the number 7 look like this: 00000111 Three bits are set. What are the algorithms to determine the number of set bits in a 32-bit integer?
Matt Howells
  • 40,310
  • 20
  • 83
  • 102
352
votes
12 answers

What is the rationale for all comparisons returning false for IEEE754 NaN values?

Why do comparisons of NaN values behave differently from all other values? That is, all comparisons with the operators ==, <=, >=, <, > where one or both values is NaN returns false, contrary to the behaviour of all other values. I suppose this…
starblue
  • 55,348
  • 14
  • 97
  • 151
3
votes
2 answers

Why did IEEE-754 decide NaN != NaN despite being illogical?

This is a follow up question to What is the rationale for all comparisons returning false for IEEE754 NaN values? (I think this is better as another question than a comment). It has a very good answer which is missing exactly 1 important thing: why…
SkySpiral7
  • 362
  • 3
  • 8
3
votes
3 answers

Long integer is transformed when inserted in shorter column, not truncated. Why? What is the formula?

I have a column of type integer with length 10: `some_number` int(10) unsigned NOT NULL Into this column I insert a number that is too long: $some_number = 715988985123857; $query = "INSERT INTO this_table SET some_number = ?"; $stmt =…
user1322720
2
votes
3 answers

Bit tricks to find the first position where the number of 0s equals the number of 1s

Suppose I have a 32 or 64 bit unsigned integer. What is the fastest way to find the index i of the leftmost bit such that the number of 0s in the leftmost i bits equals the number of 1s in the leftmost i bits? I was thinking of some bit tricks like…
Steven
  • 209
  • 2
  • 10
1
vote
1 answer

multiplication limit of integers for GMP library

I was attempting to multiply two very large mpz_ts together, each of 2^(10*2^22) bits, using the mpz_mul function in the GMP library. There was no segmentation fault, and the multiplication managed to go through. However, when I output the result of…
meta_warrior
  • 389
  • 1
  • 6
  • 18
-2
votes
2 answers

How do I make an integer 'bigger'?

I am a C# beginner and I am working on a calculator in Windows Forms. I've encountered a problem in which I get one of those debug blurbs after 10 or more digits are inputed into the interface. It says something about a system overflow exception,…
user3587709
  • 89
  • 1
  • 6