Thread: Calculating S in C task

  1. #76
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    Location
    London, United Kingdom
    Posts
    2,094
    They called you that because you were making statements that were worth that appellative, also insulting everyone else's experience and intelligence along the way. So please spare us the whining.

  2. #77
    Registered User
    Join Date
    Mar 2009
    Posts
    23
    Quote Originally Posted by Overworked_PhD View Post
    Okay, but it's funny how some of the people on here called me an idiot, yet these same people can't produce, in this case, a less buggy solution.
    Troll. Troll. Troll. Troll. Troll. Troll. Troll. Troll. Troll. Troll. Troll. Troll. Troll. Troll. Troll. Troll. Troll. Troll. Troll. Troll. Troll. Troll. Troll. Troll. Troll. Troll. Troll. Troll. Troll. Troll. Troll. Troll. Troll.

    That's all I heard.

  3. #78
    Banned
    Join Date
    May 2007
    Location
    Berkeley, CA
    Posts
    329
    I'm being honest.

  4. #79
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Quote Originally Posted by Overworked_PhD View Post
    Okay, but it's funny how some of the people on here called me an idiot, yet these same people can't produce, in this case, a less buggy solution.
    So because we called you an idiot for making an idiotic claim, now WE have to somehow prove WE can do what YOU claimed? Wow, you really are an idiot.

    PS: Yes, I am talking to you.


    Quzah.
    Hope is the first step on the road to disappointment.

  5. #80
    Banned
    Join Date
    May 2007
    Location
    Berkeley, CA
    Posts
    329
    Quote Originally Posted by quzah View Post
    So because we called you an idiot for making an idiotic claim, now WE have to somehow prove WE can do what YOU claimed? Wow, you really are an idiot.

    PS: Yes, I am talking to you.


    Quzah.
    Wow, that is another intelligent and well thought out post. Not really, but whatever.

  6. #81
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    Location
    London, United Kingdom
    Posts
    2,094
    I am dying to know what Adak thinks of that code. He is probably to nice a guy to comment on it though since he promised he won't embarrass you.

  7. #82
    Registered User
    Join Date
    May 2008
    Location
    Australia
    Posts
    230
    Quote Originally Posted by Overworked_PhD View Post
    Wow, that is another intelligent and well thought out post. Not really, but whatever.
    You're hardly one to talk. We're yet to see an intelligent post from you. Emphasis on intelligent.
    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.

  8. #83
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Quote Originally Posted by claudiu View Post
    I am dying to know what Adak thinks of that code. He is probably to nice a guy to comment on it though since he promised he won't embarrass you.
    Well, it's time to serve up a jumbo size of
    *CROW*,


    because, his program has produced correct factorials for 30!, 50!, 70! and 100!

    I compared the output with the data from wikipedia here:
    Factorial - Wikipedia, the free encyclopedia

    I have to say, I expected just what Salem reported, and just ran it through on Turbo C (a 16 bit compiler), to hurry it along. I don't know enough about factorials to look at them and just say "Oh, that can't be right".

    The only inaccuracy I"ve noted in the above factorials, are in rounding of the last digit (upward if it is 5 or above).


    Congratulations, Overworked_PhD!


    I will post a screen shot of the testing output screen, so you can see what I'm talking about, as an edit to this post.
    Last edited by Adak; 04-20-2010 at 11:58 PM.

  9. #84
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    Location
    London, United Kingdom
    Posts
    2,094
    Quote Originally Posted by Adak View Post
    Well, it's time to serve up a jumbo size of
    *CROW*,


    because, his program has produced correct factorials for 30!, 50!, 70! and 100!

    I compared the output with the data from wikipedia here:
    Factorial - Wikipedia, the free encyclopedia

    I have to say, I expected just what Salem reported, and just ran it through on Turbo C (a 16 bit compiler), to hurry it along. I don't know enough about factorials to look at them and just say "Oh, that can't be right".

    The only inaccuracy I"ve noted in the above factorials, are in rounding of the last digit (upward if it is 5 or above).


    Congratulations, Overworked_PhD!


    I will post a screen shot of the testing output screen, so you can see what I'm talking about, as an edit to this post.
    What are you talking about, it's not correct in the least. As Salem and wikipedia point out factorials over factorial(20) have at least 3 zeros. His have none.

  10. #85
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    Location
    London, United Kingdom
    Posts
    2,094
    Okay, so even if he did get the correct results he still hasn't showed how to store that mighty number in an integer type variable in C, which was the original argument.

  11. #86
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Quote Originally Posted by Adak View Post
    because, his program has produced correct factorials for 30!, 50!, 70! and 100!
    So because it gave you three correct values out of 80, that means it's correct? That's a pretty crappy percentile. Plus, since there is no actual code shown, it kinda just looks like you've been trolling as two different logins. Go ahead and reply on either login though and tell me I'm wrong and be sure to not show any code to back up your absurd claims.

    I can fake a screenshot in five seconds to claim anything I want. That doesn't mean it's true.


    Quzah.
    Hope is the first step on the road to disappointment.

  12. #87
    Registered User
    Join Date
    May 2008
    Location
    Australia
    Posts
    230
    It's funny because I had that feeling too.
    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.

  13. #88
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    The jpg image has the cut and paste factorials from Wiki, (and one other site I forgot to link to), and for these numbers, there are no strings of zero's, listed.


    I believe (but can't confirm), that PhD's program is Sterling's algorithm for factorial approximation. In the numbers listed, it is accurate, except for two things:

    1) His print out stops after six digits of precision.

    2) The sixth digit after the decimal point is rounded, if it's 5 or higher.


    I don't know if the precision of this program could be extended easily, or not.

    I'm sure PhD can tell us more about this, if he chooses.

    I chose these numbers because they are beyond the maximum value of a double in Turbo C - a true challenge to his bold claim.

    These are the ONLY numbers I tested, Quzah. No, I'm not a double.
    Last edited by Adak; 04-21-2010 at 12:24 AM.

  14. #89
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    Location
    London, United Kingdom
    Posts
    2,094
    So far it's all mumbo jumbo. No code, no proof. Anyone could have printf-ed these results. I can write a fast factorial too. It's going to be 100 printf statements in a long ass switch. You give me an integer 1-100 I'll give you the factorial.

  15. #90
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    Location
    London, United Kingdom
    Posts
    2,094
    25 1.5511210043 × 10^25
    50 3.0414093202 × 10^64
    70 1.1978571670 × 10^100
    100 9.3326215444 × 10^157

    There are the zeros. A ton of them!

    Approximation for a factorial is just BS. Factorial is a function defined on a DISCRETE COUNTABLE SET, like the set of positive integers. As a result, it has a DISCRETE value. Approximations of factorials through continuous functions are simply not what this thread was about or what the OP was asking for.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 12-31-2007, 11:40 AM
  2. Where do a task get "wakeuped", blocked, preempted?
    By micke_b in forum Linux Programming
    Replies: 4
    Last Post: 12-28-2007, 04:49 PM
  3. A Task Buffer for storing socket descriptors
    By cloudy in forum Networking/Device Communication
    Replies: 0
    Last Post: 09-09-2006, 01:08 PM
  4. Calculating : high numbers
    By MiraX33 in forum C++ Programming
    Replies: 9
    Last Post: 06-08-2006, 11:08 PM
  5. Recursion
    By Lionmane in forum C Programming
    Replies: 11
    Last Post: 06-04-2005, 12:00 AM