BleepingComputer.com: Need help with C++

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Need help with C++ Little help with maths

#1 User is offline   n0l1f3r 

  • New Member
  • Pip
  • Find Topics
  • Group: Members
  • Posts: 3
  • Joined: 16-July 08
  • Location:Estonia

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 User is offline   Billy O'Neal 

  • Bleepin Engineer GRADUATE
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Malware Response Instructor
  • Posts: 10,403
  • Joined: 17-January 08
  • Gender:Male
  • Location:Cleveland, Ohio

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

#3 User is offline   Romeo29 

  • Learning To Bleep
  • PipPipPipPipPipPip
  • Find Topics
  • Group: BC Advisor
  • Posts: 2,834
  • Joined: 06-July 08
  • Gender:Not Telling
  • Location:127.0.0.1

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))

This post has been edited by Romeo29: 26 October 2008 - 12:58 PM


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users