Skip to content

Commit 1d303b5

Browse files
author
Davis McClellan
committed
Fixes small number rounding issue formula questions
fixes CNVS-22981 test plan: - Create a Formula question which uses 1 decimal place - Use a set of numbers which would generate a two decimal answer ending in a 5 - Ensure that number rounds as expected Change-Id: Id8bcd017795b85b60636bcc0d202b55ad74b3bdf Reviewed-on: https://gerrit.instructure.com/63706 Tested-by: Jenkins Reviewed-by: Brian Finney <bfinney@instructure.com> QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com> Product-Review: Jason Sparks <jsparks@instructure.com>
1 parent 446930d commit 1d303b5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

public/javascripts/calcCmd.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ define([
205205
} else if(item.token == 'divide') {
206206
var left = round2.pop();
207207
var right = round1[idx + 1];
208-
round2.push(numberItem(compute(left) / compute(right)));
208+
round2.push(numberItem(+(compute(left) / compute(right)).toFixed(12)));
209209
} else {
210210
round2.push(round1[idx]);
211211
round2.push(round1[idx + 1]);

0 commit comments

Comments
 (0)