# Decimal Questions

Ad

## How to reduce scale in python decimal value

I have a decimal value as decimal('3.10e-7'). how to convert it to decimal('3.1e-7)? i have some function (which

## Convert a decimal array to string format in golang

I want to convert a decimal array to text in string format in golang, is there any function in golang that supports this. can you give me a sample

## Merge binary Strings and Insert bits in C

Function insertbits x and y are two integer values. the function insertbits must insert all the bits of y after the last set bit in

## Convert 64-Bit Binary floating-point number into a base 10 decimal

I have a task to convert a 64-bit binary floating-point number into a base 10 decimal. an example here:

## Different behavior with diffrent device in DecimalFormat

I have an edittext that converts user input, for example, 1000000 to 1,000,000. this is the code i use as a converter:

## Java BigDecimal vs R vs Java Float, Double

I am working on a financial system where precision required is 6 decimal places only. we are currently using r but converting to java. i had a

## I want when a random number to show as 2 decimal places even if it comes up as an integer

I have a random number generated, then i use round to get it to 2 decimal places. occasionally i get an integer such as "2" i would like

## pandas string method to handle decimal places

Here is my little sample dataframe: import pandas as pd import numpy as np size = 10000 arr1 = np.tile([1/5000,1/12000,1/7000],

## Decimal fixed precision

I would like to use decimal in currency calculations, so i would like to work on exactly two numbers after comma. initially i thought that

## Android- TextView Set decimal value incorrectly printing comma

For localising my app i am using strings.xml for three languages i have a statement current balance: rs. %0.2f i populate

Ad

## Finding a number up to n decimal places in Python. Also, is math.pi from python reliable?

I saw here how to find the sqrt(2) up to 100 digits in python: import decimal number = decimal.decimal(2) precision =

## How to do exact decimal number calculation in pandas?

My dataframe looks something like this: import pandas as pd df = pd.read_sql('select * from

## c# wrong number when calculating percentage

Trying to calculate and subtract the price of something, but keeps coming up wrong, and adds an extra 500m to it and cannot understand why.

## How to take two numbers after decimal point , Number is -7.922816251426434e+28 in flutter

I need to take just two numbers after decimal point, i'm getting weird numbers in json response which i have to handle , numbers like

## How to convert a very large decimal number to a string?

I want to convert the decimal number 123.456e+304 to the string "123.456e+304" (the position of the decimal point

## How to create a Kotlin Decimal Formatter

I would like to create a decimal formatter that would display up to 2 decimal digits, with a given separator. for example with separator

## How to set a rounded value from double number

I'm trying to calculate the average based on user input. now i've got the basics working. but when i put in numbers that would be 1\3's etc. i get

## How to retrieve decimal value from Integer?

I'm trying to calculate the average based on user input. now i've got the basics working, but i am only getting whole numbers as result. i want

## Format number using decimal format in kotlin

I am facing an issue where i need to do some calculations with a number like for example 5000,00 multiplied it by

## Keep zero character when convert from DEC to HEX in Node JS

I am currently reading the id number of the energy meter with node js and serialport library. the power meter id has the following format xx xx xx

## How to deal with commas for decimal AND thousand separator

Due to reasons that are not important here, i have an excel sheet where my numbers have commas for decimal points as well as thousands separators.

Ad

## Java BigDecimal vs Android BigDecimal

I've faced java.math.bigdecimal and android.icu.math.bigdecimal as i require to use bigdecimal in the

## Calculate the limit of the derivative of an exponential function

I am trying to write a program to calculate the limit of the derivative of an exponential function. i have gotten the program to work using the

## The math calculations behind using (%, //) in python by applying (Decimal(), signed numbers )?

I was trying to understand the math behind calculations using / and // and % operators by doing some trials and found the results are similar to

## Converting Numbers from Base 10 to Base 60

Recently, i was

## Convert string to BigDecimal and add Comma Delimiter

I've got a string that i'm reading from a file. this string should be converted to bigdecimal. once it's in bigdecimal i've got something like

## How to stop two decimal places rounding 4 to 5 (Wordpress)?

Problem: i need to display 2 decimal places without rounding. so i tried the following codes, but all three code display

## How to display unit under the decimal (Woocommerce price)?

Problem: i need to display unit under the decimal. so i separated the decimal part using the following code. but it shows like

## How to convert an integer to bigdecimal in Java

I want to create a method that calculates multiplication of an integer and a bigdecimal. i search on google and forums, but i didn't find

## Control printout of floating point decimals, in Pandas DataFrame with decimal.Decimal entries?

Consider this example: import pandas as pd from decimal import decimal my_df =

## toPrecision is adding up trailing zeros after the decimal point to total numbers intended

After a long hour search, i'm asking this question. i've a mission to restrict number to just 8 numbers in total. toprecision is working

## Trying to convert decimal long to binary using a char mask, but I can't succeed

Long number = 12501; unsigned char mask = 1 << 7; // create a mask 10000000 for (size_t i=0; i<(sizeof(long)*8); ++i){ //

Ad

## What do 48 and 87 values refer to when converting hexadecimal to decimal number in C?

I am trying to understand the process of converting a hexadecimal number to its decimal equivalent, in particular when converting each hexadecimal

## remove decimal when value is equal 10 else not

How to remove decimal if value is equal to 10 else decimal value should not removed. -(void)viewdidappear:(bool)animated{

## Why some double precision divisions are correct in java operation?

I understand that the theory of binary numbers, so operation of double numbers is not precise. however, in java, i have no idea why

## Convert a decimal number saved in an array into a binary number saved in an array, and vice versa

I've been researching ways to convert a decimal number to a binary number. however in the examples i find the decimal number to be converted is

## Program to Invert a hexadecimal number in C

My approach: step 1. firstly i converted hexadecimal number into decimal number. (hexa to decimal logic) then i invert decimal

## Unpack Dec from Hex - via bit offsets

I have a block of hex data which inicludes settings of a sensor, i will include the beginning snippet of the hex (lsb first):

## WooCommerce Remove Extra Zero in 3 Decimal

I'm using 3 decimals so my price's seen as: "$20.000" , "$20.050" , "$20.055" i have search about

## Regexp to add commas in thousands, millions, etc (but avoiding adding them after the decimal point) Javascript

The problem is quite simple, we need to put commas in their correct places to help users to format a number in the right way. for example

## BigDecimal.setScale works wrong

Here is my rounding function: return new bigdecimal("4.780").setscale(2, roundingmode.half_up).doublevalue();

## Displaying decimal values with a predefined format

I am getting below sample values from my calculation result and i have to display is in 2 decimal points without rounding it. -0.00123,

Ad

## How to convert dot in comma in data.frame

I would like to convert the dot (decimal separator) to comma as decimal separator. i tried using format(decimal.mark=",")

## Decimal Format Value customisation issue

I am using below code to convert 79.00538 to 79.00 val df = decimalformat("###.##") df.roundingmode = roundingmode.down

## How to make a number round to eight decimal places and with the different color?

Apologies for asking what looks like a comment asked question but i cannot seem to be able to solve. how do i write 0.2 to round to eight

## Significant figures in the decimal module

So i've decided to try to solve my physics homework by writing some python scripts to solve problems for me. one problem that i'm running into is

## Display number in Textview with thousand separator and decimal format

How can i format, according to locale.getdefault() of device, a float greater than 999. for decimal format currently i'm using this:

## How to convert a string that includes decimal point to a list in python

The input string is like this a=(2.5+6/3.7*2.09) it needs to be converted to a list to be used as a calculator

## vb.net what is a good way of displaying a decimal with a given maximum length

I am writing a custom totaling method for a grid view. i am totaling fairly large numbers so i'd like to use a decimal to get the total. the

## Regular expression for accepting integers, decimal values and limiting by maximum value

I need a regular expression that accept only integers or decimals from 1 to 9999.99. i tried this

## Why Django DecimalField let me store Float or string?

I don't understand the behaviour of

## get only two digit after decimal point

My source code is: public static double rounddown(double d) { double value = math.floor(d * 1e2) / 1e2;

Ad

## insert BigDecimal to database with vertx-jdbc

I am using the vertx-jdbc-client

## Java. Format fraction part with DecimalFormat

A little question about decimalformat in java. i need to display number 178500.59999 like (178 500,599 99) i tried to use new

## How to convert a Decimal to a Double in C#?

I want to use a track-bar to change a form's opacity. this is my code:

## How to show result decimal style not exponential?

I tried to convert a value to another (from angstrom to arshin, a russian ancient value of length), but often i got result in exponential style

## DecimalFormat not working when locale changed to indonesia

I am developing an app that support different languages .i use decimalformat class to format double value. the method below works fine for all

## using Whole and Decimal numbers in a single column in mysql

I'm a music reviewer and i want to build my website. i've built a database in mysql with a column for the ratings. here are the possibilities :

## Calculate large decimals (more than 15 digits) in Javascript

As we know, javascript has some issues (or features) with calculating decimal numbers. for example:

## JavaScript: Rounding Down in .5 Cases

I am in a situation where a javascript function produces numbers, such as 2.5. i want to have these point five numbers rounded down

Ad

## Blog Categories

Ad