#include "libm.h"floatmodff(floatx,float*iptr){union{floatf;uint32_ti;}u={x};uint32_tmask;inte=(int)(u.i>>23&0xff)-0x7f;/* no fractional part */if(e>=23){*iptr=x;if(e==0x80&&u.i<<9!=0){/* nan */returnx;}u.i&=0x80000000;returnu.f;}/* no integral part */if(e<0){u.i&=0x80000000;*iptr=u.f;returnx;}mask=0x007fffff>>e;if((u.i&mask)==0){*iptr=x;u.i&=0x80000000;returnu.f;}u.i&=~mask;*iptr=u.f;returnx-u.f;}