I want to convert a number to a string with at most 15 digits to the right of the decimal point. By at most i mean that if last digits are
do you mean this ?
sprintf('%.15g', 3.0001001) ==> 3.0001001 sprintf('%.15g', 3.0001) ==> 3.0001