Re: [請益] 關於三角反函數

看板Perl作者 (Analog Engineer)時間15年前 (2010/08/02 14:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/3 (看更多)
※ 引述《megadeth893 (加保)》之銘言: : 最近碰到寫有關三角反函數的部份 : 不過發現好像只有sin cos可以用 : 其他好像都沒有函數可用 : 更別說反函數 : 不過在這裡 : 我想問的是有關cos-1的反餘弦函數 : 在perl程式理該如何表示 : 感謝 可以使用 POSIX use POSIX; 這樣就可以使用 POSIX 底層支援的函數. 跟其它 Module 不太一樣的是code並不是由 perl 的Module所提供, 而是底層 POSIX 函數的 export, 好處是它的行為應該會跟同平台下的C語言裡的函數相 同,包含若有 bug 也會一樣, 也可能會稍微節省一些記憶體, 但缺點是並不保 證與其他平台下的 perl 完全一樣. 它有支援 acos asin atan 等函數. 完整說明如下. The POSIX module permits you to access all (or nearly all) the standard POSIX 1003.1 identifiers. Many of these identifiers have been given Perl-ish interfaces. Everything is exported by default with the exception of any POSIX functions with the same name as a built-in Perl function, such as abs, alarm, rmdir, write, etc.., which will be exported only if you ask for them explicitly. This is an unfortunate backwards compatibility feature. You can stop the exporting by saying use POSIX () and then use the fully qualified names (ie. POSIX::SEEK_END). This document gives a condensed list of the features available in the POSIX module. Consult your operating system's manpages for general information on most features. Consult the perlfunc manpage for functions which are noted as being identical to Perl's builtin functions. The first section describes POSIX functions from the 1003.1 specification. The second section describes some classes for signal objects, TTY objects, and other miscellaneous objects. The remaining sections list various constants and macros in an organization which roughly follows IEEE Std 1003.1b-1993. -- Do not depend on others without effort... 當我年輕時,請教別人問題時常聽到上面那句話. 當時心裏偶而會有些小小抱怨. 當時間過去,我偶而會想到上面那句話, 心中十分感謝當初告訴我那句話的人. 當發現問題時,最有價值的不是問題的答案, 而是找到解決的方向,並在努力的過程裡具備解決問題的能力. -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 211.74.92.237
文章代碼(AID): #1CLbyhZb (Perl)
討論串 (同標題文章)
文章代碼(AID): #1CLbyhZb (Perl)