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

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

?? softfloat.c

?? linux-2.4.29操作系統(tǒng)的源碼
?? C
?? 第 1 頁 / 共 5 頁
字號(hào):
/*===============================================================================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

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
2023国产精品视频| 色噜噜狠狠色综合中国| 亚洲精品一区二区在线观看| 日韩1区2区3区| 日韩一区二区高清| 久久99久久99精品免视看婷婷| 欧美成人精精品一区二区频| 国产在线精品不卡| 国产精品免费视频一区| av亚洲精华国产精华| 一区二区三国产精华液| 欧美精品久久天天躁| 麻豆91精品91久久久的内涵| 久久麻豆一区二区| 91麻豆免费在线观看| 亚洲第一福利视频在线| 精品国产亚洲在线| 99麻豆久久久国产精品免费 | 成人av第一页| 亚洲免费毛片网站| 欧美不卡视频一区| 91麻豆国产福利在线观看| 亚洲午夜视频在线| 精品入口麻豆88视频| 成人久久久精品乱码一区二区三区| 亚洲免费在线视频| 欧美成人精品1314www| kk眼镜猥琐国模调教系列一区二区| 亚洲女爱视频在线| 日韩免费看的电影| 91欧美一区二区| 久久成人18免费观看| 日韩美女久久久| 日韩三级视频在线看| gogogo免费视频观看亚洲一| 婷婷一区二区三区| 亚洲天堂精品视频| 日韩亚洲欧美成人一区| 91在线播放网址| 狠狠色狠狠色综合系列| 亚洲精品成人悠悠色影视| 精品国产3级a| 欧美日韩国产首页在线观看| 丁香一区二区三区| 极品尤物av久久免费看| 亚洲风情在线资源站| 中文字幕一区在线观看视频| 91精品国产高清一区二区三区蜜臀| 99久久精品99国产精品| 国产黄色精品视频| 麻豆91免费观看| 日日夜夜精品免费视频| 亚洲欧美电影院| 国产精品视频第一区| 日韩三级视频中文字幕| 欧美欧美欧美欧美| 在线观看精品一区| 成人精品一区二区三区中文字幕 | 精品日韩在线一区| 欧美性色综合网| k8久久久一区二区三区| 国产精品99久久不卡二区| 麻豆成人综合网| 日韩激情一二三区| 亚洲va韩国va欧美va| 一区二区在线电影| 亚洲精品伦理在线| 亚洲欧洲中文日韩久久av乱码| 日本一区二区免费在线| 久久久久久久免费视频了| 欧美一区二区三区四区五区| 欧美日韩视频第一区| 欧美日韩国产一级片| 欧美日韩精品一区二区| 欧美日韩中文字幕精品| 欧美亚洲图片小说| 欧美美女一区二区在线观看| 欧美人与禽zozo性伦| 欧美在线高清视频| 欧美日韩一区在线| 欧美日本精品一区二区三区| 欧美日韩黄色一区二区| 91天堂素人约啪| 欧美色综合网站| 欧美精品第一页| 精品三级在线看| 久久久久久久综合| ㊣最新国产の精品bt伙计久久| 国产三级欧美三级日产三级99 | 国产美女精品一区二区三区| 国产毛片精品视频| 从欧美一区二区三区| 99精品桃花视频在线观看| 色综合色综合色综合色综合色综合 | 精品福利一区二区三区| 久久综合久久综合亚洲| 欧美激情在线看| 亚洲男人天堂av网| 偷偷要91色婷婷| 久久精品国产秦先生| 国产精品中文欧美| 99精品在线免费| 5566中文字幕一区二区电影| 精品国产乱码久久久久久久| 日本一区二区三级电影在线观看| 亚洲青青青在线视频| 日韩1区2区3区| 国产精品一区二区三区网站| 99国产欧美另类久久久精品| 欧美日本乱大交xxxxx| 久久日韩精品一区二区五区| 中文字幕在线播放不卡一区| 香港成人在线视频| 国产成人在线色| 欧美视频在线一区| 欧美精品一区二区三区蜜桃视频| 中文av一区特黄| 日韩高清在线一区| 99久久99久久精品国产片果冻| 91精品久久久久久久99蜜桃| 国产日韩欧美亚洲| 婷婷六月综合亚洲| 99综合电影在线视频| 日韩一区二区影院| 中文字幕一区二区在线观看| 婷婷综合另类小说色区| 成人av资源下载| 日韩午夜在线观看视频| 亚洲蜜臀av乱码久久精品| 日韩av网站在线观看| 一本一本久久a久久精品综合麻豆| 91 com成人网| 亚洲免费在线观看| 成人精品电影在线观看| 69堂精品视频| 亚洲欧美国产三级| 国产成人精品免费一区二区| 欧美人妖巨大在线| 一区二区三区日韩欧美| 国产成+人+日韩+欧美+亚洲| 欧美美女一区二区在线观看| 亚洲另类在线制服丝袜| 成人美女在线观看| 久久久久久久久久久久久久久99 | 成人18精品视频| 久久综合九色综合久久久精品综合| 亚洲成国产人片在线观看| bt欧美亚洲午夜电影天堂| 精品av久久707| 蜜臀av亚洲一区中文字幕| 欧美日韩一区二区在线观看| 国产精品久久夜| 国产电影精品久久禁18| 精品国产亚洲在线| 另类调教123区| 91麻豆精品国产自产在线观看一区 | 99riav久久精品riav| 久久精品人人做人人爽人人| 奇米色777欧美一区二区| 欧美日韩免费电影| 亚洲国产日韩a在线播放| 99久久婷婷国产综合精品| 久久先锋影音av鲁色资源网| 蜜桃av一区二区在线观看 | 日韩欧美色综合网站| 日韩中文字幕av电影| 欧美精品在线一区二区三区| 亚洲一卡二卡三卡四卡无卡久久 | 亚洲国产日韩精品| 精品污污网站免费看| 亚洲国产视频a| 欧美高清dvd| 日韩影院在线观看| 欧美三级视频在线观看| 亚洲成人黄色影院| 欧美精品久久久久久久多人混战 | 激情综合五月婷婷| 久久久久久毛片| 波波电影院一区二区三区| 亚洲色图清纯唯美| 欧美亚洲高清一区二区三区不卡| 丝袜诱惑亚洲看片| 欧美成人精品福利| 成人福利视频网站| 亚洲一区免费视频| 欧美一区二区观看视频| 国内精品伊人久久久久av影院| 久久精品人人做人人综合| 91在线观看高清| 日本一区中文字幕| 久久精品亚洲精品国产欧美| 97精品国产97久久久久久久久久久久| 亚洲天堂2016| 制服丝袜激情欧洲亚洲| 国内成人免费视频| 亚洲视频一区在线| 欧美一级艳片视频免费观看| 国产精品综合在线视频| 亚洲精品高清在线| 亚洲精品一区在线观看|