You are not logged in.
As shown in the sample code on gist , the ExtendedToStr behaves inconsistently between FPC and Delphi. Could you help to suggest the workaround ?
PS: FloatToStrF and Format seem to behave inconsistent within FPC, and between FPC and Delphi.
Offline
Yes, this is a known inconsistency, since they have two diverse implementations.
Sad to hear. It should be noted that ExtendedToStr behaves also inconsistently between Delphi25Tokyo's Win32 and Win64.
Offline
Dealing with floating with big precision is always a problem. In our applications we try to avoid it by limiting precision part to maximum 4 digits and adding division(factor). For example if we need to store 8 digits precision (0.66599631) we store 2 field {value: 6659.9631, factor: 10000}. Hope it's help
Offline
Dealing with floating with big precision is always a problem. In our applications we try to avoid it by limiting precision part to maximum 4 digits and adding division(factor). For example if we need to store 8 digits precision (0.66599631) we store 2 field {value: 6659.9631, factor: 10000}. Hope it's help
Many thanks for your clever experience ! Is it because a number with maximum 4 digits can be exactly represented as Currency type ?
Offline