Berkeley CSUA MOTD:Entry 54447
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2024/12/24 [General] UID:1000 Activity:popular
12/24   

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);
            printf("The float is:   %f WTF????\n", f_value);
            printf("Their equality: %d WTF?!?!?\n", i_value == f_value);
        }
        Isn't it peculiar?
        \_ "%f" expects a double argument, not a float argument.  -- !mconst
2024/12/24 [General] UID:1000 Activity:popular
12/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/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.
	...
2012/3/15-6/1 [Computer/SW/Languages, Computer/SW/OS/Windows] UID:54340 Activity:nil
3/15    Why does MS put double-quotes around the '8' in Windows Server 8, like
        the following?
        - Windows 8
        - Windows Server "8"
        \_ Because when they didn't do it, code didn't see the '\0'
           and went over?  Looks better than '8','\0' *shrug*
	...
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ɐ ɹÇ\
	...
2010/1/26-2/8 [Computer/HW/Memory] UID:53665 Activity:nil
1/26    What's a good motherboard I can get that will fit in a 1U
        case, with sata connectors, gig-e ethernet, and lots of
        slots for RAM?  I also don't want to have to use expensive
        double buffered RAM.  Can you tell I havne't bought a PC in
        years?  thanks.
        \_ Buy a mac. Haven't you heard? if you don't buy a Mac people
	...