Repository navigation
Conversation
|
Fix many bug |
SupTan85
left a comment
There was a problem hiding this comment.
some feature is not work correcly, trim feature
maybe i will rewirte everything soon...
|
many thing was changed, it will take a while to review it all |
|
|
||
| local breaktime = B_LIMIT | ||
| for i = 0, rap._dlen, -1 do | ||
| for i = rap._dlen or 0, -1 do |
There was a problem hiding this comment.
rap._dlen is negative number, wrong loop setting
| end, | ||
|
|
||
| div = function(self, a, b, s, f, l) -- _size maxiumum *1 (`f` The maxiumum number of decimal part, `l` The maximum number of iterations to perform.) **chunk size should be same** | ||
| div = function(self, a, b, s, f, l, _bypass) -- _size maxiumum *1 (`f` The maxiumum number of decimal part, `l` The maximum number of iterations to perform.) **chunk size should be same** |
There was a problem hiding this comment.
sorry but why _bypass is exsited?
i checked it and i saw it just disable warning of "MASTER_CALCULATE_DIV_BYPASS_GEN_FLOATING_POINT" error.
this option shouldn't be editable except for in development
| -- issue checker >> | ||
| if not lp then | ||
| if master._config.OPTION.MASTER_CALCULATE_DIV_BYPASS_GEN_FLOATING_POINT then | ||
| if use_bypass then |
There was a problem hiding this comment.
same suggest in this link:
https://github.com/SupTan85/int/pull/9/changes#r4167853073
| if shift < s then | ||
| local lastcut = -shift | ||
| lastcut_num = tostring(x[new_dlen]):sub(lastcut, lastcut) | ||
| lastcut_num = tostring(x[new_dlen] or 0):sub(lastcut, lastcut) |
There was a problem hiding this comment.
"or 0" is not require because it cut index that always existed
| lastcut_num = tostring(x[new_dlen] or 0):sub(lastcut, lastcut) | ||
|
|
||
| local new_value = floor(x[new_dlen] * (10 ^ -shift)) * floor(10 ^ shift) | ||
| local new_value = floor((x[new_dlen] or 0) * (10 ^ -shift)) * floor(10 ^ shift) |
There was a problem hiding this comment.
| if length then | ||
| ---@diagnostic disable-next-line: param-type-mismatch | ||
| return setmetatable(custom:cround(x, length, 0), master._metatable) | ||
| local x_copy = master.copy(x) |
There was a problem hiding this comment.
this low-level function and it just for modified only and need to be fastest, in this case you made this function using "master.copy" and add something that existed in "custom.cround".
this changed possible to make some function that using it slowed, and all feature that you added it are on high-level function for who import this module
fix spell "UNKNOW" to "UNKNOWN"
:>