-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
bugConfirmed, replicable bugConfirmed, replicable bug
Description
Describe the bug
Some operators return unexpected results when used without input, e.g. [filter that can return nothing] +[maxall[]]
.
In particular,
sum[]
- currently returns 0
product[]
- currently returns 1
maxall[]
- currently returns -Infinity
minall[]
- currently returns Infinity
average[]
- currently returns NaN
variance[]
- currently returns NaN
standard-deviation[]
- currently returns NaN
Expected behavior
I think that according to normal usage, all of these should return nothing in this situation.
A fix could be pretty straightforward, but would not be backwards compatible. Alternatively, we could add a parameter to each with a default value for such situations, but that is really ugly.
To Reproduce
- Go to tiddlywiki.com
- Go to $:/AdvancedSearch → Filter
- Enter
+[maxall[]]
- Observe the result "-Infinity"
Screenshots
No response
TiddlyWiki Configuration
- Version 5.3.8
Additional context
No response
Metadata
Metadata
Assignees
Labels
bugConfirmed, replicable bugConfirmed, replicable bug