標準/拡張機能 | C/C++ | 依存項目 |
---|---|---|
C99 |
両方 | z/OS® V1R5 |
#define _ISOC99_SOURCE
#include <math.h>
double remquo(double x, double y, int *quo);
float remquof(float x, float y, int *quo);
long double remquol(long double x, long double y, int *quo);
#define _TR1_C99
#include <math.h>
float remquo(float x, float y, int *quo);
long double remquo(long double x, long double y, int *quo);
関数 | Hex | IEEE |
---|---|---|
remquo | X | X |
remquof | X | X |
remquol | X | X |
remquo 関数は、x を y で割った剰余を戻します。
/*
* This program illustrates the use of remquol() function
*
*/
#define _ISOC99_SOURCE
#include <math.h>
#include <stdio.h>
void main() {
long double number1=3.0L, number2=3.5L;
int quo=0;
printf("Illustrates the remquol() function");
#ifdef __BFP__
printf(" (IEEE version)¥n¥n");
#else
printf(" (HFP version)¥n¥n");
#endif
printf("remquol(%.2Lf,%.2Lf,&quo)=%.2Lf",number1,number2,remquol(number1,number2,&(quo)));
printf(" quo=%i¥n",quo);
number1=1.0L; number2=2.0L;
printf("remquol(%.2Lf,%.2Lf,&quo)=%.2Lf",number1,number2,remquol(number1,number2,&(quo)));
printf(" quo=%i¥n",quo);
number1=1.0L; number2=0.0L;
printf("remquol(%.2Lf,%.2Lf,&quo)=%.2Lf",number1,number2,remquol(number1,number2,&(quo)));
printf(" quo=%i¥n",quo);
}
出力:
Illustrates the remquol() function (IEEE version)
remquol(3.00,3.50,&quo)=-0.50 quo=1
remquol(1.00,2.00,&quo)=1.00 quo=0
remquol(1.00,0.00,&quo)=NaNQ(1) quo=0