亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
国产河南妇女毛片精品久久久| 一区在线观看视频| 午夜av一区二区| 欧美色爱综合网| 视频一区中文字幕国产| 3atv在线一区二区三区| 精品一区中文字幕| 国产精品护士白丝一区av| 色婷婷av一区二区三区大白胸 | 欧美成人艳星乳罩| 国精产品一区一区三区mba视频| 久久久久久久久久久99999| 不卡的av电影| 亚洲一区二区三区四区不卡| 在线不卡一区二区| 国产麻豆91精品| 亚洲人123区| 欧美一区二区三区精品| 国产成人超碰人人澡人人澡| 一区二区三区91| 欧美成人综合网站| 不卡视频一二三| 婷婷开心激情综合| 久久久美女艺术照精彩视频福利播放| 成人av资源站| 日韩av网站在线观看| 亚洲国产精品成人久久综合一区| 在线精品视频免费播放| 国产在线精品国自产拍免费| 亚洲免费观看高清完整版在线观看熊| 欧美三级日韩在线| 粉嫩13p一区二区三区| 午夜视频在线观看一区二区| 国产亚洲一区二区三区在线观看| 在线观看av一区| 国产麻豆91精品| 午夜在线电影亚洲一区| 国产精品无圣光一区二区| 欧美群妇大交群的观看方式| 国产91对白在线观看九色| 午夜精品视频一区| 中文字幕日韩av资源站| 精品三级av在线| 欧美日韩中文字幕一区| 成人免费毛片片v| 精品在线观看视频| 偷拍一区二区三区四区| 中文字幕日韩欧美一区二区三区| 久久综合久久综合亚洲| 91.麻豆视频| 欧美亚洲日本国产| jiyouzz国产精品久久| 韩国女主播一区| 天天爽夜夜爽夜夜爽精品视频| 国产精品电影院| 国产日产欧美一区| www国产成人免费观看视频 深夜成人网| 色一情一乱一乱一91av| 成人精品国产福利| 国产精品亚洲成人| 久久精品国产网站| 日韩电影在线免费观看| 亚洲一区二区偷拍精品| 亚洲欧美欧美一区二区三区| 国产精品久久久久天堂| 国产亚洲女人久久久久毛片| 精品久久五月天| 日韩午夜在线观看视频| 欧美群妇大交群的观看方式| 欧美日韩中文国产| 欧美亚洲国产一区在线观看网站| 91女厕偷拍女厕偷拍高清| 顶级嫩模精品视频在线看| 国产激情一区二区三区| 国产在线视频不卡二| 韩国在线一区二区| 国产老肥熟一区二区三区| 久久99精品久久只有精品| 久久99精品久久久久久| 国产综合色在线视频区| 国模大尺度一区二区三区| 激情五月婷婷综合| 国产精华液一区二区三区| 国产精品99久| 不卡一区二区三区四区| eeuss鲁片一区二区三区| 91免费观看视频| 91黄色免费看| 欧美久久一二区| 91精品欧美综合在线观看最新| 欧美一级搡bbbb搡bbbb| 日韩欧美国产高清| 国产日韩欧美精品电影三级在线| 国产欧美日韩在线视频| 中文字幕日韩欧美一区二区三区| 亚洲免费色视频| 日欧美一区二区| 久久国产精品第一页| 国产精品91一区二区| av电影在线观看一区| 欧美视频在线播放| 日韩欧美一区电影| 国产精品美日韩| 亚洲综合在线电影| 美女视频黄免费的久久| 国产美女av一区二区三区| 成人午夜电影久久影院| 91成人看片片| 欧美成人三级在线| 亚洲人成网站精品片在线观看| 亚洲综合区在线| 蜜桃视频一区二区三区 | 日本伊人色综合网| 国产精品亚洲成人| 欧美日韩国产三级| 国产日韩欧美精品电影三级在线| 亚洲自拍偷拍网站| 国产成人在线视频播放| 在线精品视频免费观看| 精品国产91久久久久久久妲己| 国产精品久久精品日日| 日本 国产 欧美色综合| 国产aⅴ综合色| 欧美剧情电影在线观看完整版免费励志电影 | 亚洲成人激情av| 国产毛片一区二区| 欧美日韩国产一级片| 国产精品沙发午睡系列990531| 日韩不卡一区二区| 一本一本大道香蕉久在线精品| 日韩欧美亚洲国产精品字幕久久久 | 国产精品1区二区.| 欧美视频一区二区三区| 久久精品男人天堂av| 日本中文字幕一区二区视频| 91色在线porny| 26uuu精品一区二区| 婷婷综合五月天| 色综合色狠狠天天综合色| 2017欧美狠狠色| 青青青伊人色综合久久| 91成人国产精品| 自拍偷自拍亚洲精品播放| 国产一区二区三区不卡在线观看| 欧美丰满少妇xxxbbb| 一区二区三区国产豹纹内裤在线| 国模娜娜一区二区三区| 日韩一区二区在线免费观看| 亚洲在线视频免费观看| jlzzjlzz亚洲日本少妇| 久久伊人蜜桃av一区二区| 日本欧美在线观看| 欧美日韩精品二区第二页| 亚洲视频狠狠干| 成人激情小说乱人伦| 国产日韩亚洲欧美综合| 国内成人精品2018免费看| 欧美一级片在线| 午夜亚洲国产au精品一区二区| 91网页版在线| 国产精品卡一卡二卡三| 国产成人一区在线| 久久久777精品电影网影网 | 亚洲成a人v欧美综合天堂下载| 色诱亚洲精品久久久久久| 亚洲欧洲成人自拍| 97久久久精品综合88久久| 国产精品国产三级国产普通话三级| 国产91丝袜在线观看| 久久夜色精品一区| 国产成人高清在线| 最新日韩在线视频| 一本久久综合亚洲鲁鲁五月天 | 国产成人午夜电影网| 久久免费电影网| 成人免费视频caoporn| 国产精品久久久久久妇女6080| 成人激情开心网| 亚洲精品久久嫩草网站秘色| 色呦呦日韩精品| 午夜精品久久久久久久久久 | 国产精品一区二区在线播放| 久久久久国产精品免费免费搜索| 国产精品亚洲第一| 亚洲色图欧洲色图婷婷| 欧美日韩免费在线视频| 日韩不卡一二三区| 久久夜色精品一区| 91看片淫黄大片一级| 天天色综合天天| 国产午夜精品福利| 在线免费观看成人短视频| 日日夜夜免费精品| 久久精品视频一区二区| 91社区在线播放| 久久99精品网久久| 国产精品毛片高清在线完整版| 欧美视频一区二区在线观看| 精品一区二区三区在线播放| 国产精品人成在线观看免费|