Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

acos(3) [linux man page]

ACOS(3) 						     Linux Programmer's Manual							   ACOS(3)

NAME
acos, acosf, acosl - arc cosine function SYNOPSIS
#include <math.h> double acos(double x); float acosf(float x); long double acosl(long double x); Link with -lm. Feature Test Macro Requirements for glibc (see feature_test_macros(7)): acosf(), acosl(): _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L; or cc -std=c99 DESCRIPTION
The acos() function calculates the arc cosine of x; that is the value whose cosine is x. RETURN VALUE
On success, these functions return the arc cosine of x in radians; the return value is in the range [0, pi]. If x is a NaN, a NaN is returned. If x is +1, +0 is returned. If x is positive infinity or negative infinity, a domain error occurs, and a NaN is returned. If x is outside the range [-1, 1], a domain error occurs, and a NaN is returned. ERRORS
See math_error(7) for information on how to determine whether an error has occurred when calling these functions. The following errors can occur: Domain error: x is outside the range [-1, 1] errno is set to EDOM. An invalid floating-point exception (FE_INVALID) is raised. CONFORMING TO
C99, POSIX.1-2001. The variant returning double also conforms to SVr4, 4.3BSD, C89. SEE ALSO
asin(3), atan(3), atan2(3), cacos(3), cos(3), sin(3), tan(3) COLOPHON
This page is part of release 3.27 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/. 2010-09-20 ACOS(3)

Check Out this Related Man Page

COS(3)							     Linux Programmer's Manual							    COS(3)

NAME
cos, cosf, cosl - cosine function SYNOPSIS
#include <math.h> double cos(double x); float cosf(float x); long double cosl(long double x); Link with -lm. Feature Test Macro Requirements for glibc (see feature_test_macros(7)): cosf(), cosl(): _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L || /* Since glibc 2.19: */ _DEFAULT_SOURCE || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE DESCRIPTION
These functions return the cosine of x, where x is given in radians. RETURN VALUE
On success, these functions return the cosine of x. If x is a NaN, a NaN is returned. If x is positive infinity or negative infinity, a domain error occurs, and a NaN is returned. ERRORS
See math_error(7) for information on how to determine whether an error has occurred when calling these functions. The following errors can occur: Domain error: x is an infinity errno is set to EDOM (but see BUGS). An invalid floating-point exception (FE_INVALID) is raised. ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7). +----------------------+---------------+---------+ |Interface | Attribute | Value | +----------------------+---------------+---------+ |cos(), cosf(), cosl() | Thread safety | MT-Safe | +----------------------+---------------+---------+ CONFORMING TO
C99, POSIX.1-2001, POSIX.1-2008. The variant returning double also conforms to SVr4, 4.3BSD. BUGS
Before version 2.10, the glibc implementation did not set errno to EDOM when a domain error occurred. SEE ALSO
acos(3), asin(3), atan(3), atan2(3), ccos(3), sin(3), sincos(3), tan(3) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. 2017-09-15 COS(3)
Man Page

14 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Mac OS X

I'm new to unix , I am a Technical Support Engineer in Macintosh Platform . We have here a new OS which is a unix based the Mac OS X, could you pls tell me what book should i buy so i could used the feature of our new OS. And what other programs should I install ? (10 Replies)
Discussion started by: carljo
10 Replies

2. UNIX for Dummies Questions & Answers

UNIX community...help your Mac brother!

Hello, I have been a Macintosh user for many, many years. As you may know the latest MacOS ( OS X ) is UNIX based. (Please see http://www.apple.com/macosx/technologies/inside.html for more information.) Basically, I really have no idea where to start with UNIX...if anyone could take a quick... (7 Replies)
Discussion started by: makemead
7 Replies

3. OS X (Apple)

Root user in MacOSX

Hello, Do you guys know how does the root user works in this system? from the terminal i try to su to root, and i thought the password was the same as the macosx password, at the /etc/passwd file the passwd field appears as *, so it's system bussines only, is there a way to become root? i... (6 Replies)
Discussion started by: sx3v1l_1n51de
6 Replies

4. UNIX for Dummies Questions & Answers

Is echo $variable >> text.txt working in MacOSX?

Hi New at this, but want to learn more. I'm trying this as an Shell Command in MacOSX; newdate='<TIME>' echo $newdate >> /Users/ttadmin/Desktop/test.txt And it don't work. But if I just use; echo <TIME> >> /Users/ttadmin/Desktop/test.txt (<TIME> is an variable that one program... (6 Replies)
Discussion started by: jackt
6 Replies

5. OS X (Apple)

Cannot access UNIX.com with new cable modem

Hi. I have a very strange problem, so strange I don't even know which sub-forum to post it to. Last week, my cable modem broke, so I took it back and got a new one. The new one doesn't work with my old router so, for now, I have to connect the modem directly to my Mac with an ethernet... (14 Replies)
Discussion started by: Scott
14 Replies

6. UNIX for Dummies Questions & Answers

SSH from MacOS X or PPC Debian to SUSE # Odd terminal chars # Eventual scripting

Well. I was recently given access to my work's machine via SSH. I'm pretty sure it's a SUSE machine, uname -a gives Linux machinename 2.6.16.60-0.54.5-bigsmp #1 SMP Fri Sep 4 01:28:03 UTC 2009 i686 i686 i386 GNU/Linux I'm not doing anything all that exciting, mostly data entry stuff. We... (14 Replies)
Discussion started by: pagrus
14 Replies

7. OS X (Apple)

If you run macOS High Sierra version 10.13.1, be sure to install today's update.

Some hackers found a security hole in macOS High Sierra and tweeted it to the world before telling Apple about the problem. You can see the details from PC Magazine's daily news here: Apple Releases Fix for MacOS High Sierra 'Root' Bug. The original story this morning was published before a patch... (6 Replies)
Discussion started by: Don Cragun
6 Replies

8. Shell Programming and Scripting

Terminal running bash/rsync script does not close with exit (MacOS High SIerra)

Hello, I am running a bash script to do an rsync back on a computer running MacOS High Sierra. This is the script I am using, #!/bin/bash # main backup location, trailing slash included backup_loc="/Volumes/Archive_Volume/00_macos_backup/" # generic backup function function backup {... (12 Replies)
Discussion started by: LMHmedchem
12 Replies

9. Shell Programming and Scripting

Issue with shutdown command in script (MacOS High Sierra)

Hello, I have a backup script that runs an rsync backup to an external drive. I use the script frequently on Windows and Linux and have installed it on a Mac. The script has an option to run shutdown after the backup has completed. Since backup can take hours to run, this is an option that is... (10 Replies)
Discussion started by: LMHmedchem
10 Replies

10. OS X (Apple)

12-Core MacPro (2013) kernel_task over 1200%

Yesterday someone asked me to install TeamViewer and share my Mac screen with them while on a conference call. I shut down my Mac before sleeping and woke up to some major problem with my 12-core CPU in hyperdrive, and the system activity monitor showed my Mac kernel_task was at 1,200% and the... (30 Replies)
Discussion started by: Neo
30 Replies

11. UNIX for Beginners Questions & Answers

UNIX tool on MacOS that can increase resolution of a file

hi, I am searching for a native tool on MacOS that can increase the resolution of a group of image files whose aspect ratios (file width versus height) vary widely. There are numerous files so I don't wish to do this manually. Someone suggested the sips command with the resampling option but... (5 Replies)
Discussion started by: Godtookapicture
5 Replies

12. OS X (Apple)

MacOS 10.15 Catalina Crashes and Freezes on Boot

Sadly, I have turned off my access to the Apple Developers Beta program after installing macOS 10.15 Catalina a few days ago. After the install, I rebooted by MacBook Air and it "hard froze" and we were heading out of town so I grabbed a backup MBA running Mojave. Then, after getting back at... (10 Replies)
Discussion started by: Neo
10 Replies

13. Programming

Very Basic Arduino Uno Board Testing

A very simple Arduino board test... LOL Here is some very easy code to test a cheap Arduino board I just got from China via Aliexpress. I am still waiting on a about 30 more orders from Aliexpress for more Arduino stuff. This was the first order which made it here. /* Arduino test-code... (18 Replies)
Discussion started by: Neo
18 Replies

14. Programming

Arduino UNIX Time - Syncing Computer UNIX Time to Arduino Time with Python

Just finished a quick Python script to send the current unix time over to the Arduino from macOS, so in the absence of GPS or some other way to get the unix timestamp (epoch time) to the Arduino, I can get my macOS and Arduino UNO synced to within a second. Normally, when the Arduino starts... (9 Replies)
Discussion started by: Neo
9 Replies