I am not sure that Java has tools for it but if there is a solution in Java it would be awesome. For example, I need to increment fifth significant digit in Double / Decimal / BigDecimal or similar variable.
// Left is what I have. Right is what I need to get
12345 -> 12346
1234567 -> 1234667
123 -> 123.01
0.12345 -> 0.12346
0.1 -> 0.10001
0.0012345 -> 0.0012346
123.5 -> 123.51
12.5 -> 12.501
0.000123456789 -> 0.000123466789
Is there any solution to increment / decrement fixed significant digits?
EDIT:
Inaccurate arithmetic is OK. I.e. if we turn 12.5 to 12.50100000000041 its OK.
Min input value is 0.00001. Max input value is 100000.0.
Max significant digit to increment/decrement is 5.
I.e. min output value after increment is 0.000010001
Length from highest significant digit to least significant digit is no more than 10
P.S. Please, test your solution at least with all example numbers listed in this question before posting an answer. I will check all answers to find the most effective solution. The fastest method will be marked as a correct one.