Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.

# Need help with C++

2 replies to this topic

### #1 n0l1f3r

n0l1f3r

• Members
• 3 posts
• OFFLINE
•
• Location:Estonia
• Local time:06:49 PM

Posted 26 October 2008 - 04:25 AM

Oke i want to make an program which uses arctanh (Log((1 / x + 1) / (1 / x - 1)) / 2), and i only need to ask "x", and btw area is given: 0,2<x<1 any ideas how to make it?

i know i need to use math.h but i dont know how tu use formula in code...

thanks

### #2 Billy O'Neal

Billy O'Neal

Visual C++ STL Maintainer

• Malware Response Team
• 12,304 posts
• OFFLINE
•
• Gender:Male
• Location:Redmond, Washington
• Local time:09:49 AM

Posted 26 October 2008 - 11:10 AM

Docs for all the <cmath> functions are here:
http://www.cplusplus.com/reference/clibrary/cmath/

As far as I know, C does not have built in support for arctanh. You're going to have figure out how to compute that one on your own ;)

Billy3
Twitter - My statements do not establish the official position of Microsoft Corporation, and are my own personal opinion. (But you already knew that, right?)

### #3 Romeo29

Romeo29

Learning To Bleep

• 3,194 posts
• OFFLINE
•
• Gender:Not Telling
• Location:127.0.0.1
• Local time:11:49 AM

Posted 26 October 2008 - 12:55 PM

In C you can find hyperbolic arctangent using the following formula:

arctanh(x) = (1.0/2.0) * log((1+x) / (1-x))

Edited by Romeo29, 26 October 2008 - 12:58 PM.

#### 0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users