Thread: floor() and int()

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    May 2009
    Posts
    39
    I don't think so, but I haven't taken to 30+ minutes of booting windows to check. The man page seems to indicate that it should be available in windows:
    CH is correct- trunc is available in C99 standard:

    trunc- Truncate to nearest integral value:

    double trunc(double x);

    returns x rounded to the integer nearest to it but no larger in magnitude

  2. #2
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    Quote Originally Posted by ninety3gd View Post
    CH is correct- trunc is available in C99 standard:
    This is a C++ forum. C++ is only backward compatible to C89, not forward compatible to C99. trunc() is not included in either the C++ or C89 standards.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

Popular pages Recent additions subscribe to a feed