亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? softfloat.c

?? linux-2.4.29操作系統(tǒng)的源碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
/*===============================================================================This C source file is part of the SoftFloat IEC/IEEE Floating-pointArithmetic Package, Release 2.Written by John R. Hauser.  This work was made possible in part by theInternational Computer Science Institute, located at Suite 600, 1947 CenterStreet, Berkeley, California 94704.  Funding was partially provided by theNational Science Foundation under grant MIP-9311980.  The original versionof this code was written as part of a project to build a fixed-point vectorprocessor in collaboration with the University of California at Berkeley,overseen by Profs. Nelson Morgan and John Wawrzynek.  More informationis available through the web page `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/softfloat.html'.THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable efforthas been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL ATTIMES RESULT IN INCORRECT BEHAVIOR.  USE OF THIS SOFTWARE IS RESTRICTED TOPERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANYAND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE.Derivative works are acceptable, even for commercial purposes, so long as(1) they include prominent notice that the work is derivative, and (2) theyinclude prominent notice akin to these three paragraphs for those parts ofthis code that are retained.===============================================================================*/#include "fpa11.h"//#include "milieu.h"//#include "softfloat.h"/*-------------------------------------------------------------------------------Floating-point rounding mode, extended double-precision rounding precision,and exception flags.-------------------------------------------------------------------------------*/int8 float_rounding_mode = float_round_nearest_even;int8 floatx80_rounding_precision = 80;int8 float_exception_flags;/*-------------------------------------------------------------------------------Primitive arithmetic functions, including multi-word arithmetic, anddivision and square root approximations.  (Can be specialized to target ifdesired.)-------------------------------------------------------------------------------*/#include "softfloat-macros"/*-------------------------------------------------------------------------------Functions and definitions to determine:  (1) whether tininess for underflowis detected before or after rounding by default, (2) what (if anything)happens when exceptions are raised, (3) how signaling NaNs are distinguishedfrom quiet NaNs, (4) the default generated quiet NaNs, and (5) how NaNsare propagated from function inputs to output.  These details are target-specific.-------------------------------------------------------------------------------*/#include "softfloat-specialize"/*-------------------------------------------------------------------------------Takes a 64-bit fixed-point value `absZ' with binary point between bits 6and 7, and returns the properly rounded 32-bit integer corresponding to theinput.  If `zSign' is nonzero, the input is negated before being convertedto an integer.  Bit 63 of `absZ' must be zero.  Ordinarily, the fixed-pointinput is simply rounded to an integer, with the inexact exception raised ifthe input cannot be represented exactly as an integer.  If the fixed-pointinput is too large, however, the invalid exception is raised and the largestpositive or negative integer is returned.-------------------------------------------------------------------------------*/static int32 roundAndPackInt32( flag zSign, bits64 absZ ){    int8 roundingMode;    flag roundNearestEven;    int8 roundIncrement, roundBits;    int32 z;    roundingMode = float_rounding_mode;    roundNearestEven = ( roundingMode == float_round_nearest_even );    roundIncrement = 0x40;    if ( ! roundNearestEven ) {        if ( roundingMode == float_round_to_zero ) {            roundIncrement = 0;        }        else {            roundIncrement = 0x7F;            if ( zSign ) {                if ( roundingMode == float_round_up ) roundIncrement = 0;            }            else {                if ( roundingMode == float_round_down ) roundIncrement = 0;            }        }    }    roundBits = absZ & 0x7F;    absZ = ( absZ + roundIncrement )>>7;    absZ &= ~ ( ( ( roundBits ^ 0x40 ) == 0 ) & roundNearestEven );    z = absZ;    if ( zSign ) z = - z;    if ( ( absZ>>32 ) || ( z && ( ( z < 0 ) ^ zSign ) ) ) {        float_exception_flags |= float_flag_invalid;        return zSign ? 0x80000000 : 0x7FFFFFFF;    }    if ( roundBits ) float_exception_flags |= float_flag_inexact;    return z;}/*-------------------------------------------------------------------------------Returns the fraction bits of the single-precision floating-point value `a'.-------------------------------------------------------------------------------*/INLINE bits32 extractFloat32Frac( float32 a ){    return a & 0x007FFFFF;}/*-------------------------------------------------------------------------------Returns the exponent bits of the single-precision floating-point value `a'.-------------------------------------------------------------------------------*/INLINE int16 extractFloat32Exp( float32 a ){    return ( a>>23 ) & 0xFF;}/*-------------------------------------------------------------------------------Returns the sign bit of the single-precision floating-point value `a'.-------------------------------------------------------------------------------*/#if 0	/* in softfloat.h */INLINE flag extractFloat32Sign( float32 a ){    return a>>31;}#endif/*-------------------------------------------------------------------------------Normalizes the subnormal single-precision floating-point value representedby the denormalized significand `aSig'.  The normalized exponent andsignificand are stored at the locations pointed to by `zExpPtr' and`zSigPtr', respectively.-------------------------------------------------------------------------------*/static void normalizeFloat32Subnormal( bits32 aSig, int16 *zExpPtr, bits32 *zSigPtr ){    int8 shiftCount;    shiftCount = countLeadingZeros32( aSig ) - 8;    *zSigPtr = aSig<<shiftCount;    *zExpPtr = 1 - shiftCount;}/*-------------------------------------------------------------------------------Packs the sign `zSign', exponent `zExp', and significand `zSig' into asingle-precision floating-point value, returning the result.  After beingshifted into the proper positions, the three fields are simply addedtogether to form the result.  This means that any integer portion of `zSig'will be added into the exponent.  Since a properly normalized significandwill have an integer portion equal to 1, the `zExp' input should be 1 lessthan the desired result exponent whenever `zSig' is a complete, normalizedsignificand.-------------------------------------------------------------------------------*/INLINE float32 packFloat32( flag zSign, int16 zExp, bits32 zSig ){#if 0   float32 f;   __asm__("@ packFloat32				\n\   	    mov %0, %1, asl #31				\n\   	    orr %0, %2, asl #23				\n\   	    orr %0, %3"   	    : /* no outputs */   	    : "g" (f), "g" (zSign), "g" (zExp), "g" (zSig)   	    : "cc");   return f;#else    return ( ( (bits32) zSign )<<31 ) + ( ( (bits32) zExp )<<23 ) + zSig;#endif }/*-------------------------------------------------------------------------------Takes an abstract floating-point value having sign `zSign', exponent `zExp',and significand `zSig', and returns the proper single-precision floating-point value corresponding to the abstract input.  Ordinarily, the abstractvalue is simply rounded and packed into the single-precision format, withthe inexact exception raised if the abstract input cannot be representedexactly.  If the abstract value is too large, however, the overflow andinexact exceptions are raised and an infinity or maximal finite value isreturned.  If the abstract value is too small, the input value is rounded toa subnormal number, and the underflow and inexact exceptions are raised ifthe abstract input cannot be represented exactly as a subnormal single-precision floating-point number.    The input significand `zSig' has its binary point between bits 30and 29, which is 7 bits to the left of the usual location.  This shiftedsignificand must be normalized or smaller.  If `zSig' is not normalized,`zExp' must be 0; in that case, the result returned is a subnormal number,and it must not require rounding.  In the usual case that `zSig' isnormalized, `zExp' must be 1 less than the ``true'' floating-point exponent.The handling of underflow and overflow follows the IEC/IEEE Standard forBinary Floating-point Arithmetic.-------------------------------------------------------------------------------*/static float32 roundAndPackFloat32( flag zSign, int16 zExp, bits32 zSig ){    int8 roundingMode;    flag roundNearestEven;    int8 roundIncrement, roundBits;    flag isTiny;    roundingMode = float_rounding_mode;    roundNearestEven = ( roundingMode == float_round_nearest_even );    roundIncrement = 0x40;    if ( ! roundNearestEven ) {        if ( roundingMode == float_round_to_zero ) {            roundIncrement = 0;        }        else {            roundIncrement = 0x7F;            if ( zSign ) {                if ( roundingMode == float_round_up ) roundIncrement = 0;            }            else {                if ( roundingMode == float_round_down ) roundIncrement = 0;            }        }    }    roundBits = zSig & 0x7F;    if ( 0xFD <= (bits16) zExp ) {        if (    ( 0xFD < zExp )             || (    ( zExp == 0xFD )                  && ( (sbits32) ( zSig + roundIncrement ) < 0 ) )           ) {            float_raise( float_flag_overflow | float_flag_inexact );            return packFloat32( zSign, 0xFF, 0 ) - ( roundIncrement == 0 );        }        if ( zExp < 0 ) {            isTiny =                   ( float_detect_tininess == float_tininess_before_rounding )                || ( zExp < -1 )                || ( zSig + roundIncrement < 0x80000000 );            shift32RightJamming( zSig, - zExp, &zSig );            zExp = 0;            roundBits = zSig & 0x7F;            if ( isTiny && roundBits ) float_raise( float_flag_underflow );        }    }    if ( roundBits ) float_exception_flags |= float_flag_inexact;    zSig = ( zSig + roundIncrement )>>7;    zSig &= ~ ( ( ( roundBits ^ 0x40 ) == 0 ) & roundNearestEven );    if ( zSig == 0 ) zExp = 0;    return packFloat32( zSign, zExp, zSig );}/*-------------------------------------------------------------------------------Takes an abstract floating-point value having sign `zSign', exponent `zExp',and significand `zSig', and returns the proper single-precision floating-point value corresponding to the abstract input.  This routine is just like`roundAndPackFloat32' except that `zSig' does not have to be normalized inany way.  In all cases, `zExp' must be 1 less than the ``true'' floating-point exponent.-------------------------------------------------------------------------------*/static float32 normalizeRoundAndPackFloat32( flag zSign, int16 zExp, bits32 zSig ){    int8 shiftCount;    shiftCount = countLeadingZeros32( zSig ) - 1;    return roundAndPackFloat32( zSign, zExp - shiftCount, zSig<<shiftCount );}/*-------------------------------------------------------------------------------Returns the fraction bits of the double-precision floating-point value `a'.-------------------------------------------------------------------------------*/INLINE bits64 extractFloat64Frac( float64 a ){    return a & LIT64( 0x000FFFFFFFFFFFFF );}/*-------------------------------------------------------------------------------Returns the exponent bits of the double-precision floating-point value `a'.-------------------------------------------------------------------------------*/INLINE int16 extractFloat64Exp( float64 a ){    return ( a>>52 ) & 0x7FF;}/*-------------------------------------------------------------------------------Returns the sign bit of the double-precision floating-point value `a'.-------------------------------------------------------------------------------*/#if 0	/* in softfloat.h */INLINE flag extractFloat64Sign( float64 a ){    return a>>63;}#endif/*-------------------------------------------------------------------------------Normalizes the subnormal double-precision floating-point value representedby the denormalized significand `aSig'.  The normalized exponent andsignificand are stored at the locations pointed to by `zExpPtr' and`zSigPtr', respectively.-------------------------------------------------------------------------------*/static void normalizeFloat64Subnormal( bits64 aSig, int16 *zExpPtr, bits64 *zSigPtr ){    int8 shiftCount;    shiftCount = countLeadingZeros64( aSig ) - 11;    *zSigPtr = aSig<<shiftCount;    *zExpPtr = 1 - shiftCount;}/*-------------------------------------------------------------------------------Packs the sign `zSign', exponent `zExp', and significand `zSig' into adouble-precision floating-point value, returning the result.  After beingshifted into the proper positions, the three fields are simply addedtogether to form the result.  This means that any integer portion of `zSig'will be added into the exponent.  Since a properly normalized significandwill have an integer portion equal to 1, the `zExp' input should be 1 lessthan the desired result exponent whenever `zSig' is a complete, normalizedsignificand.-------------------------------------------------------------------------------*/INLINE float64 packFloat64( flag zSign, int16 zExp, bits64 zSig ){    return ( ( (bits64) zSign )<<63 ) + ( ( (bits64) zExp )<<52 ) + zSig;}/*-------------------------------------------------------------------------------Takes an abstract floating-point value having sign `zSign', exponent `zExp',and significand `zSig', and returns the proper double-precision floating-point value corresponding to the abstract input.  Ordinarily, the abstractvalue is simply rounded and packed into the double-precision format, with

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产激情视频一区二区在线观看 | 久久国产精品色婷婷| 欧美一卡2卡3卡4卡| 美女视频网站黄色亚洲| 精品欧美一区二区久久 | 99re66热这里只有精品3直播 | 国产一区高清在线| 国产日韩av一区| 99精品视频一区| 亚洲成人免费影院| 日韩免费视频线观看| 国产一区二区三区蝌蚪| 18成人在线观看| 欧美三级三级三级爽爽爽| 裸体一区二区三区| 中文字幕乱码日本亚洲一区二区| 91在线精品秘密一区二区| 亚洲大尺度视频在线观看| 欧美草草影院在线视频| 成人免费高清在线| 亚洲成人自拍偷拍| 久久精品男人天堂av| 9i在线看片成人免费| 婷婷一区二区三区| 久久精品一区蜜桃臀影院| 色婷婷香蕉在线一区二区| 青草国产精品久久久久久| 国产三级久久久| 欧美性生活大片视频| 国内外精品视频| 一区二区三区在线视频观看 | 日韩一区二区三区四区| 国产精品一二二区| 亚洲国产美女搞黄色| 精品成人一区二区三区| 91麻豆成人久久精品二区三区| 日本午夜精品视频在线观看| 国产精品无圣光一区二区| 欧美色网站导航| 高清成人免费视频| 午夜精品久久久久久久久久久| 精品福利在线导航| 在线亚洲精品福利网址导航| 狠狠色狠狠色合久久伊人| 亚洲免费在线观看| 久久九九久久九九| 欧美日韩精品一区视频| 成人免费视频caoporn| 日韩电影在线免费看| 中文字幕一区二区三区不卡| 在线综合+亚洲+欧美中文字幕| 粉嫩久久99精品久久久久久夜| 五月婷婷久久综合| 国产精品不卡一区二区三区| 日韩一区二区麻豆国产| 一本久久a久久精品亚洲| 国产一区二区三区在线观看精品| 亚洲第一综合色| **网站欧美大片在线观看| 精品国产99国产精品| 欧美日韩国产区一| 91在线云播放| 国产大陆亚洲精品国产| 日本女人一区二区三区| 亚洲精品国产a| 国产精品无人区| 日韩色视频在线观看| 欧美视频日韩视频在线观看| 不卡在线观看av| 韩日精品视频一区| 秋霞成人午夜伦在线观看| 亚洲激情校园春色| 国产精品美女久久久久久久网站| 欧美大片日本大片免费观看| 欧美日韩成人在线| 91黄色免费看| 99r国产精品| 国产福利不卡视频| 国产专区综合网| 久久国产生活片100| 五月天亚洲婷婷| 亚洲综合色噜噜狠狠| 亚洲视频一区二区在线观看| 国产精品系列在线| 久久亚洲综合色| 精品国产一区二区三区久久影院 | 在线观看视频欧美| 色综合久久久久综合| 不卡一区在线观看| 成人午夜在线视频| 粉嫩绯色av一区二区在线观看| 国产一区三区三区| 国产综合成人久久大片91| 久久国产夜色精品鲁鲁99| 免费成人av资源网| 日韩av电影一区| 日本美女一区二区| 免费看欧美美女黄的网站| 热久久国产精品| 蜜桃视频在线一区| 久久国内精品视频| 经典三级视频一区| 国产在线国偷精品免费看| 国产一区二区三区在线观看免费视频| 看片的网站亚洲| 麻豆精品久久久| 精东粉嫩av免费一区二区三区| 久久aⅴ国产欧美74aaa| 激情五月婷婷综合| 国产成人自拍高清视频在线免费播放| 国产毛片精品视频| 国产成人在线视频网址| 成人一二三区视频| 99久久精品费精品国产一区二区| 99久久精品国产毛片| 日本电影欧美片| 欧美日韩的一区二区| 91精品国产色综合久久久蜜香臀| 3d动漫精品啪啪一区二区竹菊 | 日韩精品专区在线| 26uuu精品一区二区| 国产亚洲1区2区3区| 国产精品伦理一区二区| 自拍偷在线精品自拍偷无码专区 | 成人黄色大片在线观看| 99久久99久久精品免费看蜜桃 | 欧美日韩一区精品| 555www色欧美视频| 精品免费一区二区三区| 国产片一区二区| 亚洲天堂免费看| 亚洲成在人线在线播放| 久久精品国产澳门| 成人美女视频在线观看18| 91同城在线观看| 欧美日韩亚州综合| 欧美成人一区二区三区| 国产欧美一区二区在线| 伊人一区二区三区| 日韩综合小视频| 国产成人h网站| 在线观看成人免费视频| 日韩西西人体444www| 亚洲国产精品传媒在线观看| 亚洲人成7777| 蜜桃一区二区三区四区| 成人精品国产福利| 欧美日韩成人综合天天影院| 精品国产第一区二区三区观看体验| 国产精品美女久久久久久久久| 玉足女爽爽91| 激情五月婷婷综合| 色婷婷综合久久久中文一区二区| 91 com成人网| 欧美激情综合在线| 亚洲高清不卡在线| 国产精品小仙女| 欧美日韩一区视频| 国产亚洲综合在线| 亚洲一区二区欧美日韩 | 久久99国产精品麻豆| 99这里只有精品| 日韩一区二区三区在线视频| 中文字幕中文在线不卡住| 婷婷夜色潮精品综合在线| 国产传媒欧美日韩成人| 欧美美女一区二区在线观看| 国产日韩高清在线| 午夜精品久久一牛影视| 国v精品久久久网| 制服丝袜一区二区三区| 国产精品久久久久精k8| 免费高清在线视频一区·| 91色综合久久久久婷婷| 精品少妇一区二区三区在线视频| 亚洲精品美腿丝袜| 国产麻豆精品在线| 欧美日韩国产乱码电影| 国产精品久久99| 激情综合色综合久久综合| 在线观看成人小视频| 国产日韩欧美精品在线| 日本不卡免费在线视频| 一本到不卡免费一区二区| 久久久久久99精品| 热久久免费视频| 91精品福利在线| 亚洲国产成人午夜在线一区| 免费观看久久久4p| 在线免费观看一区| 中文一区二区在线观看| 日本欧美一区二区在线观看| 色8久久精品久久久久久蜜| 国产欧美一区二区精品性色| 日韩激情av在线| 色婷婷综合在线| 中文字幕一区二区三区四区不卡| 久久成人久久鬼色| 欧美精品乱人伦久久久久久| 椎名由奈av一区二区三区|