SV maths and rounding

Advanced automation available in Guardian - Chat with others and share files here.
Post Reply
Chroma34
Posts: 33
Joined: Tue Jan 02, 2024 12:36 pm

In Guardian, when a Stored Value is shown/logged to 3 decimal places, is that rounding only for display/log output, or are calculations (e.g., 1 / SV) performed using the full underlying precision of the Stored Value? I’m seeing CS_AwayWinProbs = 0.103 but CS_AwayWinPrice = 1 / 0.103 outputs 9.678 (which implies prob ≈ 0.103326), so I need to know whether BA uses full precision internally and just rounds the display, or whether something else is happening with Stored Value maths.

Thanks
User avatar
jamesedwards
Posts: 5073
Joined: Wed Nov 21, 2018 6:16 pm

Chroma34 wrote:
Mon Dec 15, 2025 6:33 pm
In Guardian, when a Stored Value is shown/logged to 3 decimal places, is that rounding only for display/log output, or are calculations (e.g., 1 / SV) performed using the full underlying precision of the Stored Value? I’m seeing CS_AwayWinProbs = 0.103 but CS_AwayWinPrice = 1 / 0.103 outputs 9.678 (which implies prob ≈ 0.103326), so I need to know whether BA uses full precision internally and just rounds the display, or whether something else is happening with Stored Value maths.

Thanks
I believe the selected rounding option is used for display and calculation.

If you want to keep the original value for calcs but round the display then you need to use two separate SVs, one with rounding and one without.
Last edited by jamesedwards on Mon Dec 15, 2025 7:00 pm, edited 1 time in total.
Chroma34
Posts: 33
Joined: Tue Jan 02, 2024 12:36 pm

jamesedwards wrote:
Mon Dec 15, 2025 6:56 pm
Chroma34 wrote:
Mon Dec 15, 2025 6:33 pm
In Guardian, when a Stored Value is shown/logged to 3 decimal places, is that rounding only for display/log output, or are calculations (e.g., 1 / SV) performed using the full underlying precision of the Stored Value? I’m seeing CS_AwayWinProbs = 0.103 but CS_AwayWinPrice = 1 / 0.103 outputs 9.678 (which implies prob ≈ 0.103326), so I need to know whether BA uses full precision internally and just rounds the display, or whether something else is happening with Stored Value maths.

Thanks
I believe the selected rounding option is used for display and calculation.

If you want to keep the original value for calcs but round the display SV then choose no rounding for one SV and save a display version of the SV with desired rounding under a different name.
Thanks James, I don't round anything, hence the question, I am not sure what is actually happening in the background
User avatar
jamesedwards
Posts: 5073
Joined: Wed Nov 21, 2018 6:16 pm

Chroma34 wrote:
Mon Dec 15, 2025 7:00 pm
jamesedwards wrote:
Mon Dec 15, 2025 6:56 pm
Chroma34 wrote:
Mon Dec 15, 2025 6:33 pm
In Guardian, when a Stored Value is shown/logged to 3 decimal places, is that rounding only for display/log output, or are calculations (e.g., 1 / SV) performed using the full underlying precision of the Stored Value? I’m seeing CS_AwayWinProbs = 0.103 but CS_AwayWinPrice = 1 / 0.103 outputs 9.678 (which implies prob ≈ 0.103326), so I need to know whether BA uses full precision internally and just rounds the display, or whether something else is happening with Stored Value maths.

Thanks
I believe the selected rounding option is used for display and calculation.

If you want to keep the original value for calcs but round the display SV then choose no rounding for one SV and save a display version of the SV with desired rounding under a different name.
Thanks James, I don't round anything, hence the question, I am not sure what is actually happening in the background
I see. I don't know the answer to that one.
Chroma34
Posts: 33
Joined: Tue Jan 02, 2024 12:36 pm

jamesedwards wrote:
Mon Dec 15, 2025 7:03 pm
Chroma34 wrote:
Mon Dec 15, 2025 7:00 pm
jamesedwards wrote:
Mon Dec 15, 2025 6:56 pm


I believe the selected rounding option is used for display and calculation.

If you want to keep the original value for calcs but round the display SV then choose no rounding for one SV and save a display version of the SV with desired rounding under a different name.
Thanks James, I don't round anything, hence the question, I am not sure what is actually happening in the background
I see. I don't know the answer to that one.
Ok, thanks
Chroma34
Posts: 33
Joined: Tue Jan 02, 2024 12:36 pm

BA AI bot said: In Bet Angel, when a Stored Value is displayed to 3 decimal places, it typically means that the rounding is only for display or log output purposes. The calculations, such as dividing 1 by the Stored Value (SV), are performed using the full underlying precision of the Stored Value.

In your example, if you see CS_AwayWinProbs = 0.103, the calculation CS_AwayWinPrice = 1 / 0.103 resulting in approximately 9.678 suggests that the internal representation of the probability is indeed more precise (approximately 0.103326). Therefore, Bet Angel uses the full precision for calculations while rounding the output for display purposes.
User avatar
jamesedwards
Posts: 5073
Joined: Wed Nov 21, 2018 6:16 pm

Chroma34 wrote:
Mon Dec 15, 2025 7:12 pm
BA AI bot said: In Bet Angel, when a Stored Value is displayed to 3 decimal places, it typically means that the rounding is only for display or log output purposes. The calculations, such as dividing 1 by the Stored Value (SV), are performed using the full underlying precision of the Stored Value.

In your example, if you see CS_AwayWinProbs = 0.103, the calculation CS_AwayWinPrice = 1 / 0.103 resulting in approximately 9.678 suggests that the internal representation of the probability is indeed more precise (approximately 0.103326). Therefore, Bet Angel uses the full precision for calculations while rounding the output for display purposes.
Yes, you can prove this easily enough with a simple equation:

15/12/2025 19:19:55: [G_Auto 1] : Store Value for market: test = 1 / 3 = 0.333
15/12/2025 19:19:55: [G_Auto 1] : Store Value for market: test x 3 = 0.333 * 3 = 1

If it used the rounded figure for calcs then "test x 3" would = 0.999
Post Reply

Return to “Bet Angel - Automation”