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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? softfloat.c

?? linux-2.6.15.6
?? 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'.-------------------------------------------------------------------------------*/INLINE flag extractFloat32Sign( float32 a ){    return a>>31;}/*-------------------------------------------------------------------------------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'.-------------------------------------------------------------------------------*/INLINE flag extractFloat64Sign( float64 a ){    return a>>63;}/*-------------------------------------------------------------------------------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, 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 to

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
av在线不卡电影| 久久精品国产999大香线蕉| www.亚洲色图.com| 中文字幕一区二区日韩精品绯色| 成人成人成人在线视频| 中文字幕制服丝袜成人av| 不卡的看片网站| 亚洲日本va在线观看| 在线观看av一区二区| 日本sm残虐另类| 久久日韩粉嫩一区二区三区| 国产成人av电影在线| 中文字幕av一区二区三区高| 在线精品视频一区二区| 偷窥国产亚洲免费视频| 欧美xingq一区二区| 波多野结衣视频一区| 亚洲午夜精品在线| 精品免费日韩av| 成人国产视频在线观看| 亚洲精品第1页| 日韩精品一区二区三区视频在线观看| 国产一区二三区| 亚洲欧美一区二区久久| 日韩欧美一级精品久久| 波多野结衣中文字幕一区二区三区 | 欧美丰满嫩嫩电影| 午夜在线成人av| 国产欧美日本一区二区三区| 欧美午夜一区二区三区免费大片| 精品综合免费视频观看| 亚洲视频狠狠干| 日韩欧美国产高清| 色婷婷综合久久久中文字幕| 久久99精品国产麻豆不卡| 亚洲视频1区2区| 精品久久久久久最新网址| 91原创在线视频| 狠狠色丁香久久婷婷综合丁香| 亚洲女与黑人做爰| 精品国产一二三| 欧美日本一区二区三区四区| 成人性视频免费网站| 日本免费在线视频不卡一不卡二| 国产精品动漫网站| 2020国产成人综合网| 欧美日韩国产天堂| 色婷婷久久久亚洲一区二区三区 | 亚洲人成电影网站色mp4| 欧美一区二区久久久| 在线观看视频一区二区| 成人免费毛片片v| 久久黄色级2电影| 天天色综合天天| 亚洲综合激情小说| 亚洲欧美在线视频| 国产欧美日韩激情| 久久久91精品国产一区二区精品 | 久久网站热最新地址| 91麻豆精品国产91久久久资源速度 | 久久爱另类一区二区小说| 亚洲国产欧美一区二区三区丁香婷| 欧美国产日韩a欧美在线观看 | 久久久久久免费网| 日韩欧美久久一区| 91精品婷婷国产综合久久性色| 欧美在线影院一区二区| 99re热这里只有精品免费视频| 国产精品系列在线观看| 麻豆一区二区三区| 日韩av在线发布| 蜜臂av日日欢夜夜爽一区| 一区二区三区精品久久久| 亚洲精选视频在线| 亚洲精品成a人| 亚洲制服丝袜av| 亚洲成人资源网| 奇米一区二区三区av| 久久成人免费电影| 九色|91porny| 久久激情综合网| 精品一区二区三区欧美| 国精产品一区一区三区mba桃花| 日韩国产在线观看一区| 日本亚洲免费观看| 九九在线精品视频| 国产成人精品一区二| 成人在线一区二区三区| 不卡的av在线| 欧美日韩一区二区三区在线看| 欧洲人成人精品| 69av一区二区三区| 国产亚洲成aⅴ人片在线观看| 国产精品人成在线观看免费| 亚洲欧美日韩国产综合| 亚洲国产精品一区二区www在线| 午夜精品久久久久久久| 久久精品国产亚洲a| 粉嫩高潮美女一区二区三区| 99国产精品久久久久久久久久| 欧洲一区二区三区免费视频| 欧美一区二区三区爱爱| 国产网红主播福利一区二区| 1024国产精品| 性做久久久久久免费观看 | 久久精品人人做人人综合| 国产精品欧美一级免费| 亚洲网友自拍偷拍| 国产在线视视频有精品| 99久久精品免费看| 欧美一区二区啪啪| 国产精品麻豆久久久| 亚洲一二三级电影| 国产精品一级黄| 欧美中文字幕一区二区三区亚洲| 日韩欧美一区二区三区在线| 成人免费在线视频观看| 视频在线观看91| 成人免费视频网站在线观看| 欧美日韩视频专区在线播放| www一区二区| 午夜欧美一区二区三区在线播放| 精品一区二区三区久久久| 色综合咪咪久久| 久久综合国产精品| 亚洲一二三区视频在线观看| 国产精品一品视频| 7777精品久久久大香线蕉| 国产精品福利在线播放| 麻豆精品久久精品色综合| 99精品国产一区二区三区不卡| 日韩一区二区在线观看视频| 亚洲欧洲美洲综合色网| 精品一区二区三区日韩| 欧美亚洲一区二区在线| 国产女同性恋一区二区| 麻豆精品新av中文字幕| 日本二三区不卡| 中文字幕av免费专区久久| 久久精品免费观看| 欧美久久高跟鞋激| 亚洲宅男天堂在线观看无病毒| 成人毛片视频在线观看| 欧美一级在线免费| 亚洲电影一区二区| 色婷婷久久综合| 国产精品久久久久久久久免费相片| 麻豆精品一区二区| 91麻豆精品国产自产在线| 亚洲精品大片www| 99久久国产免费看| 亚洲国产精华液网站w| 国内精品国产成人国产三级粉色| 日韩一级片网站| 日韩av网站在线观看| 欧美色网站导航| 一区二区三区产品免费精品久久75| 丁香婷婷综合激情五月色| 欧美第一区第二区| 精品影视av免费| 欧美一个色资源| 日本成人在线一区| 日韩欧美视频一区| 日本亚洲免费观看| 欧美电影免费观看完整版| 美女网站视频久久| 日韩精品一区二区三区视频| 九九九久久久精品| 久久久久久久av麻豆果冻| 狠狠狠色丁香婷婷综合激情| 精品日韩欧美在线| 国产美女在线观看一区| 久久久久国产精品厨房| 国产馆精品极品| 国产三级欧美三级| 高清不卡在线观看| 国产精品久久久久久久久久久免费看 | 欧美一区二区在线免费观看| 日本亚洲欧美天堂免费| 精品日韩欧美一区二区| 国产酒店精品激情| 国产精品高清亚洲| 欧美网站一区二区| 蜜臀av亚洲一区中文字幕| 久久久久久一二三区| 成人午夜精品在线| 亚洲人成小说网站色在线| 精品视频在线免费看| 免费在线观看一区二区三区| 精品国产3级a| 91丨porny丨国产入口| 亚洲国产成人高清精品| 精品日韩欧美在线| av日韩在线网站| 天堂影院一区二区| 久久综合五月天婷婷伊人| 成人一区二区三区视频| 亚洲国产cao| 日韩精品一区二区三区视频| 不卡大黄网站免费看|