Wikidata:Property proposal/number of decimal digits
number of decimal digitsEdit
Originally proposed at Wikidata:Property proposal/Natural science
Description | number of decimal digits of a natural number |
---|---|
Data type | Quantity |
Domain | non-negative integer |
Allowed values | \d+ |
Example 1 | 1234 (Q3814742) → 4 |
Example 2 | M13466917 (Q47107543) → 4,053,946 |
Example 3 | googol (Q507) → 101 |
Example 4 | googolplex (Q508) → 10,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,001 |
Planned use | Used to build queries and data tables |
Robot and gadget jobs | add to all current natural numbers, if applicable |
MotivationEdit
Prime Pages contains information about a huge number of primes, and this property stores the information in a machine-readable way.GZWDer (talk) 17:44, 30 August 2019 (UTC)
DiscussionEdit
@Okkn, ArthurPSmith, 99of9, Fnielsen, He7d3r, IvanP:
- Question should we try to make this item valued? Initially, I was opposed to that approach for prime factor (P5236), but it turned out quite well. --- Jura 11:48, 1 September 2019 (UTC)
- Item-value would allow for iterative application, so something with a googolplex digits could be described, which couldn't be done using the Wikidata quantity value. So I like that idea, yes. ArthurPSmith (talk) 17:34, 3 September 2019 (UTC)
- @GZWDer: Any opinions on item value for this? We do have googolplexplex (Q11300950) for example where this property could not be represented by a decimal value. ArthurPSmith (talk) 20:46, 4 September 2019 (UTC)
- I'm not a fan of creating ~100000 items for numbers like 4053946 whose only use it to represent number of digits of other numbers.--GZWDer (talk) 21:09, 4 September 2019 (UTC)
- @GZWDer: That seems greatly exaggerated. Most of the numbers in Wikidata are integers of no more than 5 digits. See this query which lists all numbers in Wikidata with numeric value over 100,000 - there are only 537. Now there are also some integers with no numeric value - presumably because it's too large to represent in our data model - this query provides that list - but only 232 of those. So we are adding at most 769 such values, and likely considerably less. ArthurPSmith (talk) 17:47, 5 September 2019 (UTC)
- Prime Pages lists more than 100000 numbers, all of which have more than 1000 digits (some of them have over 1000000).--GZWDer (talk) 23:05, 5 September 2019 (UTC)
- So it's ok to add 100000+ items for numbers from Prime Pages, but not to (almost) double that number by also adding items for their digit counts? ArthurPSmith (talk) 17:29, 6 September 2019 (UTC)
- @GZWDer: I agree with Arthur: given the current items, it should generate only a few additional items. The number of digits on the number of digits should generally be negligible too. How many did you compute? --- Jura 17:54, 7 September 2019 (UTC)
- Prime Pages lists more than 100000 numbers, all of which have more than 1000 digits (some of them have over 1000000).--GZWDer (talk) 23:05, 5 September 2019 (UTC)
- @GZWDer: That seems greatly exaggerated. Most of the numbers in Wikidata are integers of no more than 5 digits. See this query which lists all numbers in Wikidata with numeric value over 100,000 - there are only 537. Now there are also some integers with no numeric value - presumably because it's too large to represent in our data model - this query provides that list - but only 232 of those. So we are adding at most 769 such values, and likely considerably less. ArthurPSmith (talk) 17:47, 5 September 2019 (UTC)
- I'm not a fan of creating ~100000 items for numbers like 4053946 whose only use it to represent number of digits of other numbers.--GZWDer (talk) 21:09, 4 September 2019 (UTC)
- Support with the fix I made so the domain can be any real number (doesn't need to be a decimal number nor positive) and the allowed values to be positive real number (Q3176558) only. For the time being without "Number" being available as a data type, could "quantity" or "string" be used instead? Pixeldomain (talk) 06:40, 6 September 2019 (UTC)
- @Pixeldomain: How does this help? What is the number of decimal digits for pi (Q167)? ArthurPSmith (talk) 17:29, 6 September 2019 (UTC)
- In the absence of an explanation, I restored the original scope. --- Jura 06:24, 11 September 2019 (UTC)
- Done @Pixeldomain, GZWDer, ArthurPSmith: @ديفيد عادل وهبة خليل 2: please make good use of it. --- Jura 13:29, 16 September 2019 (UTC)
Notified participants of WikiProject Mathematics
- @ArthurPSmith, GZWDer, Jura1: I think what this property proposal is meant to represent is significant figure (Q1056761)? I updated subject item of this property (P1629) to reflect this, as well as labels of this new property. Pixeldomain (talk) 03:31, 17 September 2019 (UTC)
- @Pixeldomain: No, that is a VERY different meaning. significant figure (Q1056761) refers to some physical measurement, this property is a MATHEMATICAL concept. However, I am rather surprised that the property was created using the Quantity datatype when it seemed like we had good reasons to go with Item. As Quantity it means it simply can't be used for certain mathematical numbers that may be of real interest. ArthurPSmith (talk) 13:00, 17 September 2019 (UTC)
- @ArthurPSmith: What is the intended value for subject item of this property (P1629)? From a mathematics perspective, perhaps it is meant to be ban (Q324923), constrained to use on natural numbers only? This approach would be independent of the notation used to write the numbers. As defined at the moment, this property would only be useful to people using Hindu–Arabic numeral system (Q3059346) (or derivative) for writing numbers. For example, see Kanum language (Q5908646) (a writing system that includes a base 6 numeral system). I question whether this property would be necessary at all to represent the number of glyphs used to write a number in Hindu–Arabic numeral system (Q3059346) (or derivative) numeral systems. This information can obtained for any number by converting a "Number" value to a "String" using SPARQL (a process which could implement localization for different numeral systems), then measuring the number of glyphs in the resulting string. Pixeldomain (talk) 00:15, 18 September 2019 (UTC)
- I'm not sure decimal digits has any particular mathematical significance, other than being one more than the integer part of common logarithm (Q966582). ArthurPSmith (talk) 00:34, 18 September 2019 (UTC)
- If you need a property for some other scope, please propose it with relevant samples. You can create an item for "number of decimal digits" and add that with P1629. --- Jura 10:24, 18 September 2019 (UTC)