Berkeley CSUA MOTD:Entry 23167
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/05/24 [General] UID:1000 Activity:popular
5/24    

2001/12/6-7 [Computer/SW/Languages, Computer/HW] UID:23167 Activity:kinda low
12/5    I know how to represent 0.5, 0.25, 0.125 in binary. However, how
        would you represent 0.1000? How about in IEEE floating representation?
        \_The way you get to 0.1000 is to do a summation from 1/2^n fractions.
                1/2 is 1/10 in binary.  amusing, yes?  which is .1, in binary.
        The answer therefore for 0.1 is 0.0000001010001111011.
         \_ Um, how did you derive that? Here's what I have:
            .5 .25 .125 .0625 .03125 .015625 .0078125
            0   0    0    1     1       0        0    X X X X X X (cont)
            Should say .0001100110011001101
            \_Sorry, gave you the answer for .01. Same rule holds though.
            Should say .00011001100110011001
        \_ thx. What are some float numbers that are easy to represent in
           decimal (e.g. 0.7?) but cannot be represented in binary?
           \_ Anything that can be written as a fraction with a denominator
              that's a power of 10, but cannot be written with a denominator
              that's a power of 2.
        \_ For IEEE:
           float f = 0.1;
           printf("%#08x\n", * (int *) &f);
2025/05/24 [General] UID:1000 Activity:popular
5/24    

You may also be interested in these entries...
2013/4/9-5/18 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Apps, Computer/SW/Languages/Perl] UID:54650 Activity:nil
4/04    Is there a good way to diff 2 files that consist of columns of
        floating point numbers, such that it only tells me if there's a
        difference if the numbers on a given line differ by at least a given
        ratio?  Say, 1%?
        \_ Use Excel.
           1. Open foo.txt in Excel.  It should convert all numbers to cells in
	...
2012/7/29-10/17 [Computer/SW/Languages] UID:54447 Activity:nil
7/23    Hey mconst, check this out:
        int main()
        {
            int i_value   = 16777217;
            float f_value = 16777217.0;
            printf("The integer is: %d\n", i_value);
	...
2012/7/23-29 [Computer/SW/Languages] UID:54443 Activity:nil
7/23    Hey mconst, check this out:
int main()
{
    int i_value   = 16777217;
    float f_value = 16777217.0;
    printf("The integer is: %d\n", i_value);
	...
2012/5/17-7/20 [Computer/SW/Languages, Industry/SiliconValley] UID:54391 Activity:nil
5/17    Anyone have the guts to short Facebook out of the gate?  I think it's
        overvalued, but at this point it looks like there are enough
        suckers to float this castle in the air for quite a while
        \_ I don't think you can find the shares to short yet. I am long
           personally, but only with 200 shares. It is a moon shot kind of
           stock.
	...
2011/8/9-27 [Computer/SW/Editors/Emacs, Academia/Berkeley/CSUA] UID:54162 Activity:nil
8/9     So I just found out that an old college friend of mine lost her
        four month old daughter to SIDS. What is the correct response here?
        \_ "Did she sleep with her belly?" and "Did you breastfeed?"
        \_ try this joke:
           How do you make a dead baby float?
           ˙ʎqɐq pɐǝp ÉŸo sdooÉ”s oʍʇ puɐ ɹÇ\
	...
2008/10/2-4 [Computer/SW/Languages/Functional] UID:51347 Activity:nil
10/1    I want redistricting. I don't want a committee. How hard is it to
        simply float a new scheme for redistricting?
        \_ Just gather 1M signatures.
	...
2009/4/9-13 [Computer/HW/Memory] UID:52829 Activity:kinda low
4/9     Which is better designed/engineered for reliability, the SDCard
        or the Compact Flash card? I'm IEEE and EE dumb but I do understand
        a lot of RAM terms and design architectures.
        \_ Mechanically, I think CF cards are more durable because there is
           more plastic and the contacts are hidden.  For example, I'd be
           comfortable to let my toddler kid play with a CF card but not an
	...
2006/1/16-18 [Computer/SW/Languages/Java, Computer/SW/Languages/Misc] UID:41392 Activity:high
1/16    Okay, I have a technical question here. I administer a cluster
        of java webservers running jetty (not resin, sorry). They are behind
        a load balancer. They used to start up fine under "load" i.e. in
        the load balancer configuration. The latest code release
        broke this somehow and now they crash upon startup unless
        I remove them from the load balancer first. The programmers
	...
2005/8/29-30 [Computer/Networking] UID:39329 Activity:moderate 54%like:37400
8/29    What's the difference between a hub, a switch and a router?  Thx.
        \_ AFAIK, probably be corrected by someone:
           hub: Allows communication on a LAN with bandwith shared amongs all
                the nodes on the hub and maxing out at the max line speed.
           switch: Allows communication on a LAN with bandwith greater than
                the max line speed (point to point)
	...
2005/6/19-20 [Computer/SW/WWW/Browsers, Computer/SW/Languages/C_Cplusplus] UID:38198 Activity:moderate 76%like:38189
6/19    Programming Jobs Losing Luster in U.S.
        http://tinyurl.com/737b8 (nytimes.com)
        \_ Oh darn.  You mean those opportunistic little shits who clogged up
           all of my project groups in CS classes aren't around anymore?  Cry
           me a fucking river.
        \_ is there a CSUA password?
	...
2005/5/25-26 [Computer/SW/OS/OsX] UID:37836 Activity:kinda low
5/25    I recorded some family reel to reel onto my computer so that I could
        archive it digitally.  Unfortunately it was recorded at 1 7/8 in/min and
        I could only play it back at 3 1/4 in/min.  The AIFF file I have is
        therefore at double time.  Can't I just change the sampling rate and
        it will run normally?  If so, how would I do this in OS X?  -scottyg
        \_ Audacity has what I'm looking for.  Thanks -Scottyg
	...
2005/3/5-8 [Computer/HW/Memory, Computer/HW/Drives] UID:36543 Activity:low
3/5     Can a PC boot from external (usb or ieee-1344) hard drives?
                                            \_ did you mean 1394?
        \_ depends on your bios support.  Quite a few now can boot from
           external usb-anything
           \_ If you're trying to boot XP, look for Bart's PE Builder.  For
              a USB-bootable Linux, have a look at
	...
2004/3/19-20 [Computer/HW] UID:12752 Activity:nil
3/18    Does anyone know of a library or someplace where one could take a
        look at the IEEE POSIX 2001 standard? Thanks.
        \_ Dunno about the library but I tried *very* hard to find it online
           last year.  I never got even close to a hint that it might be
           online somewhere.
           \_ well, it is certainly online, if you want to fork over
	...