- (NSString *)accuracyString
{
//直接传入精度丢失有问题的Double类型
double conversionValue = [self doubleValue];
NSString *doubleString = [NSString stringWithFormat:@"%lf", conversionValue];
NSDecimalNumber *decNumber = [NSDecimalNumber decimalNumberWithString:doubleString];
return [decNumber stringValue];
}
网友评论