Sponsored Content
Full Discussion: TrueAbility Linux Showdown
Special Forums News, Links, Events and Announcements TrueAbility Linux Showdown Post 302937913 by TrueAbility on Tuesday 10th of March 2015 02:17:40 PM
Old 03-10-2015
TrueAbility Linux Showdown

Want to flex your scripting skills? Also want a chance to win awesome prizes? If so, you should compete in Linux Showdown 8: “The Assembler” that TrueAbility is hosting!

TrueAbility was built with tech professionals in mind and has a vast community of Linux members. Everything from Linux challenges and self-assessments, to blog posts and Linux jobs can be found at TrueAbility.

We are launching an old school challenge to test tech pros' scripting skills and they are calling it their most difficult challenge EVER. It goes live on March 16th, so you have a few days to brush up your Hardware Programming Language: Assembly. The top 50 techs will advance to an even more challenging round 2.

Think you have what it takes to make it on their leaderboard and advance to round 2?


Lots of prizes are going to be given away! They range from Linux Foundation Certified Engineer Exam credits and TrueAbility Abilityscreens to DigitalOcean credits and even a D-Link AC3200 Ultra Wi-Fi Router. It doesn't cost anything to join in on the fun. Prove what you've got while winning awesome prizes. You won't want to miss this!
 

We Also Found This Discussion For You

1. UNIX for Beginners Questions & Answers

Simple sed command not working; could be a Mac/Linux vs. PC/Linux issue

Hello, I am on a Mac and trying to clean up some monthly files with a very simple SED: sed '3,10d;/<ACROSS>/,$d' input.txt > output.txt (from the input, delete lines 3 - 10; then delete from the line containing <ACROSS> to the end of the file) then output to output.txt Even when I try... (2 Replies)
Discussion started by: verbatim
2 Replies
ROUND(3)						     Linux Programmer's Manual							  ROUND(3)

NAME
round, roundf, roundl - round to nearest integer, away from zero SYNOPSIS
#include <math.h> double round(double x); float roundf(float x); long double roundl(long double x); Link with -lm. Feature Test Macro Requirements for glibc (see feature_test_macros(7)): round(), roundf(), roundl(): _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE; or cc -std=c99 DESCRIPTION
These functions round x to the nearest integer, but round halfway cases away from zero (regardless of the current rounding direction, see fenv(3)), instead of to the nearest even integer like rint(3). For example, round(0.5) is 1.0, and round(-0.5) is -1.0. RETURN VALUE
These functions return the rounded integer value. If x is integral, +0, -0, NaN, or infinite, x itself is returned. ERRORS
No errors occur. POSIX.1-2001 documents a range error for overflows, but see NOTES. VERSIONS
These functions first appeared in glibc in version 2.1. CONFORMING TO
C99, POSIX.1-2001. NOTES
POSIX.1-2001 contains text about overflow (which might set errno to ERANGE, or raise an FE_OVERFLOW exception). In practice, the result cannot overflow on any current machine, so this error-handling stuff is just nonsense. (More precisely, overflow can happen only when the maximum value of the exponent is smaller than the number of mantissa bits. For the IEEE-754 standard 32-bit and 64-bit floating-point num- bers the maximum value of the exponent is 128 (respectively, 1024), and the number of mantissa bits is 24 (respectively, 53).) If you want to store the rounded value in an integer type, you probably want to use one of the functions described in lround(3) instead. SEE ALSO
ceil(3), floor(3), lround(3), nearbyint(3), rint(3), trunc(3) COLOPHON
This page is part of release 3.25 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. 2008-08-11 ROUND(3)
All times are GMT -4. The time now is 12:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy