CampaignCriterion.bidModifier returned with many decimal places normal?
27 views
Skip to first unread message
JC Lee
unread,
Mar 13, 2017, 8:55:05 AM3/13/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to AdWords API Forum
Hi,
I am doing a CampaignCriterionService->mutate() operation with a bidModifier value of 1.05. The return value I get back is 1.0499999523163. Is this normal?
Shouldn't the API round it up to 2 decimal places before sending it back?
Shwetha Vastrad (AdWords API Team)
unread,
Mar 13, 2017, 12:34:22 PM3/13/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to AdWords API Forum
Hi,
Because there are only a finite number of double-precision numbers, you cannot represent all numbers in double-precision storage. On any system, there is a small gap between each double-precision number and the next larger double-precision number. Because of this, many numbers will have small changes to allow them to be stored. I suggest that you round up the value returned in the response to two decimal digits as shown in the SetBidModifier.php example.