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

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

?? softfloat.c

?? 是關于linux2.5.1的完全源碼
?? 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;   	    mov %0, %1, asl #31;   	    orr %0, %2, asl #23;   	    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一区二区三区免费野_久草精品视频
极品美女销魂一区二区三区 | 欧美aa在线视频| 亚洲黄色小说网站| 亚洲视频免费在线观看| 国产精品久久久久影视| 欧美国产精品一区二区三区| 国产亚洲欧洲一区高清在线观看| 日韩精品中文字幕在线不卡尤物| 欧美日韩精品一区视频| 欧美精品久久久久久久久老牛影院| 欧美在线制服丝袜| 欧美视频日韩视频| 欧美日韩色综合| 欧美一级黄色录像| 日韩欧美一二三四区| 欧美一个色资源| 777奇米成人网| 制服丝袜中文字幕亚洲| 555夜色666亚洲国产免| 在线观看91av| 4438x亚洲最大成人网| 欧美一区二区免费视频| 欧美tk—视频vk| 久久一日本道色综合| 国产三级一区二区| 国产精品久99| 亚洲精品免费视频| 午夜影视日本亚洲欧洲精品| 免费成人在线播放| 国产精品资源在线观看| 成年人国产精品| 欧美中文字幕一区二区三区| 日韩视频不卡中文| 国产精品美女久久久久久久久 | 国产毛片精品一区| 东方欧美亚洲色图在线| 91麻豆国产福利在线观看| 欧美色综合影院| 欧美一区二区三区日韩| 精品国产乱码久久久久久久久| 国产亚洲一区字幕| 亚洲日本电影在线| 日韩av一区二区三区| 国产在线看一区| 91伊人久久大香线蕉| 欧美群妇大交群中文字幕| 精品国产伦一区二区三区观看体验| 久久久久久久久一| 亚洲伊人伊色伊影伊综合网| 久久爱www久久做| 97精品国产97久久久久久久久久久久| 欧美性猛片aaaaaaa做受| 久久综合精品国产一区二区三区| 国产91综合一区在线观看| 日韩高清国产一区在线| 国产福利91精品一区| 日本电影欧美片| 精品国产乱码久久久久久1区2区| 日韩一区日韩二区| 麻豆成人综合网| a美女胸又www黄视频久久| 欧美美女直播网站| 国产欧美一区二区精品婷婷| 亚洲成人精品一区二区| 高清在线不卡av| 欧美日韩日日夜夜| 国产精品久久久久久久久搜平片| 一区二区三区四区不卡视频 | 在线成人小视频| 日韩毛片在线免费观看| 精品亚洲国内自在自线福利| 欧美主播一区二区三区| 欧美国产日韩一二三区| 日韩福利视频导航| 在线观看免费视频综合| 中文字幕一区二区三区蜜月| 韩国三级中文字幕hd久久精品| 欧美中文字幕一区二区三区| 日本一区二区成人| 激情综合一区二区三区| 欧美高清性hdvideosex| 亚洲激情一二三区| 99久久精品国产观看| 久久久久久日产精品| 麻豆精品久久久| 欧美人妇做爰xxxⅹ性高电影| 亚洲天堂免费在线观看视频| 国产v综合v亚洲欧| 久久女同精品一区二区| 蜜桃视频在线观看一区二区| 欧美中文一区二区三区| 亚洲视频网在线直播| 成人免费看的视频| 久久久国产午夜精品| 激情成人午夜视频| 欧美成人vps| 日本成人在线一区| 91精品欧美久久久久久动漫| 亚洲一区二区三区四区不卡| 91免费视频大全| 国产精品福利影院| 99re热这里只有精品免费视频| 国产亚洲午夜高清国产拍精品| 极品尤物av久久免费看| 欧美成人r级一区二区三区| 日韩av网站免费在线| 7777精品久久久大香线蕉| 亚洲图片欧美色图| 欧美日韩第一区日日骚| 午夜精品福利在线| 欧美精品第一页| 蜜臀av性久久久久av蜜臀妖精| 日韩欧美美女一区二区三区| 久久精工是国产品牌吗| 精品少妇一区二区三区视频免付费| 蜜臀久久99精品久久久久久9| 欧美xxx久久| 精品一二三四区| 国产亚洲精品bt天堂精选| 福利一区福利二区| 国产精品国产三级国产专播品爱网 | 裸体在线国模精品偷拍| 亚洲精品一区二区三区影院| 国产成人午夜视频| 亚洲视频在线观看三级| 欧美亚洲国产bt| 日韩黄色免费电影| 欧美不卡一区二区三区四区| 国产麻豆精品95视频| 国产精品每日更新| 91黄色免费看| 日本成人在线不卡视频| 久久先锋影音av| 不卡视频在线看| 亚洲风情在线资源站| 精品日韩99亚洲| 成人av先锋影音| 亚洲高清视频在线| 欧美成人r级一区二区三区| 国产夫妻精品视频| 亚洲在线视频免费观看| 精品乱人伦一区二区三区| 国产成人精品亚洲777人妖 | 成人app网站| 午夜精品福利在线| 国产日韩欧美高清在线| 色偷偷成人一区二区三区91| 免费高清不卡av| 成人欧美一区二区三区白人| 91精品国产综合久久久蜜臀图片| 国产在线播放一区三区四| 一级特黄大欧美久久久| 精品国产一区二区在线观看| 99re这里只有精品首页| 日本网站在线观看一区二区三区 | 欧美一区二区视频观看视频 | 日韩免费视频一区| 99久久精品国产一区| 免费成人性网站| 亚洲三级在线看| 日韩一区二区高清| 国产精品一区二区91| 亚洲第一主播视频| 国产精品蜜臀在线观看| 日韩午夜在线观看| 色天使久久综合网天天| 国产一区二区视频在线| 亚洲丰满少妇videoshd| 国产精品午夜春色av| 日韩三级高清在线| 欧美性xxxxxx少妇| 国产成人av电影在线| 日韩 欧美一区二区三区| 亚洲色图在线视频| 久久精品欧美一区二区三区不卡| 欧美精品三级在线观看| 97精品久久久久中文字幕| 国产精品原创巨作av| 亚洲成av人片在线| 亚洲精品国产a久久久久久| 日本一区二区动态图| 欧美精品一区二区三区高清aⅴ| 欧美酷刑日本凌虐凌虐| 91福利视频久久久久| 99热在这里有精品免费| 国产高清在线精品| 久久精品国产亚洲高清剧情介绍| 亚洲电影第三页| 一区二区三区美女| 国产精品午夜在线观看| 久久精品人人做| 久久免费午夜影院| 久久综合久久鬼色中文字| 日韩一二在线观看| 欧美欧美午夜aⅴ在线观看| 在线视频欧美区| 色婷婷综合中文久久一本| 91亚洲国产成人精品一区二区三 | 日韩1区2区3区| 视频在线观看一区二区三区|