negate - negationabs - absolute valueceil - smallest integer greater than or equal to a given numberfloor - the largest integer less than or equal to a given numberround - the value of a number rounded to the nearest integertrunc - the integer part of a number by removing any fractional digitssign - the sign of a number, indicating whether the number is positive, negative or zeroadd - add an operand to every number in the input listsubtract - subtract an operand from every number in the input listmultiply - multiply every number in the input list by an operanddivide - divide every number in the input list by an operandremainder - replace each item in the input list with the remainder when dividing that number by an operandmax - replace any number in the input list larger than the operand with the operandmin - replace any number in the input list smaller than the operand with the operandfixed - formats a number using fixed-point notation with the number of fractional digits after the decimal point given by the operandprecision - returns a string representing the number to the precision specified in the operandexponential - returns a string representing the Number object in exponential notation with the number of digits after the decimal point specified in the operandsum - replaces the input list with the sum of all the entriesproduct - replaces the input list with the product of all the entriesmaxall - replaces the input list with the maximum value of all the entriesminall - replaces the input list with the minimum value of all the entrieslength - replaces each item in the input list with its string length in charactersuppercase - replaces each item in the input with its uppercase equivalentlowercase - replaces each item in the input with its lowercase equivalenttrim - trims each item in the input listconcat - concatenates all of the items in the input list into a single stringsplit - splits each of the items in the input list by a given separatorjoin - joins all of the items in the input list with a given separator
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/1eaad72c-4e80-4999-926c-13cf7ea16ba8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
{{{ filter }}}
that transcludes the result of the filter will be common ways of using the "math filters"I am concerned about new users who want to implement maths but have not yet fully grasped filter concepts, this includes variables, transclusions and references in maths filters.
Could we try and make the documentation spell out how to achieve common uses? I would be happy to contribute here of course.
I am keen to ensure we document how to use maths in the following high level cases with variables, transclusions and references
- Within wikiText
- Within Filters (in this case interacting with title lists)
- Within Widgets and HTML - Parameters and Attributes
- Within macro definitions / macro body
- Within a Macro call or for a "macro parameter"
- and Concatenating values for use in maths formulae
Since this is new I am not yet in a position to test it, but will we be able to retrieve the maths results an use them in the above as easily as we can with Evans (= mushroom brackets =) ? Perhaps we can provide an easy method to allow "substitution" of a maths result such as $(mathresult)$ may imply.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/1cefed6d-d923-48dd-8f15-c83c55565cc1%40googlegroups.com.
- Could we have an "inc" or increment that adds one (or n) to its input as this is a useful and commonly used alternative to add 1 to self?.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/1f403eb9-12fe-4f61-bbc0-d275d42259aa%40googlegroups.com.
Note that there's nothing specific about the maths operators; they are used just the same as the other filter operators. If you know how to use filter operators then you know how to use the new maths operators.
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/2382c1ed-18de-44b2-8a9d-c13a016d5922%40googlegroups.com.
This is wonderful thank you! In the example on the docs you have to filter twice = once to get the count, then another to get an array of lengths, sum them and then divide.Can we also add a "mean" operator?
BestDiego
On Thursday, February 7, 2019 at 6:06:59 PM UTC-6, TonyM wrote:Jeremy,So to be clear, you believe, using the triple curly braces will be sufficient to place calculated values anywhere we want?Note that there's nothing specific about the maths operators; they are used just the same as the other filter operators. If you know how to use filter operators then you know how to use the new maths operators.What I am saying is this is not so easy for new users, learning filter operators, so I believe the documentation must provide the guidance they need. I am suggesting some explicit guidance on using filters for maths so a complete understanding of filters is not a pre-requisite for maths operations. There are a few places in TiddlyWiki where we put people in this bind,"they need to know more before they can start to learn the basics, but you need the basics so you can learn more".I recognise this because I remember my own journey, but this is hard for people with a deep knowledge of TiddlyWiki to recognise.This can be addressed in documentation, which I will contribute to, however I think it important for the development process to take this into account.Yours, working towards world domination by TiddlyWikiRegards,Tony
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/25f5e2f6-8f0f-4f8a-8c79-6a14b737f91f%40googlegroups.com.
I can already see the new maths will considerably ease making simple things like invoices and allowance trackers.
Great stuff!Josiah
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/f72e38b4-d324-408d-93db-92695358aa04%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/35153bbc-e046-4293-86db-de024ae8b9bd%40googlegroups.com.
In another thread, there was some discussion about the split operator. It exhibits some interesting behaviour when using split[] with no arguments:
- it produces a list of single characters from the input string - this seems like a sensible edge case behaviour.
- it does not exhibit the usual uniqueness property of filter lists - duplicates are passed through to the output.
- The output can include single space characters - this is tricky considering lists are space delimited.
Are these behaviours by design and will continue to exist in the final release of 5.1.20 and subsequent releases? If so, the split operator can be used for some useful string manipulation hacks.
Regards,Mal
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/140182eb-2acf-4299-b172-c6899822d32e%40googlegroups.com.
Regards,
Mal