Minimal Supersymmetric Standard Model: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
No edit summary
Updated that the Higgs particle has been found.
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{About|the programming language dialect}}
Hello! My name is Harley. <br>It is a little about myself: I live in Austria, my city of Haslau. <br>It's called often Northern or cultural capital of . I've married 2 years ago.<br>I have 2 children - a son (Karolin) and the daughter (Kayla). We all like Baseball.<br><br>Also visit my web site [http://micahbnll.iloveblog.com recruit]
[[Image:ISO-IEC-9899-1999-cover.png|thumb|180px|Cover of the C99 standards document]]
'''C99''' is an informal name for '''''ISO/IEC 9899:1999''''', a past version of the [[C programming language]] standard. It extends the previous version ([[ANSI C#C89 and C90|C90]]) with new linguistic and library features, and helps implementations make better use of available computer hardware, such as [[IEEE floating point|IEEE&nbsp;754]] arithmetic, and compiler technology.
 
==History==
After [[ANSI]] produced the official standard for the C programming language in 1989, which became an international standard in 1990, the C language specification remained relatively static for some time, while [[C++]] continued to evolve, largely during its own standardization effort. Normative Amendment 1 created a new standard for C in 1995, but only to correct some details of the 1989 standard and to add more extensive support for international character sets. The standard underwent further revision in the late 1990s, leading to the publication of ISO/IEC 9899:1999 in 1999, which was adopted as an ANSI standard in May 2000. The language defined by that version of the standard is commonly referred to as "C99". The international C standard is maintained by the [[working group]] [[SC22|ISO/IEC JTC1/SC22]]/WG14.
 
==Design==
{{unreferenced section|date=May 2013}}
C99 is, for the most part, backward compatible with C89, but it is stricter in some ways.
 
In particular, a declaration that lacks a type specifier no longer has <code>int</code> implicitly assumed. The C standards committee decided that it was of more value for compilers to diagnose inadvertent omission of the type specifier than to silently process legacy code that relied on implicit <code>int</code>. In practice, compilers are likely to display a warning, then assume <code>int</code> and continue translating the program.
 
C99 introduced several new features, many of which had already been implemented as extensions in several compilers:
 
* [[inline function]]s
* intermingled declarations and code: [[Variable (programming)|variable]] declaration is no longer restricted to file scope or the start of a compound statement (block), similar to [[C++]]
* several new [[data type]]s, including <code>long long int</code>, optional extended integer types, an explicit [[Boolean datatype|boolean data type]], and a <code>complex</code> type to represent [[complex number]]s
* [[variable-length array]]s
* support for one-line [[comment (programming)|comments]] beginning with <code>//</code>, as in [[BCPL]] or [[C++]]
* new library functions, such as <code>snprintf</code>
* new [[header file|headers]], such as <code><[[stdbool.h]]></code>, <code><[[complex.h]]></code>, <code><[[tgmath.h]]></code>, and <code><[[inttypes.h]]></code>
* type-generic math (macro) functions, in <code><tgmath.h></code>, which select a math library function based upon <code>float</code>, <code>double</code>, or <code>long double</code> arguments, etc.
* improved support for [[IEEE floating point]]
* designated initializers
* compound literals
* support for [[variadic macro]]s (macros with a variable number of arguments)
* <code>[[restrict]]</code> qualification allows more aggressive code [[optimization (computer science)|optimization]]
* universal character names, which allows user variables to contain other characters than the standard character set
 
Parts of the C99 standard are included in the current version of the C++ standard, [[C++11]], including integer types, headers, and library functions. Variable-length arrays are not among these included parts because C++'s [[Standard Template Library]] already includes similar functionality.
 
==IEEE&nbsp;754 floating point support==
A major feature of C99 is its numerics support, and in particular its support for access to the features of [[IEEE&nbsp;754-1985]] (also known as IEC&nbsp;60559) [[floating point]]  hardware present in the vast majority of modern processors (defined in "Annex F IEC 60559 floating-point arithmetic"). Platforms without IEEE&nbsp;754 hardware can also implement it in software.
 
On platforms with IEEE&nbsp;754 floating point:
* float is defined as IEEE&nbsp;754 [[Single-precision floating-point format|single precision]], double is defined as [[Double-precision floating-point format|double precision]], and [[long double]] is defined as IEEE&nbsp;754 [[extended precision]] or some form of [[Quadruple-precision floating-point format|quad precision]] where available (e.g., Intel 80&nbsp;bit [[extended precision|double extended]] precision on [[x86]] or [[x86-64]] platforms), else double precision.  Previously, all C90 floating operations were defined to occur in double-precision, with subsequent rounding to single precision, to store results, where necessary.
* arithmetic operations and functions are correctly rounded as defined by IEEE&nbsp;754.
* expression evaluation is defined to be performed in one of three well-defined methods, indicating whether floating point variables are first promoted to a more precise format in expressions: FLT_EVAL_METHOD&nbsp;==&nbsp;2 indicates that all internal intermediate computations are performed by default at high precision (long double) where available (e.g., [[extended precision|80&nbsp;bit double extended]]); FLT_EVAL_METHOD&nbsp;==&nbsp;1 performs all internal intermediate expressions in double precision (unless an operand is long double); FLT_EVAL_METHOD&nbsp;==&nbsp;0 specifies each operation is evaluated only at the precision of the widest operand of each operator. The intermediate result type for operands of a given precision are summarized in the following table:
 
{|class="wikitable"
!  FLT_EVAL_METHOD !! float !! double !! long double
|-
|0||float||double||long double
|-
|1||double||double||long double
|-
|2||long double||long double||long double
|}
 
FLT_EVAL_METHOD&nbsp;==&nbsp;2 is the safest default as it limits the risk of [[Round-off error|rounding errors]] affecting numerically unstable expressions (see [[floating point#IEEE 754 design rationale|IEEE&nbsp;754 design rationale]]) and is the designed default method for [[x87]] hardware;  FLT_EVAL_METHOD&nbsp;==&nbsp;1 was the default evaluation method originally used in [[C (programming language)#K&R C|K&R&nbsp;C]], which promoted all floats to double in expressions; and FLT_EVAL_METHOD&nbsp;==&nbsp;0  is also commonly used and specifies a strict "evaluate to type" of the operands. (For [[GNU Compiler Collection|gcc]], FLT_EVAL_METHOD&nbsp;==&nbsp;2 is the default on 32&nbsp;bit x86, and FLT_EVAL_METHOD&nbsp;==&nbsp;0 is the default on 64&nbsp;bit x86-64, but FLT_EVAL_METHOD&nbsp;==&nbsp;2 can be specified on x86-64 with option -mfpmath=387). Note that prior to the precision of intermediate values being precisely specified in C99, C compilers could round intermediate results inconsistently, especially when using [[x87]] floating point hardware, leading to compiler-specific behaviour;<ref name=stackinterview>{{cite web|url=http://drdobbs.com/architecture-and-design/184410314 | title=A conversation with William Kahan. | author=Jack Woehr |date=1 November 1997}}</ref> such inconsistencies are not permitted in compilers conforming to C99 (annex F).
=== Example ===
The following annotated example C99 code for computing a continued fraction function demonstrates the main features:
 
<source lang=C line>
#include <stdio.h>
#include <math.h>
#include <float.h>
#include <fenv.h>
#include <tgmath.h>
#include <stdbool.h>
#include <assert.h>
 
double compute_fn(double z)
{
        #pragma STDC FENV_ACCESS ON  // [1]
 
        assert( FLT_EVAL_METHOD == 2 ); // [2]
 
        if (isnan(z)) printf("z is not a number\n"); // [3]
        if (isinf(z)) printf("z is infinite\n");
 
        long double r;  // [4]
 
        r = 7.0 - 3.0/(z - 2.0 - 1.0/(z - 7.0 + 10.0/(z - 2.0 - 2.0/(z - 3.0)))); // [5]
 
        feclearexcept(FE_DIVBYZERO); // [6]
 
        bool raised = fetestexcept(FE_OVERFLOW); // [7]
        if (raised) printf("Unanticipated overflow.\n");
 
        return r;
}
 
int main(void)
{
#ifndef __STDC_IEC_559__
        printf("Warning: __STDC_IEC_559__ not defined. IEEE 754 floating point not fully supported.\n"); // [8]
#endif
 
      #pragma STDC FENV_ACCESS ON
 
        #ifdef TEST_NUMERIC_STABILITY_UP
        fesetround(FE_UPWARD);                  // [9]
        #elif TEST_NUMERIC_STABILITY_DOWN
        fesetround(FE_DOWNWARD);
        #endif
 
        printf("%.7g\n", compute_fn(3.0));
        printf("%.7g\n", compute_fn(NAN));
 
        return 0;
}
</source>
 
Footnotes:
# <li value="0"> compile with: {{code|lang=bash|1=gcc -std=c99 -mfpmath=387 -o test_c99_fp -lm test_c99_fp.c}}
# As the IEEE&nbsp;754 status flags are manipulated in this function, this #pragma is needed to avoid the compiler incorrectly rearranging such tests when optimising.
# C99 defines a limited number of expression evaluation methods: the current compilation mode can be checked to ensure it meets the assumptions the code was written under.
# The special values such as [[NaN]] and positive or negative infinity can be tested and set.
# <code>long double</code> is defined as IEEE 754 double extended or quad precision if available. Using higher precision than required for intermediate computations can minimize [[round-off error]]<ref name=Baleful>{{cite web |url=http://www.cs.berkeley.edu/~wkahan/ieee754status/baleful.pdf |title=The Baleful Effect of Computer Benchmarks upon Applied Mathematics, Physics and Chemistry| author=William Kahan |date=11 June 1996}}</ref> (the typedef double_t can be used for code that is portable under all FLT_EVAL_METHODs).
# The main function to be evaluated. Although it appears that some arguments to this continued fraction, e.g., 3.0, would lead to a divide-by-zero error, in fact the function is well-defined at 3.0 and division by 0 will simply return a +infinity that will then correctly lead to a finite result: IEEE 754 is defined not to trap on such exceptions by default and is designed so that they can very often be ignored, as in this case.  (Note that if FLT_EVAL_METHOD is defined as 2 then all internal computations including constants will be performed in long double precision; if FLT_EVAL_METHOD is defined as 0 then additional care is need to ensure this, including possibly additional casts and explicit specification of constants as long double).
# As the raised divide-by-zero flag is not an error in this case, it can simply be dismissed to clear the flag for use by later code.
# In some cases, other exceptions may be regarded as an error, such as overflow (although it can in fact be shown that this cannot occur in this case).
# __STDC_IEC_559__ is to be defined only if "Annex F IEC 60559 floating-point arithmetic" is fully implemented by the compiler and the C library (users should be aware that this macro is sometimes defined while it shouldn't be).
# The default rounding mode is round to nearest (with the even rounding rule in the halfway cases) for IEEE 754, but explicitly setting the rounding mode toward + and - infinity (by defining TEST_NUMERIC_STABILITY_UP etc. in this example, when debugging) can be used to diagnose numerical instability.<ref name>{{cite web|url=http://www.cs.berkeley.edu/~wkahan/Mindless.pdf | title=How Futile are Mindless Assessments of Roundoff in Floating-Point Computation ?| author=William Kahan |date=11 January 2006}}</ref> Note that this method can be used even if compute_fn() is part of a separately compiled binary library. But depending on the function, numerical instabilities cannot always be detected.
 
==Version detection==
A standard macro <code>__STDC_VERSION__</code> is defined with value <code>199901L</code> to indicate that C99 support is available.  As with the <code>__STDC__</code> macro for C90, <code>__STDC_VERSION__</code> can be used to write code that will compile differently for C90 and C99 compilers, as in this example that ensures that <code>inline</code> is available in either case (by replacing it with <code>static</code> in C90 to avoid linker errors.)
 
<source lang=C>
#if __STDC_VERSION__ >= 199901L
  /* "inline" is a keyword */
#else
# define inline static
#endif
</source>
 
==Implementations==
Most C compilers now have support for at least some of the features new to C99. However, there has been less support from vendors such as [[Microsoft]] that have mainly focused on C++.
 
{| class="wikitable sortable"
|-
! Implementation
! Level of support
! Details
|-
| AMD x86 [[Open64| Open64 Compiler Suite]]
| {{okay|Mostly}}
| Has C99 support equal to that of GCC.<ref>{{Cite web|url=http://developer.amd.com/cpu/open64/onlinehelp/pages/x86_open64_help.htm#Standards |title=x86 Open64 |publisher=Developer.amd.com |date=1 April 1989 |accessdate=8 June 2009}}</ref>
|-
| [[cc65]]
| {{partial}}
| Full [[C89 (C version)|C89]] and C99 support is not implemented, partly due to platform limitations ([[MOS Technology 6502]]). There is no support planned for some C99 types like _Complex and 64-bit integers (long long).<ref>{{cite web|url=http://www.cc65.org/#Features|title=cc65 - a freeware C compiler for 6502 based systems|accessdate=14 September 2011}}</ref>
|-
| [[Ch (computer programming)|Ch]]
| {{partial}}
| Supports major C99 features.<ref>{{Cite web|url=http://www.softintegration.com/demos/chstandard/c99.html |title=C/C++ interpreter Ch C99 features |publisher=SoftIntegration, Inc. |date=15 February 2008 |accessdate=15 February 2008}}</ref>
|-
| [[Clang]]
| {{okay|Mostly}}
| Supports all features except C99 floating-point pragmas.<ref>{{Cite web|url=http://clang.llvm.org/docs/UsersManual.html#c |title=Clang Compiler User's Manual |accessdate=11 January 2010}}</ref>
|-
| cparser
| {{okay|Mostly}}
| Supports most C99 features.<ref>{{Cite web|url=http://sourceforge.net/projects/cparser/ |title=cparser project site |accessdate=25 October 2012}}</ref>
|-
| [[C++ Builder]]
| {{okay|Only in 64-bit mode, since latter is CLang fork}}<br/>{{Citation needed|date=September 2011}}
|
|-
| [[Digital Mars|Digital Mars C/C++ Compiler]]
| {{partial}}
| Lacks support for some features, such as [[tgmath.h]] and _Pragma.<ref>{{cite web|url=http://www.digitalmars.com/ctg/C-Language-Implementation.html|title=C Language Implementation - Digital Mars|accessdate=14 September 2011}}</ref>
|-
| [[GNU Compiler Collection|GCC]]
| {{okay|Mostly}}
| {{As of|2013|05}} in mainline GCC, 43 features have been completely implemented, one feature is broken and six are missing.<ref>{{Cite web|url=http://gcc.gnu.org/c99status.html |title=Status of C99 features in GCC |publisher=Free Software Foundation, Inc. |date=23 May 2013 |accessdate=23 May 2013}}</ref> GCC's 4.6 and 4.7 releases also provides the same level of compliance.<ref>{{Cite web|url=http://gcc.gnu.org/gcc-4.6/c99status.html |title=Status of C99 features in GCC 4.6|publisher=Free Software Foundation, Inc. |date=23 May 2013 |accessdate=23 May 2013}}</ref><ref>{{Cite web|url=http://gcc.gnu.org/gcc-4.7/c99status.html |title=Status of C99 features in GCC 4.7|publisher=Free Software Foundation, Inc. |date=23 May 2013 |accessdate=23 May 2013}}</ref> Almost complete IEEE&nbsp;754 support if the hardware is compliant.<ref>{{Cite web|url=http://gcc.gnu.org/wiki/FloatingPointMath|title=Semantics of Floating Point Math in GCC|date=10 October 2008|accessdate=26 August 2013}}</ref>
|-
|IBM C for AIX, V6 <ref>[http://www-01.ibm.com/common/ssi/cgi-bin/ssialias?infotype=an&subtype=ca&supplier=897&appname=IBMLinkRedirect&letternum=ENUS202-161 IBM C for AIX, V6.0 Now Supports the C99 Standard]</ref> and [[IBM XL C++|XL C/C++]] V11.1 for AIX <ref>[http://www-01.ibm.com/software/awdtools/xlcpp/aix/features/ IBM - XL C/C++ for AIX - United States]</ref>
| {{Yes|Full}}
|
|-
|[[IBM Rational]] logiscope
|{{Yes|Full}}
|Until Logiscope 6.3, only basic constructs of C99 were supported. C99 is officially supported in Logiscope 6.4 and later versions.<ref>[http://www-01.ibm.com/support/docview.wss?uid=swg21408170 IBM Rational Logiscope support for C99 standard - United States]</ref>
|-
|[[The Portland Group]] PGI C/C++
|{{Yes|Full}}
|
|-
| [[Intel C++ compiler]]
| {{okay|Mostly}}
|
|-
|[[Microsoft Visual C++]]
| {{partial}}<ref>{{cite web|last=Brenner|first=Pat|title=C99 library support in Visual Studio 2013|url=http://blogs.msdn.com/b/vcblog/archive/2013/07/19/c99-library-support-in-visual-studio-2013.aspx|publisher=Visual C++ Team Blog|accessdate=14 November 2013}}</ref>
|C99 is not supported as of Visual C++ 2012.<ref>[http://herbsutter.com/2012/05/03/reader-qa-what-about-vc-and-c99/ Reader Q&A: What about VC++ and C99? « Sutter’s Mill]</ref><ref>[http://msdn.microsoft.com/en-us/library/zb1574zs%28v=VS.100%29.aspx A.27 Use of C99 Variable Length Arrays]</ref><ref>[http://www.infoq.com/news/2012/05/vs_c99_support Microsoft to C99 Developers: Use ISO C]</ref> Visual C++ 2013 implements support for most of C99 by utilizing libraries from Dinkumware.<ref>http://blogs.msdn.com/b/vcblog/archive/2013/06/28/c-11-14-stl-features-fixes-and-breaking-changes-in-vs-2013.aspx</ref>
|-
| [[Open Watcom]]
| {{partial}}
| Implements the most-used parts of the standard. However, they are enabled only through an undocumented command-line switch.<ref>{{Cite web|url=http://www.openwatcom.org/index.php/C99_Compliance |title=C99 compliance in Open Watcom |accessdate=11 March 2009}}</ref>
|-
| [[Pelles C]]
| {{yes|Full}}
| Supports all C99 features.<ref>{{Cite web|url=http://www.smorgasbordet.com/pellesc/ |title=Pelles C Overview |date=January 2013}}</ref>
|-
| [[Portable C compiler]]
| {{partial}}
| Working towards becoming C99-compliant.{{citation needed|date=April 2012}}
|-
| [[Sun Studio (software)|Sun Studio]]
| {{yes|Full}}<ref>{{Cite web|url=http://docs.oracle.com/cd/E19205-01/820-4155/c.html#about |title=Sun Studio 12: C Compiler 5.9 Readme |publisher=Sun Microsystems, Inc. |date=31 May 2007 |accessdate=23 September 2012}}</ref>
|
|-
| The [[Amsterdam Compiler Kit]]
| {{no}}
| A C99 frontend is currently under investigation.
|-
| [[Tiny C Compiler]]
| {{partial}}
| Does not support complex numbers.<ref>[http://bellard.org/tcc/tcc-doc.html#SEC7 Tiny C Compiler Reference Documentation]</ref><ref>According to the  project's [http://repo.or.cz/w/tinycc.git/blob/HEAD:/TODO TODO list] complex types are the only missing C99 feature. Variable Length Arrays have been added in TCC 0.9.26 [http://bellard.org/tcc/]</ref> The developers state that "TCC is heading toward full ISOC99 compliance".<ref>[http://bellard.org/tcc/ TCC : Tiny C Compiler]</ref>
|-
| [[vbcc]]
| {{partial}}
|
|}
<!-- Included in MinGW are extensions to the Microsoft Visual C++ runtime library to support C99 functionality.[ Given the above statement from the MinGW listing, shouldn't MinGW be included in the above list? -->
 
==Future work==
Since ratification of the 1999 C standard, the standards working group prepared technical reports specifying improved support for embedded processing, additional character data types ([[Unicode]] support), and library functions with improved [[bounds checking]].  Work continues on technical reports addressing decimal [[floating point]], additional mathematical [[special functions]], and additional [[dynamic memory allocation]] functions.  The C and C++ standards committees have been collaborating on specifications for [[Thread (computer programming)|threaded]] programming.
 
The next revision of the C standard, [[C11 (C standard revision)|C11]], was ratified in 2011. The C standards committee adopted guidelines that limited the adoption of new features that have not been tested by existing implementations.  Much effort went into developing a [[memory model (programming)|memory model]], in order to clarify [[sequence point]]s and to support [[Thread (computer programming)|threaded]] programming.
 
==See also==
* [[C11 (C standard revision)|C11]]
* [[C++11]]
* [[C++ Technical Report 1]]
* [[Floating point]] for further discussion of usage of IEEE 754 hardware
 
==References==
{{Reflist|30em}}
 
==Further reading==
* {{cite journal|last=Cheng|first=Harry|title=C99 & Numeric computing|journal=[[Dr. Dobb's Journal]]|url=http://drdobbs.com/cpp/184404993|date=1 March 2002}}
* {{cite web|url=http://www.ibm.com/developerworks/library/l-c99.html|title=Open source development using C99|last=Seebach|first=Peter|date=24 March 2004|work=developerWorks|publisher=[[IBM]]}}
 
==External links==
* {{PDFlink|[http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf Final version of the C99 standard with corrigenda TC1, TC2, and TC3 included, formatted as a draft]|3.61&nbsp;MB}}
* [http://www.open-std.org/jtc1/sc22/wg14/www/newinc9x.htm New in C9X]
* [http://www.kuro5hin.org/story/2001/2/23/194544/139 Kuro5hin: Are you Ready For C99?]
 
{{S-start}}
{{S-bef| before = [[C89 (C version)|C89 / C90 / "ANSI C"]]}}
{{S-ttl| title=[[C (programming language)|C language]] standards}}
{{S-aft| after = [[C11 (C standard revision)|C11]]}}
{{end}}
 
{{CProLang}}
 
{{use dmy dates|date=January 2012}}
 
<!--Categories-->
[[Category:C programming language]]
[[Category:Programming language standards]]
[[Category:Unix programming tools]]
 
[[bg:C (език за програмиране)#C99]]

Latest revision as of 21:07, 15 November 2014

Hello! My name is Harley.
It is a little about myself: I live in Austria, my city of Haslau.
It's called often Northern or cultural capital of . I've married 2 years ago.
I have 2 children - a son (Karolin) and the daughter (Kayla). We all like Baseball.

Also visit my web site recruit