![]() |
#1 |
Member
![]() Posts: 12
Karma: 10
Join Date: Jan 2015
Device: none
|
Entering more than two decimal places in floating point column
I feel like I am missing something very basic here: I’ve added a custom column with Column Type “Floating point numbers”, but I can only enter a max of two decimal places via the GUI. However, when I write directly to the database via a plugin/script, the field is capable of holding many more (e.g. when setting the custom column to format {0:.13f}, I can see precision to 13 decimal places).
Is there any way for me to enter more than two decimal places manually via the GUI? |
![]() |
![]() |
![]() |
#2 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,056
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
13 is the whole number portion
13.3F would have 3 decimal places (and 9 whole digits) |
![]() |
![]() |
![]() |
#3 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
The Reading Ease value was calculated by Count Pages. BR Last edited by BetterRed; 04-16-2022 at 01:35 AM. |
|
![]() |
![]() |
![]() |
#4 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,056
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
![]() that was what I use in a save template. I don't format columns very often. |
|
![]() |
![]() |
![]() |
#5 | |||
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Quote:
Code:
{:>13.3f:'300/2.1'} Quote:
|
|||
![]() |
![]() |
![]() |
#6 |
Member
![]() Posts: 12
Karma: 10
Join Date: Jan 2015
Device: none
|
Got it! Formatting strings change how a number is displayed, but have no effect on the number's actual value or on how the GUI allows/requires entry (such as only allowing two decimal places) - this is determined by the configuration of each GUI widget in the Calibre code.
Thanks to everyone for your quick and helpful responses - very much appreciated! ![]() |
![]() |
![]() |
![]() |
#7 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
You can now specify the number of decimal digits allowed when editing a float in the custom column type editor.
|
![]() |
![]() |
![]() |
#8 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,974
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Just curious: Is there an option for unlimited numbers? Though I could see it causing issues, and I imagine an arbitrary high number like 99 would work just as well.
|
![]() |
![]() |
![]() |
#9 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Nope. The range for decimals (digits after the decimal point) is 1 to 9.
Last edited by chaley; 04-16-2022 at 02:33 PM. Reason: Clarified |
![]() |
![]() |
![]() |
#10 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre2opds: Custom Catalogs: How can I point to a custom column? | LivresInOz | Related Tools | 7 | 03-31-2021 11:14 AM |
Can’t get title sorting to work properly with series that has decimal places | Rockstead | Calibre | 3 | 12-25-2020 09:49 AM |
Decimal "Rating" column (Custom) and Stars | Chris_Snow | Library Management | 6 | 04-06-2015 12:25 PM |
Formatting Floating Point # Custom Column | GeekyGal | Library Management | 3 | 06-03-2011 05:34 PM |
Help with Search - Floating Point Number | nynaevelan | Library Management | 16 | 04-13-2011 06:37 AM |