You are not logged in. Click here to log in.

Application Lifecycle Management

Search In Project

Search inClear

R-Code Rounding Error (Q_for_mean_depth)#98004/HEAD / v11
Tags:  not added yet

R-Code Rounding Error (Q_for_mean_depth)[R2Cross-98004]

Tracker: CWCB - R2Cross Priority: NormalNormal Status: Closed
Submitted by: tcwibleJun 01 2022 10:03 Modified by: tcwibleJun 30 2022 10:28 Assigned to:
--
Closed at: Jun 30 2022 10:28
Traceability
Loading…
Description
Kara and Brandy have found a rounding issue with the habitat criteria 'mean depth' for the VPE method for Disappointment Creek 6-29-16 #3.xlsx (also here https://r2crossdev.erams.com/r2cross/?token=9bS2dWKnGX but will lose this token after server restart)


Specifically, the final value (9.385) should be 9.386 based on the raw values in the staging table (see manual interpolation from Brandy below)

image.png

image.png

Details
Comments & Attachments (9)
Associations
Children
SCM Commits (1)
History (11)
Baselines
All (12)

Filter
Submitted Comment
mkor
Jun 22 2022 11:17
Long-term we might want to step away from using "toFixed" since it genuinely is written to round <= 0.5 down (as opposed to the expected < 0.5) in certain browsers due to how floating point values are stored behind the scenes. But this pre-emptive rounding in python will do the trick for now
mkor
Jun 22 2022 11:12
tcwible I'm getting the expected 9.39 on the React side with this sample file, both before and after the "toFixed" call
tcwible
Jun 21 2022 14:42
Not quite, we did all the extra pieces in R, but I want you to debug/test the React-side of it to make sure this is working as expected here:

1655844181820.png 135.4 KB
mkor
Jun 21 2022 13:51
tcwible This appears to be resolved already in versions 1.5.16+
tcwible
Jun 02 2022 11:28
mkor Added placeholders in text for testing a fix for rounding.
tcwible
Jun 01 2022 14:59
By-hand running of R2Cross R code results in 9.38512 (which will not round to 3.386). However, both values should round to 9.39. Checking that next.
tcwible
Jun 01 2022 10:05
For reference:


1654099504365.png 117.3 KB
tcwible
Jun 01 2022 10:04
Digging into the interface and I can confirm this issue. Working with Matthew next on determining the R-code rounding issue
tcwible
Jun 01 2022 10:03
1654099321381.png 36.1 KB
1654099321406.png 9.1 KB
Disappointment Creek 6-29-16 #3.xlsx 181 KB