double d =9999.221221312123123;
NSString *dStr = [NSString stringWithFormat:@"%f", d];
NSDecimalNumber *dn = [NSDecimalNumber decimalNumberWithString:dStr];
NSString *str = [dn stringValue];
double d =9999.221221312123123;
NSString *dStr = [NSString stringWithFormat:@"%f", d];
NSDecimalNumber *dn = [NSDecimalNumber decimalNumberWithString:dStr];
NSString *str = [dn stringValue];
本文标题:iOS数字精度处理
本文链接:https://www.haomeiwen.com/subject/vxiuqftx.html
网友评论