當前位置:首頁 » 編程語言 » cosh在c語言中是什麼函數
擴展閱讀
webinf下怎麼引入js 2023-08-31 21:54:13
堡壘機怎麼打開web 2023-08-31 21:54:11

cosh在c語言中是什麼函數

發布時間: 2022-06-16 14:19:30

c語言中各種函數的具體作用,要詳細點的

字元處理函數
本類別函數用於對單個字元進行處理,包括字元的類別測試和字元的大小寫轉換

頭文件 ctype.h

函數列表<>
函數類別 函數用途 詳細說明
字元測試 是否字母和數字 isalnum
是否字母 isalpha
是否控制字元 iscntrl
是否數字 isdigit
是否可顯示字元(除空格外) isgraph
是否可顯示字元(包括空格) isprint
是否既不是空格,又不是字母和數字的可顯示字元 ispunct
是否空格 isspace
是否大寫字母 isupper
是否16進制數字(0-9,A-F)字元 isxdigit
字元大小寫轉換函數 轉換為大寫字母 toupper
轉換為小寫字母 tolower

地區化
本類別的函數用於處理不同國家的語言差異。

頭文件 local.h

函數列表
函數類別 函數用途 詳細說明
地區控制 地區設置 setlocale
數字格式約定查詢 國家的貨幣、日期、時間等的格式轉換 localeconv

數學函數
本分類給出了各種數學計算函數,必須提醒的是ANSI C標准中的數據格式並不符合IEEE754標准,一些C語言編譯器卻遵循IEEE754(例如frinklin C51)

頭文件 math.h

函數列表
函數類別 函數用途 詳細說明
錯誤條件處理 定義域錯誤(函數的輸入參數值不在規定的范圍內)
值域錯誤(函數的返回值不在規定的范圍內)
三角函數 反餘弦 acos
反正弦 asin
反正切 atan
反正切2 atan2
餘弦 cos
正弦 sin
正切 tan
雙曲函數 雙曲餘弦 cosh
雙曲正弦 sinh
雙曲正切 tanh
指數和對數 指數函數 exp
指數分解函數 frexp
乘積指數函數 fdexp
自然對數 log
以10為底的對數 log10
浮點數分解函數 modf
冪函數 冪函數 pow
平方根函數 sqrt
整數截斷,絕對值和求余數函數 求下限接近整數 ceil
絕對值 fabs
求上限接近整數 floor
求余數 fmod

本分類函數用於實現在不同底函數之間直接跳轉代碼。 頭文件 setjmp.h io.h

函數列表
函數類別 函數用途 詳細說明
保存調用環境 setjmp
恢復調用環境 longjmp

信號處理
該分類函數用於處理那些在程序執行過程中發生例外的情況。

頭文件 signal.h

函數列表
函數類別 函數用途 詳細說明
指定信號處理函數 signal
發送信號 raise

可變參數處理
本類函數用於實現諸如printf,scanf等參數數量可變底函數。

頭文件 stdarg.h

函數列表
函數類別 函數用途 詳細說明
可變參數訪問宏 可變參數開始宏 va_start
可變參數結束宏 va_end
可變參數訪問宏 訪問下一個可變參數宏 va_arg

輸入輸出函數
該分類用於處理包括文件、控制台等各種輸入輸出設備,各種函數以「流」的方式實現

頭文件 stdio.h

函數列表
函數類別 函數用途 詳細說明
文件操作
刪除文件 remove
修改文件名稱 rename
生成臨時文件名稱 tmpfile
得到臨時文件路徑 tmpnam
文件訪問 關閉文件 fclose
刷新緩沖區 fflush
打開文件 fopen
將已存在的流指針和新文件連接 freopen
設置磁碟緩沖區 setbuf
設置磁碟緩沖區 setvbuf
格式化輸入與輸出函數 格式輸出 fprintf
格式輸入 fscanf
格式輸出(控制台) printf
格式輸入(控制台) scanf
格式輸出到緩沖區 sprintf
從緩沖區中按格式輸入 sscanf
格式化輸出 vfprintf
格式化輸出 vprintf
格式化輸出 vsprintf
字元輸入輸出函數 輸入一個字元 fgetc
字元串輸入 fgets
字元輸出 fputc
字元串輸出 fputs
字元輸入(控制台) getc
字元輸入(控制台) getchar
字元串輸入(控制台) gets
字元輸出(控制台) putc
字元輸出(控制台) putchar
字元串輸出(控制台) puts
字元輸出到流的頭部 ungetc
直接輸入輸出 直接流讀操作 fread
直接流寫操作 fwrite
文件定位函數 得到文件位置 fgetpos
文件位置移動 fseek
文件位置設置 fsetpos
得到文件位置 ftell
文件位置復零位 remind
錯誤處理函數 錯誤清除 clearerr
文件結尾判斷 feof
文件錯誤檢測 ferror
得到錯誤提示字元串 perror

實用工具函數
本分類給出了一些函數無法按以上分類,但又是編程所必須要的。

頭文件 stdlib.h

函數列表
函數類別 函數用途 詳細說明
字元串轉換函數 字元串轉換為整數 atoi
字元串轉換為長整數 atol
字元串轉換為浮點數 strtod
字元串轉換為長整數 strtol
字元串轉換為無符號長整型 strtoul
偽隨機序列產生函數 產生隨機數 rand
設置隨機函數的起動數值 srand
存儲管理函數 分配存儲器 calloc
釋放存儲器 free
存儲器分配 malloc
重新分配存儲器 realloc
環境通信 中止程序 abort
退出程序執行,並清除環境變數 atexit
退出程序執行 exit
讀取環境參數 getenv
程序掛起,臨時執行一個其他程序 system
搜索和排序工具 二分查找(數據必須已排序) bsearch
快速排序 qsort
整數運算函數 求絕對值 abs
div
得到除法運算底商和余數
求長整形底絕對值 labs
求長整形除法的商和余數 ldiv
多位元組字元函數 得到多位元組字元的位元組數 mblen
得到多位元組字元的位元組數 mbtowc
多位元組字元轉換 wctomb
多位元組字元的字元串操作 將多位元組串轉換為整數數組 mbstowcs
將多位元組串轉換為字元數組 mcstowbs

字元串處理
本分類的函數用於對字元串進行合並、比較等操作

頭文件 string.h

函數列表
函數類別 函數用途 詳細說明
字元串拷貝 塊拷貝(目的和源存儲區不可重疊) memcpy
塊拷貝(目的和源存儲區可重疊) memmove
串拷貝 strcpy
按長度的串拷貝 strncpy
字元串連接函數 串連接 strcat
按長度連接字元串 strncat
串比較函數 塊比較 memcmp
字元串比較 strcmp
字元串比較(用於非英文字元) strcoll
按長度對字元串比較 strncmp
字元串轉換 strxfrm
字元與字元串查找 字元查找 memchr
字元查找 strchr
字元串查找 strcspn
字元串查找 strpbrk
字元串查找 strspn
字元串查找 strstr
字元串分解 strtok
雜類函數 字元串設置 memset
錯誤字元串映射 strerror
求字元串長度 strlen

日期和時間函數
本類別給出時間和日期處理函數

頭文件 time.h

函數列表
函數類別 函數用途 詳細說明
時間操作函數 得到處理器時間 clock
得到時間差 difftime
設置時間 mktime
得到時間 time
時間轉換函數 得到以ASCII碼表示的時間 asctime
得到字元串表示的時間 ctime
得到指定格式的時間 strftime

函數庫未來的發展方向
本部分用於說明各類別函數庫在將來如何發展。

序號 庫類別 頭文件 詳細說明
1 錯誤處理 errno.h
2 字元處理 ctype.h
3 地區化 local.h
4 數學函數 math.h
5 信號處理 signal.h
6 輸入輸出 stdio.h
7 實用工具程序 stdlib.h
8 字元串處理 string.h

❷ 「cosh」是什麼意思

「cosh」的意思:短棒,雙曲餘弦,用短棍打

1、讀音:英[kɒʃ] 美[kɑːʃ]

2、例句:The sinh,cosh,andtanhfunctionsalsoall appearinvariouscalculationsin

specialandgeneralrelativity.

雙曲正弦、雙曲餘弦和雙曲正切函數也會以常見或特殊形式出現在各種計算中。

(2)cosh在c語言中是什麼函數擴展閱讀:

「cosh」的近義詞介紹:stub

1、讀音:英[stʌb] 美[stʌb]

2、表達意思:短棒,存根,煙蒂,樹樁,斷株

3、相關短語:

pay stub工資單,工資存根,工資單據

check stub支票存根

4、例句:Ifthesestructureswere notdefinedthentheuseof astub wouldrequireone

oftwoscenarios.

如果這些結構不加以定義的話,存根的使用將需要一個或兩個方案。

❸ c語言中cos函數的用法

cos函數的輸入值為弧度,也就是將cos函數後加上弧度,然後就可以得到想要的結果。我們需要把度化為弧度:
假設度數為d,則對應的弧度為:d * pi / 180

❹ C語言題目。輸入一個不多於4位的正整數,求它的位數,並按逆序輸出各位數字。

#include<stdio.h>

intmain()
{
chardigtal[20];
intcount=0;
inti;
intnum;
scanf("%d",&num);
while(num)
{
digtal[count]=num%10;
num/=10;
count++;
}

printf("輸入%d,共%d位 ",num,count);
for(i=count-1;i>=0;i--)
printf("%d",digtal[i]);
return0;
}

❺ C語言中的標准函數有哪些

C語言輸入輸出函數有很多,標准I/O函數中包含了如下幾個常用的函數:
scanf,printf,getc,putc,getchar,putchar,gets,puts,fgets,fputs,fgetc,fputc,fscanf,fprintf等.
int
getc(FILE
*fp)
getc主要是從文件中讀出一個字元.常用的判斷文件是否讀取結束的語句為
(ch
=
getc(fp))
!=
EOF.EOF為文件結束標志,定義在stdio.h中,就像EXIT_SUCCESS,EXIT_FAILURE定義在stdlib.h中一樣,文件也可以被理解為一種流,所以當fp為stdin時,getc(stdin)就等同於getchar()了.
int
putc(int
ch,FILE
*fp)
putc主要是把字元ch寫到文件fp中去.如果fp為stdout,則putc就等同於putchar()了.
int
getchar(void)
getchar主要是從標准輸入流讀取一個字元.默認的標准輸入流即stdio.h中定義的stdin.但是從輸入流中讀取字元時又涉及到緩沖的問題,所以並不是在屏幕中敲上一個字元程序就會運行,一般是通過在屏幕上敲上回車鍵,然後將回車前的字元串放在緩沖區中,getchar就是在緩沖區中一個一個的讀字元.當然也可以在while循環中指定終止字元,如下面的語句:while
((c
=
getchar())
!=
'#')這是以#來結束的.
int
putchar(int
ch)
putchar(ch)主要是把字元ch寫到標准流stdout中去.
char
*
gets(char
*str)
gets主要是從標准輸入流讀取字元串並回顯,讀到換行符時退出,並會將換行符省去.
int
puts(char
*str)
puts主要是把字元串str寫到標准流stdout中去,並會在輸出到最後時添加一個換行符.
char
*fgets(char
*str,
int
num,
FILE
*fp)
str是存放讀入的字元數組指針,num是最大允許的讀入字元數,fp是文件指針.fgets的功能是讀一行字元,該行的字元數不大於num-1.因為fgets函數會在末尾加上一個空字元以構成一個字元串.另外fgets在讀取到換行符後不會將其省略.
int
fputs(char
*str,
file
*fp)
fputs將str寫入fp.fputs與puts的不同之處是fputs在列印時並不添加換行符.
int
fgetc(FILE
*fp)
fgetc從fp的當前位置讀取一個字元.
int
fputc(int
ch,
file
*fp)
fputc是將ch寫入fp當前指定位置.
int
fscanf(FILE
*fp,
char
*format,
輸入列表)
fscanf按照指定格式從文件中出讀出數據,並賦值到參數列表中.
int
fprintf(FILE
*fp,
char
*format,
輸出列表)
fprintf將格式化數據寫入流式文件中.
數據塊讀寫函數
fread
(buffer,size,count,fp);
fwrite(buffer,size,count,fp);
參數說明:
buffer:是一個指針。
對fread
來說,它是讀入數據的存放地址。
對fwrite來說,是要輸出數據的地址(均指起始地址)。
size:
要讀寫的位元組數。
count:
要進行讀寫多少個size位元組的數據項。
fp:
文件型指針。

❻ 在C語言中有那些函數名

僅僅為了獲取函數名,就在函數體中嵌入硬編碼的字元串,這種方法單調乏味還易導致錯誤,不如看一下怎樣使用新的C99特性,在程序運行時獲取函數名吧.對象反射庫、調試工具及代碼分析器,經常會需要在運行時訪問函數的名稱,直到不久前,唯一能完成此項任務並且可移植的方法,是手工在函數體內嵌入一個帶有該函數名的硬編碼字元串,不必說,這種方法非常單調無奇,並且容易導致錯誤。本文將要演示怎樣使用新的C99特性,在運行時獲取函數名。

那麼怎樣以編程的方式從當前運行的函數中得到函數名呢?

答案是:使用__FUNCTION__ 及相關宏。

引出問題

通常,在調試中最讓人心煩的階段,是不斷地檢查是否已調用了特定的函數。對此問題的解決方法,一般是添加一個cout或printf()——如果你使用C語言,如下所示:

void myfunc()
{
cout<<"myfunc()"<<endl;
//其他代碼
}

通常在一個典型的工程中,會包含有數千個函數,要在每個函數中都加入一條這樣的輸出語句,無疑難過上「蜀山」啊,因此,需要有一種機制,可以自動地完成這項操作。

獲取函數名

作為一個C++程序員,可能經常遇到 __TIME__、__FILE__、__DATE__ 這樣的宏,它們會在編譯時,分別轉換為包含編譯時間、處理的轉換單元名稱及當前時間的字元串。

在最新的ISO C標准中,如大家所知的C99,加入了另一個有用的、類似宏的表達式__func__,其會報告未修飾過的(也就是未裁剪過的)、正在被訪問的函數名。請注意,__func__不是一個宏,因為預處理器對此函數一無所知;相反,它是作為一個隱式聲明的常量字元數組實現的:

static const char __func__[] = "function-name";

在function-name處,為實際的函數名。為激活此特性,某些編譯器需要使用特定的編譯標志,請查看相應的編譯器文檔,以獲取具體的資料。

有了它,我們可免去大多數通過手工修改,來顯示函數名的苦差事,以上的例子可如下所示進行重寫:

void myfunc()
{
cout<<"__FUNCTION__"<<endl;
}

官方C99標准為此目的定義的__func__標識符,確實值得大家關注,然而,ISO C++卻不完全支持所有的C99擴展,因此,大多數的編譯器提供商都使用 __FUNCTION__ 取而代之,而 __FUNCTION__ 通常是一個定義為 __func__ 的宏,之所以使用這個名字,是因為它已受到了大多數的廣泛支持。

在Visual Studio 2005中,默認情況下,此特性是激活的,但不能與/EP和/P編譯選項同時使用。請注意在IDE環境中,不能識別__func__ ,而要用__FUNCTION__ 代替。

Comeau的用戶也應使用 __FUNCTION__ ,而不是 __func__ 。

C++ BuilderX的用戶則應使用稍稍不同的名字:__FUNC__ 。

GCC 3.0及更高的版本同時支持 __func__ 和__FUNCTION__ 。

一旦可自動獲取當前函數名,你可以定義一個如下所示顯示任何函數名的函數:

void show_name(const char * name)
{
cout<<name<<endl;
}

void myfunc()
{
show_name(__FUNCTION__); //輸出:myfunc
}

void foo()
{
show_name(__FUNCTION__); //輸出:foo
}

因為 __FUNCTION__ 會在函數大括弧開始之後就立即初始化,所以,foo()及myfunc()函數可在參數列表中安全地使用它,而不用擔心重載。

簽名與修飾名

__FUNCTION__ 特性最初是為C語言設計的,然而,C++程序員也會經常需要有關他們函數的額外信息,在Visual Studio 2005中,還支持另外兩種非標準的擴展特性:__FUNCDNAME__ 與 __FUNCSIG__ ,其分別轉譯為一個函數的修飾名與簽名。函數的修飾名非常有用,例如,在你想要檢查兩個編譯器是否共享同樣的ABI時,就可派得上用場,另外,它還能幫助你破解那些含義模糊的鏈接錯誤,甚至還可用它從一個DLL中調用另一個用C++鏈接的函數。在下例中,show_name()報告了函數的修飾名:

void myfunc()
{
show_name(__FUNCDNAME__); //輸出:?myfunc@@YAXXZ
}

一個函數的簽名由函數名、參數列表、返回類型、內含的命名空間組成。如果它是一個成員函數,它的類名和const/volatile限定符也將是簽名的一部分。以下的代碼演示了一個獨立的函數與一個const成員函數簽名間的不同之處,兩個函數的名稱、返回類型、參數完全相同:

void myfunc()
{
show_name(__FUNCSIG__); // void __cdecl myfunc(void)
}

struct S
{
void myfunc() const
{
show_name(__FUNCSIG__); //void __thiscall S::myfunc(void) const
}
};

❼ 能不能介紹下c語言中math.h中的函數的名稱和功能

abs() 好像是stdlib.h的函數吧?

math.h
The math header defines several mathematic functions.

Macros:

HUGE_VAL
Functions:

acos();
asin();
atan();
atan2();
ceil();
cos();
cosh();
exp();
fabs();
floor();
fmod();
frexp();
ldexp();
log();
log10();
modf();
pow();
sin();
sinh();
sqrt();
tan();
tanh();

2.7.1 Error Conditions
All math.h functions handle errors similarly.

In the case that the argument passed to the function exceeds the range of that function, then the variable errno is set to EDOM. The value that the function returns is implementation specific.

In the case that the value being returned is too large to be represented in a double, then the function returns the macro HUGE_VAL, and sets the variable errno to ERANGE to represent an overflow. If the value is too small to be represented in a double, then the function returns zero. In this case whether or not errno is set to ERANGE is implementation specific.

errno, EDOM, and ERANGE are defined in the errno.h header.

Note that in all cases when it is stated that there is no range limit, it is implied that the value is limited by the minimum and maximum values of type double.

2.7.2 Trigonometric Functions
2.7.2.1 acos
Declaration:

double acos(double x);
Returns the arc cosine of x in radians.

Range:

The value x must be within the range of -1 to +1 (inclusive). The returned value is in the range of 0 to pi (inclusive).

2.7.2.2 asin
Declaration:

double asin(double x);
Returns the arc sine of x in radians.

Range:
The value of x must be within the range of -1 to +1 (inclusive). The returned value is in the range of -p/2 to +p/2 (inclusive).
2.7.2.3 atan
Declaration:
double atan(double x);
Returns the arc tangent of x in radians.

Range:
The value of x has no range. The returned value is in the range of -p/2 to +p/2 (inclusive).
2.7.2.4 atan2
Declaration:
double atan2(doubly y, double x);
Returns the arc tangent in radians of y/x based on the signs of both values to determine the correct quadrant.

Range:
Both y and x cannot be zero. The returned value is in the range of -p/2 to +p/2 (inclusive).
2.7.2.5 cos
Declaration:
double cos(double x);
Returns the cosine of a radian angle x.

Range:
The value of x has no range. The returned value is in the range of -1 to +1 (inclusive).
2.7.2.6 cosh
Declaration:
double cosh(double x);
Returns the hyperbolic cosine of x.

Range:
There is no range limit on the argument or return value.
2.7.2.7 sin
Declaration:
double sin(double x);
Returns the sine of a radian angle x.

Range:
The value of x has no range. The returned value is in the range of -1 to +1 (inclusive).
2.7.2.8 sinh
Declaration:
double sinh(double x);
Returns the hyperbolic sine of x.

Range:
There is no range limit on the argument or return value.
2.7.2.9 tan
Declaration:
double tan(double x);
Returns the tangent of a radian angle x.

Range:
There is no range limit on the argument or return value.
2.7.2.10 tanh
Declaration:
double tanh(double x);
Returns the hyperbolic tangent of x.

Range:
The value of x has no range. The returned value is in the range of -1 to +1 (inclusive).
2.7.3 Exponential, Logarithmic, and Power Functions
2.7.3.1 exp
Declaration:
double exp(double x);
Returns the value of e raised to the xth power.

Range:
There is no range limit on the argument or return value.
2.7.3.2 frexp
Declaration:
double frexp(double x, int *exponent);
The floating-point number x is broken up into a mantissa and exponent.
The returned value is the mantissa and the integer pointed to by exponent is the exponent. The resultant value is x=mantissa * 2^exponent.

Range:
The mantissa is in the range of .5 (inclusive) to 1 (exclusive).
2.7.3.3 ldexp
Declaration:
double ldexp(double x, int exponent);
Returns x multiplied by 2 raised to the power of exponent.
x*2^exponent

Range:
There is no range limit on the argument or return value.
2.7.3.4 log
Declaration:
double log(double x);
Returns the natural logarithm (base-e logarithm) of x.

Range:
There is no range limit on the argument or return value.
2.7.3.5 log10
Declaration:
double log10(double x);
Returns the common logarithm (base-10 logarithm) of x.

Range:
There is no range limit on the argument or return value.
2.7.3.6 modf
Declaration:
double modf(double x, double *integer);
Breaks the floating-point number x into integer and fraction components.
The returned value is the fraction component (part after the decimal), and sets integer to the integer component.

Range:
There is no range limit on the argument or return value.
2.7.3.7 pow
Declaration:
double pow(double x, double y);
Returns x raised to the power of y.

Range:
x cannot be negative if y is a fractional value. x cannot be zero if y is less than or equal to zero.
2.7.3.8 sqrt
Declaration:
double sqrt(double x);
Returns the square root of x.

Range:
The argument cannot be negative. The returned value is always positive.
2.7.4 Other Math Functions
2.7.4.1 ceil
Declaration:
double ceil(double x);
Returns the smallest integer value greater than or equal to x.

Range:
There is no range limit on the argument or return value.
2.7.4.2 fabs
Declaration:
double fabs(double x);
Returns the absolute value of x (a negative value becomes positive, positive value is unchanged).

Range:
There is no range limit on the argument. The return value is always positive.
2.7.4.3 floor
Declaration:
double floor(double x);
Returns the largest integer value less than or equal to x.

Range:
There is no range limit on the argument or return value.
2.7.4.4 fmod
Declaration:
double fmod(double x, double y);
Returns the remainder of x divided by y.

Range:
There is no range limit on the return value. If y is zero, then either a range error will occur or the function will return zero (implementation-defined).

❽ cosh是什麼函數

。。。樓主悲劇了,最佳答案都選錯了,cosh是一個整體,是雙曲餘弦 。
參考資料是隨便找的一個例子。

❾ sinh和cosh的計算公式

sinh和cosh的計算公式分別是sinh=[e^x-e^(-x)]/2和cosh=[e^x+e^(-x)]/2。在數學中,雙曲函數是一類與常見的三角函數(也叫圓函數)類似的函數。sinh函數是雙曲正弦函數。cosh是雙曲餘弦函數。
最基本的雙曲函數是雙曲正弦函數sinh和雙曲餘弦函數cosh,從它們可以導出雙曲正切函數tanh等,其推導也類似於三角函數的推導。雙曲函數的反函數稱為反雙曲函數。雙曲函數的定義域是區間,其自變數的值叫做雙曲角。雙曲函數出現於某些重要的線性微分方程的解中,譬如說定義懸鏈線和拉普拉斯方程。

❿ 用C語言表示反正弦,反餘弦,反正切函數

計算反正切函數(使用歐拉變換公式,精度很高),反正切函數的級數展開公式:

f(x) = x - x^3/3 + x^5/5 +...+ (-1)^k * x^(2k+1)/(2k + 1)+...

當|x| > 1時,級數絕對值發散,無法直接使用歐拉公式計算。因此可以通過下面的公式
進行等價轉換之後再進行計算。

等價轉換公式:

a) ATan(1/x) = Pi/2 - ATan(x)
b) ATan(-x) = - ATan(x)

特殊情況

0 = ArcTan(0)
Pi/2 = ArcTan(無窮大)

//
// 歐拉公式
//
// sum是和,term是通項值,jterm初始為1,以後按1遞增。wrksp是工作單元,視jterm的
// 最大值而定。
//
void eulsum(int& nterm,double *sum,double term,int jterm,double wrksp[])
{
double tmp,m;

if(jterm == 1)
{
nterm = 1;
wrksp[1] = term;
*sum = 0.5 * term;
}
else
{
tmp = wrksp[1];
wrksp[1] = term;

for(int j=1; j <= nterm; j++)
{
m = wrksp[j+1];
wrksp[j+1] = 0.5 * (wrksp[j] + tmp);
tmp = m;
}

if(fabs(wrksp[nterm + 1]) <= fabs(wrksp[nterm]))
{
*sum = *sum + 0.5 * wrksp[nterm + 1];
nterm = nterm + 1;
}
else
{
*sum = *sum + wrksp[nterm + 1];
}
}
}

級數計算就不用我給代碼了吧。