سي99

C99 (المعروف سابقًا باسم C9X ) هو اسم غير رسمي لـ ISO / IEC 9899: 1999، وهو إصدار سابق من معيار لغة البرمجة C. [1] يمتد الإصدار السابق (C90) بميزات جديدة للغة والمكتبة القياسية، ويساعد التطبيقات على الاستفادة بشكل أفضل من أجهزة الكمبيوتر المتاحة، مثل حساب الفاصلة العائمة IEEE 754-1985 وتقنية المترجم. [2] يحل إصدار C11 من معيار لغة البرمجة C، الذي تم نشره في عام 2011، محل C99.

مثال

يوضح المثال التالي المشروح من كود C99 لحساب دالة الكسر المستمر الميزات الرئيسية:

#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) // [1]
{
    #pragma STDC FENV_ACCESS ON // [2]

    assert(FLT_EVAL_METHOD == 2); // [3]

    if (isnan(z)) // [4]
        puts("z is not a number");

    if (isinf(z))
        puts("z is infinite");

    long double r = 7.0 - 3.0/(z - 2.0 - 1.0/(z - 7.0 + 10.0/(z - 2.0 - 2.0/(z - 3.0)))); // [5, 6]

    feclearexcept(FE_DIVBYZERO); // [7]

    bool raised = fetestexcept(FE_OVERFLOW); // [8]

    if (raised)
        puts("Unanticipated overflow.");

    return r;
}

int main(void)
{
    #ifndef __STDC_IEC_559__
    puts("Warning: __STDC_IEC_559__ not defined. IEEE 754 floating point not fully supported."); // [9]
    #endif

    #pragma STDC FENV_ACCESS ON

    #ifdef TEST_NUMERIC_STABILITY_UP
    fesetround(FE_UPWARD);          // [10]
    #elif TEST_NUMERIC_STABILITY_DOWN
    fesetround(FE_DOWNWARD);
    #endif

    printf("%.7g\n", compute_fn(3.0));
    printf("%.7g\n", compute_fn(NAN));

    return 0;
}

انظر أيضًا

  • C18 ، C11 ، ANSI C ، إصدارات من لغة البرمجة C.
  • C ++ 17 ، C ++ 14 ، C ++ 11 ، C ++ 03 ، C ++ 98 ، إصدارات من معيار لغة البرمجة C ++
  • النقطة العائمة ، لمزيد من المناقشة حول استخدام أجهزة IEEE 754

المراجع

  1. ^ "ISO/IEC 9899:1999 - Programming languages - C". Iso.org. 8 ديسمبر 2011. مؤرشف من الأصل في 2016-10-10. اطلع عليه بتاريخ 2014-04-08.
  2. ^ http://grouper.ieee.org/groups/754/meeting-materials/2001-07-18-c99.pdf نسخة محفوظة 2017-06-22 على موقع واي باك مشين.

قراءة متعمقة

روابط خارجية

سبقه
'


تبعه

Read other articles:

此條目可参照英語維基百科相應條目来扩充。 (2021年5月6日)若您熟悉来源语言和主题,请协助参考外语维基百科扩充条目。请勿直接提交机械翻译,也不要翻译不可靠、低品质内容。依版权协议,译文需在编辑摘要注明来源,或于讨论页顶部标记{{Translated page}}标签。 约翰斯顿环礁Kalama Atoll 美國本土外小島嶼 Johnston Atoll 旗幟颂歌:《星條旗》The Star-Spangled Banner約翰斯頓環礁地…

Pérylène   Structure du pérylène Identification Nom UICPA Pérylène No CAS 198-55-0 No ECHA 100.005.365 No CE 205-900-9 PubChem 9142 SMILES c1ccc5cccc4c5c1c2cccc3cccc4c23 PubChem, vue 3D InChI InChI : vue 3D InChI=1/C20H12/c1-5-13-6-2-11-17-18-12-4-8-14-7-3-10-16(20(14)18)15(9-1)19(13)17/h1-12H Propriétés chimiques Formule C20H12  [Isomères]C20H12 Masse molaire[2] 252,309 3 ± 0,016 8 g/mol C 95,21 %, H 4,79…

John GibsonJohn Gibson karya Margaret Sarah CarpenterLahir(1790-06-19)19 Juni 1790Conwy, WalesMeninggal27 Januari 1866(1866-01-27) (umur 75)Rome, ItaliaKebangsaanWalesDikenal atasPatungKarya terkenalQueen Victoria Supported by Justice and Clemency (1855); Hunter and dog (1838) Paris karya John Gibson RSA 1824 John Gibson (19 Juni 1790 – 27 Januari 1866) adalah seorang pematung Neoklasik Wales yang menjalani kebanyakan masa kariernya di Italia. Kehidupan Kehidupan awal Detail patung Willia…

Sailing at the Olympics Sailingat the Games of the XIX OlympiadVenuesClub de Yates de AcapulcoDatesFirst race: 14 October 1968 (1968-10-14)Last race: 21 October 1968 (1968-10-21)Competitors251 from 41 nationsBoats123← 19641972 → Sailing/Yachting is an Olympic sport starting from the Games of the 1st Olympiad (1896 Olympics) in Athens, Greece. With the exception of 1904 and the canceled 1916 Summer Olympics, sailing has always been inc…

2016年美國總統選舉 ← 2012 2016年11月8日 2020 → 538個選舉人團席位獲勝需270票民意調查投票率55.7%[1][2] ▲ 0.8 %   获提名人 唐納·川普 希拉莉·克林頓 政党 共和黨 民主党 家鄉州 紐約州 紐約州 竞选搭档 迈克·彭斯 蒂姆·凱恩 选举人票 304[3][4][註 1] 227[5] 胜出州/省 30 + 緬-2 20 + DC 民選得票 62,984,828[6] 65,853,514[6] 得…

Roman Catholic seminary in Rizal, Philippines St. John Paul II Minor SeminarySeminaryo Minor ng San Juan Pablo IIThe Minor Seminary of the Diocese of AntipoloLocationMaguey Road (near Empress Subdivision), Barangay San Luis, Antipolo, RizalPhilippinesCoordinates14°35′56″N 121°11′32″E / 14.59879°N 121.19227°E / 14.59879; 121.19227InformationTypePrivate Roman Catholicnon-profit Basic education institutionReligious affiliation(s)Roman Catholic Diocese of Antipolo…

المؤسسة العامة للخطوط الحديدية (SRO) المؤسسة العامة للخطوط الحديدية   تفاصيل الوكالة الحكومية البلد السعودية  تأسست 13 مايو 1966؛ منذ 58 سنة (1966-05-13) تم إنهاؤها 1 أبريل 2021 المركز الدمام،  السعودية   الشركة السعودية للخطوط الحديدية الإدارة موقع الويب الموقع الرس…

Genus of mammals (cats) For other uses, see Felis (disambiguation). FelisTemporal range: Piacenzian – Holocene 3.4–0 Ma PreꞒ Ꞓ O S D C P T J K Pg N ↓ The six wild Felis species; from top-left, clockwise: European wildcat (F. silvestris), jungle cat (F. chaus), African wildcat (F. lybica), black-footed cat (F. nigripes), sand cat (F. margarita), Chinese mountain cat (F. bieti) Scientific classification Domain: Eukaryota Kingdom: Animalia Phylum: Chordata Class: Mammalia Order: …

1998 single by Mike OldfieldMan in the RainSingle by Mike Oldfieldfrom the album Tubular Bells III Released5 October 1998 (1998-10-05)GenrePop rockLength4:01LabelWarnerSongwriter(s)Mike OldfieldProducer(s)Mike OldfieldMike Oldfield singles chronology Tubular X (1998) Man in the Rain (1998) Far Above the Clouds (1999) Man in the Rain is a pop rock song written and performed by English multi-instrumentalist Mike Oldfield. It was included on the album Tubular Bells III and released a…

Online-only direct bank This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Neobank – news · newspapers · books · scholar · JSTOR (March 2024) (Learn how and when to remove this message)Part of a series on financial servicesBanking Types of banks Advising Banq Bulge bracket Central Commercial Community development …

Defunct Chinese electronics conglomerate BBK Electronics CorporationNative name广东步步高电子工业有限公司Romanized nameGuangdong Bubugao Electronics Industry Co., Ltd.Company typePrivate[1]IndustryConsumer electronicsFounded18 September 1995; 28 years ago (1995-09-18)FounderDuan YongpingDefunctApril 7, 2023; 14 months ago (2023-04-07)FateDeregisteredSuccessorsOppoVivoHeadquartersFutian District, Shenzhen, ChinaArea servedWorldwideProductsS…

Pacifist Christian denomination (1920-) Seventh Day Adventist Reform MovementSeventh Day Adventist Reform Movement Church in Ruda Śląska, PolandClassificationProtestantOrientationAdventist, Arminian, Christian pacifistPolityModified presbyterian polityRegionWorldwide (132 countries)FounderGroups of Seventh-day Adventist in different countriesOrigin1925 Gotha, GermanySeparated fromSeventh-day Adventist ChurchMembers42,285Other name(s)Reformed Adventist Church (informal) The Seventh Day Adventis…

This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Trade justice – news · newspapers · books · scholar · JSTOR (December 2008) (Learn how and when to remove this message) Activists from Christian Aid lobbying for Trade Justice Trade justice is a campaign by non-governmental organisations, plus efforts by other act…

Народный Хурал (Парламент) Республики Калмыкия Тип Тип однопалатный парламент Руководство Председатель Артем Васильевич Михайлов, Единая Россия с 2023 Структура Членов 27 Фракции      Единая Россия (23)      КПРФ (2)      Справедливая Россия (1)   …

1938 film The Great and the Little LoveGermanDie große und die kleine Liebe Directed byJosef von BákyWritten byHeinrich OberländerProduced byEberhard KlagemannHelmut SchreiberStarringJenny JugoGustav FröhlichRudi GoddenMaria KoppenhöferCinematographyFriedl Behn-GrundEdited byWolfgang BeckerMusic byHans SommerProductioncompanyKlagemann-FilmDistributed byTobis FilmRelease date 29 April 1938 (1938-04-29) Running time82 minutesCountryGermanyLanguageGerman The Great and the Little…

نادي هلسنكي   تأسس عام 1907  الملعب ملعب سونيرا  البلد فنلندا  الدوري الدوري الفنلندي الممتاز  الموقع الرسمي الموقع الرسمي  تعديل مصدري - تعديل   نادي هلسنكي لكرة القدم (بالفنلندية: Helsingin Jalkapalloklubi) نادي كرة قدم فنلندي، مقره في العاصمة هلسنكي.[1][2][3] و…

Größenvergleich einiger der größten Schiffe Die Queen Mary 2 im Größenvergleich zur Titanic und zum Airbus A380 Die spätere TI Asia, Typschiff der größten Tanker der Erde In diesem Artikel sind die größten und längsten bisher gebauten Schiffe der Welt aufgelistet. Inhaltsverzeichnis 1 Die größten Schiffe nach Art 2 Schiffe mit herausragenden Abmessungen 3 Siehe auch 4 Literatur 5 Anmerkung und Einzelnachweise Die größten Schiffe nach Art Größte und längste Schiffe ihrer Art Ka…

Карта поселений вольсков (красный шрифт) Вольски (лат. Volsci) — народ группы италиков, умбро-сабельского происхождения, живший по соседству с латинами. Воинственные и свободолюбивые вольски занимались земледелием, рыболовством и морским грабежом; их столицы Суэсса Пом…

City in Pskov Oblast, Russia City in Pskov Oblast, RussiaPskov ПсковCity[1]From the top to bottom-right, Pskov Kremlin, Golden Quay, Church of Saint Basil of Caesarea, Pskov Academic Drama Theatre FlagCoat of armsLocation of Pskov PskovLocation of PskovShow map of Pskov OblastPskovPskov (European Russia)Show map of European RussiaPskovPskov (Europe)Show map of EuropeCoordinates: 57°49′N 28°20′E / 57.817°N 28.333°E / 57.817; 28.333CountryRussiaFederal …

Legislative branch of the state government of Illinois Illinois General AssemblyTypeTypeBicameral HousesSenateHouse of RepresentativesLeadershipPresident of the SenateDon Harmon (D) since January 19, 2020 Speaker of the HouseChris Welch (D) since January 13, 2021 StructureSeats177 voting members 59 senators 118 representatives State Senate political groups  Democratic (40)  Republican (19)House of Representatives political groups  Democratic (78)  Republican (40)Elect…