473,395 Members | 1,541 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Logic of JSTL fmt tag in displaying decimal numbers

hi ,

We have the below code in our jsp

<fmt : formatNumber MaxFraction Digits="1" MinFraction Digits="1" value=$variable >

if the variable value is 6.650996 it prints 6.7
if the variable value is 6.652273 it prints 6.7
if the variable value is 6.65 it prints 6.6

we actually expect 6.65 also to be printed us 6.7
It would be very helpful if anyone could explain us the logic of fmt in converting decimal numbers...
Oct 2 '11 #1
0 1708

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: gary | last post by:
I want to pick all intergers and decimal numbers out of a string. Would this be the most correct regular expression to use? "\d+\.?\d*"
5
by: Mattias Brändström | last post by:
Hello! I am trying to find a minimal class/lib that handles arbitrary precision decimal numbers. I would be happy if this class supported as little as addition, subtraction, multiplication,...
5
by: | last post by:
Ok, I know this sounds bizarre and I regret to say it has me baffled. New decimal fields in tables will accept entry of decimal numbers but immediately change same into integers. Can someone...
3
by: Gustaf Liljegren | last post by:
I searched for previous answers on this, but couldn't find something fitting. I need advice on how to store decimal numbers with possible null values in memory. The numbers may be negative, so...
6
by: Stropher | last post by:
Hi! I just want to update a column in a table having a value of a decimal number. Then I tried this via sql-query analyzer update tablepost set preis = 0.71 where idnumber = 50 It worked...
13
by: Girish Sahani | last post by:
Hi, I want to truncate every number to 2 digits after the decimal point. I tried the following but it doesnt work. >>> a = 2 >>> b = 3 >>> round(a*1.0 / b,2) 0.67000000000000004
3
by: DustWolf | last post by:
Hello, I am wondering, what is the standard for including decimal numbers in XML code? What determines what is the decimal delimiter and what can be the grouping symbol? I have just realized...
1
by: Twanne | last post by:
Hi, I've got some code in VBA where I calculate some numbers. Now some of them are large decimal numbers like -6,3216324E03. So in scientific notations. Now I need to add them to a table with an...
1
by: mickey22 | last post by:
Hi all, I want to specify a limit of numbers to be printed after the decimal point .Could anyone tell me what to use in vc++ ? eg: 5.3446785 I want to print just 5.34467 Thanks.
1
by: Lura | last post by:
In an effort to learn how to work with information in files, I am writing a program that opens an already existing file containing decimal numbers. It then takes the decimals, sorts them, and returns...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.