473,387 Members | 1,440 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

What Math.Tanh(1) return?

Hi Experts:

I have a question about Math.Tanh:

For a 45 degree 'angle' (radians is 45 * pi / 180 = 0.785), Math.Tan(angle)
returns 1 as expected; but Math.Tang(1) returns 0.76. Why not 0.785?

Thanks in Advance!
Polaris
Dec 16 '07 #1
5 2582
Polaris wrote:
I have a question about Math.Tanh:

For a 45 degree 'angle' (radians is 45 * pi / 180 = 0.785),
Math.Tan(angle) returns 1 as expected; but Math.Tang(1) returns 0.76.
Why not 0.785?
Math.Tanh does some different.

It is Math.Atan you want !

Arne

Dec 16 '07 #2
Thanks!
Polaris

"Arne Vajhøj" <ar**@vajhoej.dkwrote in message
news:47***********************@news.sunsite.dk...
Polaris wrote:
>I have a question about Math.Tanh:

For a 45 degree 'angle' (radians is 45 * pi / 180 = 0.785),
Math.Tan(angle) returns 1 as expected; but Math.Tang(1) returns 0.76. Why
not 0.785?

Math.Tanh does some different.

It is Math.Atan you want !

Arne
Dec 16 '07 #3
On 16 Dec, 20:45, Arne Vajhøj <a...@vajhoej.dkwrote:
Polaris wrote:
I have a question about Math.Tanh:
For a 45 degree 'angle' (radians is 45 * pi / 180 = 0.785),
Math.Tan(angle) returns 1 as expected; but Math.Tang(1) returns 0.76.
Why not 0.785?

Math.Tanh does some different.

It is Math.Atan you want !

Arne
So to start a fire...

so u expect math.Atan(1)*4 to return the complete PI,
3.141592653589.... and so on for all eternity... tell the computer how
it should be stored and presented...

heard there should be a circle somwhere if u print it (PI) with a 80
char/row printer for a couple of years... newer got around to that
though...

//CY
Dec 16 '07 #4
heard there should be a circle somwhere if u print it (PI) with a 80
char/row printer for a couple of years... newer got around to that
though...
That's from the novel "Contact" by Carl Sagan and (if I remember
correctly) you should use base 11.
I doubt if it is true but given an infinite amount of "random" numbers,
anything could happen.

Hans Kesting
Dec 17 '07 #5
Ben Voigt [C++ MVP] wrote:
Everyone believes that PI is irrational,
It has been proven to be both irrational and transcendent.

Arne
Dec 27 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Frank Millman | last post by:
Hi all I was helping my niece with her trigonometry homework last night. Her calculator's batteries were flat, so I thought I would use Python's math module to calculate sin, cos, and tan. I...
56
by: Xah Lee | last post by:
What are OOP's Jargons and Complexities Xah Lee, 20050128 The Rise of Classes, Methods, Objects In computer languages, often a function definition looks like this: subroutine f (x1, x2, ...)...
0
by: Jussi Mononen | last post by:
Hi, I'm having problems to successfully execute the test scripts on a Compaq host ( OSF1 tr51bdev V5.1 2650 alpha ). Almost all tests end up with the following error message "PARI: *** ...
4
by: Robert Scheer | last post by:
Hi. Reading about the Math.random method I saw that by default it generates between 0 and 1. To generate numbers between a greater range I can use these syntaxes: x = Math.random()/10 x =...
17
by: cwdjrxyz | last post by:
Javascript has a very small math function list. However there is no reason that this list can not be extended greatly. Speed is not an issue, unless you nest complicated calculations several levels...
7
by: Wernfried Schwenkner | last post by:
I've found the discussion about Math.Log and the error with Math.Log(8,2) on Google. Unfortunatly the full thread isn't on my news server, so I can't reply. The problem doesn't only depend...
11
by: Sambo | last post by:
I have the following module: ------------------------------- import math def ac_add_a_ph( amp1, ph1, amp2, ph2 ): amp3 = 0.0 ph3 = 0.0 ac1 = ( 0, 0j ) ac2 = ( 0, 0j )
11
by: frankie_85 | last post by:
Hi everyone, I just made a simple code which is part of my assignment but I can't figure it out what's wrong with it. (always give me error messages) What the code basically does is: a...
3
tpgames
by: tpgames | last post by:
2x2 Sudoku doesn't work at all. The images don't show up on the grid. I don't understand JavaScript very well. Just learning it. Thanks! <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.