Single-precision floating-point format: Difference between revisions

Content deleted Content added
m Reverted edits by 2001:9E8:CA77:B600:D78C:56B:142B:59B9 (talk) (HG) (3.4.13)
PL/I
Tag: Reverted
Line 10:
One of the first [[programming language]]s to provide single- and double-precision floating-point data types was [[Fortran]]. Before the widespread adoption of IEEE 754-1985, the representation and properties of floating-point data types depended on the [[computer manufacturer]] and computer model, and upon decisions made by programming-language designers. E.g., [[GW-BASIC]]'s single-precision data type was the [[32-bit MBF]] floating-point format.
 
Single precision is termed ''REAL'' in [[Fortran]];<ref>{{cite web|url=http://scc.ustc.edu.cn/zlsc/sugon/intel/compiler_f/main_for/lref_for/source_files/rfreals.htm|title=REAL Statement|website=scc.ustc.edu.cn|access-date=2013-02-28|archive-date=2021-02-24|archive-url=https://web.archive.org/web/20210224045812/http://scc.ustc.edu.cn/zlsc/sugon/intel/compiler_f/main_for/lref_for/source_files/rfreals.htm|url-status=dead}}</ref> ''SINGLE-FLOAT'' in [[Common Lisp]];<ref>{{Cite web|url=https://www.lispworks.com/documentation/HyperSpec/Body/t_short_.htm|title=CLHS: Type SHORT-FLOAT, SINGLE-FLOAT, DOUBLE-FLOAT...|website=www.lispworks.com}}</ref> ''float''{{efn|More precisely, the combination of ''float'' and a precision depending on the base and the compiler options. E.g., with the compiler option '''FLOAT(DFP)''' and the declaration '''float decimal(p,q)''', single precision is used if p<8.}} in PL/I; ''float'' in [[C (programming language)|C]], [[C++]], [[C Sharp (programming language)|C#]] and [[Java (programming language)|Java]];<ref>{{cite web|url=https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html|title=Primitive Data Types|website=Java Documentation}}</ref> ''Float'' in [[Haskell (programming language)|Haskell]]<ref>{{cite web|url=https://www.haskell.org/onlinereport/haskell2010/haskellch6.html#x13-1350006.4|title=6 Predefined Types and Classes|date=20 July 2010|website=haskell.org}}</ref> and [[Swift (programming language)|Swift]];<ref>{{cite web|url=https://developer.apple.com/documentation/swift/float|title=Float|website=Apple Developer Documentation}}</ref> and ''Single'' in [[Object Pascal]] ([[Delphi (programming language)|Delphi]]), [[Visual Basic]], and [[MATLAB]]. However, ''float'' in [[Python (programming language)|Python]], [[Ruby (programming language)|Ruby]], [[PHP]], and [[OCaml]] and ''single'' in versions of [[GNU Octave|Octave]] before 3.2 refer to [[double-precision floating-point format|double-precision]] numbers. In most implementations of [[PostScript]], and some [[embedded systems]], the only supported precision is single.
{{Floating-point}}
 
Line 269:
* [[Numerical stability]]
* [[Scientific notation]]
 
== Notes ==
{{notelist}}
 
== References ==