"NaN" means "not a number."Ah ok.
But when I look up what the outcome of dividing by zero should be called (in English), some say it is 'undefined' (since it can not be defined), others say it is 'infinite' (hence the infinity symbol)
'NaN' is probably a third way of saying pretty much the same?
But what I was mainly wondering about looking at my simple test:
Why does 2 divided by 0 output: 'infinity', but 0 divided by 0: 'NaN'?
Shouldn't they output the same? (for consistency’s sake)
So, I have had an Amazing Discovery/Revelation:
While I have always been aware that Boroda's Additional Tagging & Reporting Tools plugin had additional functions available that MusicBee doesn't (such as these four arithmetical functions), it never dawned upon me that as soon as you install this plugin, you can use these additional functions for MusicBee's virtual formulas.
Without the need of even opening or looking at the AT&RT plugin.
So this is why these functions don't show in MusicBee's Template Editor.
Please tell me that I am not the only one that never knew this?
If the arithmetic functions are being used a lot i can include native support in MB. Let me know which ones you use
basic arithmetic
name syntax Add $Add(number1,number2) Sub $Sub(number1,number2) Mul $Mul(number1,number2) Div $Div(number1,number2)
other arithmetic
name syntax Abs (absolute) $Abs(number) Mod (modulus) $Mod(number1,number2)
Boolean operations
name syntax Not $Not(parameter)
string operations
name syntax Len $Len(string): length of string CutLeft $CutLeft(string,count) CutRight $CutRight(string,count)
time and date
name syntax AddDuration $AddDuration(duration1,duration2) AddDurationToDateTime $AddDurationToDateTime(datetime,duration) Now $Now() NumberOfDays $NumberOfDays(datetime1,datetime2) SubDateTime $SubDateTime(datetime1,datetime2) SubDuration $SubDuration(duration1,duration2) SubDurationFromDateTime $SubDurationFromDateTime(datetime,duration)
To be honest, personally I am not using these functions an awful lot, but I think that the ones that Boom Boom filtered out and is suggesting make sense to possibly be available by default.If the arithmetic functions are being used a lot i can include native support in MB. Let me know which ones you useFor now, things are a-ok, so it's not a priority to implement them, but I use these everywhere...
…great explanation…Thanks for this. I feel smarter after reading what you wrote ;-)
$Abs(<field>)
$Add(<field>,<field>)
$CutLeft(<field>,length)
$CutRight(<field>,length)
$Div(<field>,<field>)
$Mod(<field>,<field>)
$Mul(<field>,<field>)
$Not(logical-condition)
$Sub(<field>,<field>)
https://getmusicbee.com/patches/MusicBee35_Patched.zip
these have been added nativelyCode$Abs(<field>)
$Add(<field>,<field>)
$CutLeft(<field>,length)
$CutRight(<field>,length)
$Div(<field>,<field>)
$Mod(<field>,<field>)
$Mul(<field>,<field>)
$Not(logical-condition)
$Sub(<field>,<field>)