Berkeley CSUA MOTD:Entry 20142
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/07/12 [General] UID:1000 Activity:popular
7/12    

2000/12/21 [Computer/SW/Languages] UID:20142 Activity:high
12/20   Can someone explain this: "Denormal numbers present a major
        stumbling block to implementing floating point multiplcation,
        because they require performing a variable shift in the
        multiplier, which wouldn't otherwise be needed. Thus, high-
        performance, floating point multipliers often do no handle
        denormalized numbers, but instead trap, letting software
        handle them."
        \_ Don't you always multiply the mantissas as if they are integers
           and then add the exponents, regardless of whether they are
           normalized or not?
        \_ normalizing a floating point number means shifting its mantissa
           to the left until the MSB of the mantissa is 1 (and compensating
           by changing the exponent). if you know
           a number is normalized, you don't need to store the 1, which
           means that assuming normalized gets you a free bit.
           however, being a certain number of shifts, when the exponent
           gets as small as it can get, you can't shift any more, and
           you might be forced to use a denormal float. this is only a
           problem with very small number. typically, hardware
           will throw and error when it can't normalize. good hardware
           doesn't and just says lets you know that something is a denorm.
           -ali.
           \_ That's easy. Just shift left by the leading zero count.
              Zero counting in hardware is pretty easy. For 32-bits
              that's just 5 levels of multiplexor and AND gates (AND
              gates are probaly has a higher delay).
              gates probably has a higher delay).
2025/07/12 [General] UID:1000 Activity:popular
7/12    

You may also be interested in these entries...
2012/7/19-11/7 [Computer/SW/Languages/C_Cplusplus] UID:54439 Activity:nil
7/19    In C or C++, how do I write the code of a function with variable
        number of parameters in order to pass the variable parameters to
        another function that also has variable number of parameters?  Thanks.
        \_ The usual way (works on gcc 3.0+, Visual Studio 2005+):
               #define foo(fmt, ...) printf(fmt, ##__VA_ARGS__)
           The cool new way (works on gcc 4.3+):
	...
2009/12/26-2010/1/19 [Computer/SW/Languages/Misc, Computer/SW/Graphics] UID:53604 Activity:nil
12/26   Hey you stupid web developers, stop making web sites with
        CONSTANT FONT SIZE and CONSTANT WIDTH/HEIGHT. Dumb ass
        graphics artist... please learn something about computers
        and usability!
        http://browsersize.googlelabs.com
        \_ "Stupid web-developers" is redundant. "Stupid" or
	...
2009/2/9-17 [Computer/SW/Languages/C_Cplusplus] UID:52547 Activity:nil
2/9     I am new to signal handlers in C. I want to clean up some temp
        files if my program is interrupted. I can catch the interrupt
        just fine, but signal() doesn't take any args to pass to the
        handler. So how can I pass it the information it needs to be
        useful, like the names of the files to delete before exiting?
        STFW doesn't yield much.
	...
2009/1/20-26 [Computer/SW/Languages/Java, Computer/SW/Languages/Misc] UID:52425 Activity:nil
1/20    I've been using tcsh as shell program tool (i know, bad shell to
        do scripting).  One thing I've noticed when I extract xml file
        is that the variable type automatically change from
        integer/string to... almost an array-like data structure when
        the output of the xml key/value is more than one (it's more
        like a string separated by space, but I was very impressed as
	...
2008/12/4-10 [Computer/SW/Languages/Python] UID:52167 Activity:low
12/4    FORTRAN, er, Python 3.0 / 3000 is out:
        http://www.python.org/download/releases/3.0
        \_ As someone who tried out Python and disliked it, is there a reason I
           should take a look at it again?
           \_ Not really. Why'd you dislike Python? I love it.
              \_ The whitespace was a killer, other syntax a bit clunky,
	...
2008/4/2-6 [Computer/SW/Languages/C_Cplusplus] UID:49645 Activity:moderate
4/2     Is there an interpreted version of C or C++ that can be used for
        educational purposes? It doesn't have to be full-featured or
        strictly adhere to the standards, but it's painful for students
        to change a variable in a for loop and then wait for a compile
        to see how it changes the result. Something really lightweight
        would encourage them to play around a lot more and learn more in
	...