Category "decimal"

SQL Server : unable to save decimal digits

I am facing a peculiar problem. I have a few tables in SQL Server where I have properly declared a few columns as decimal(18, 2). Unfortunately, whenever, I sav

Displaying decimal numbers on 2D array grid view

I am trying to create a 2D grid with the following features: It will have more than 100 X and Y cells, so I cannot show them all on the screen. Therefore, I wan

SQL Server - Decimal values not precisely calculated

For the below calculation, the expected result is -0.0000671. But the result of the code is -0.00006800000. declare @V_A decimal (38,11) = 99.99329,

Round to 2 Decimal Places Even with Zeros

I am currently using the following logic to round to round to 2 decimal places: billables_all["Parts Charged"] = billables_all["Parts Charged"].fillna(0).round(

Round to 2 Decimal Places Even with Zeros

I am currently using the following logic to round to round to 2 decimal places: billables_all["Parts Charged"] = billables_all["Parts Charged"].fillna(0).round(

Rounding columns in a dataframe with file.dtypes.iteritems()

I'm making a function on rounding decimals, I wrote the following already: for colname, coltype in file.dtypes.iteritems(): if coltype in lst: file[

How to prevent automatically rounding the decimal part of the number in .NET 6

After I converted the version from .NET Core 3.1 to 6.0, I figured out that all decimal(10, 5) type columns were automatically rounding the decimal part of the

python hack converting floats to decimals

I've written a large program, with dependencies on libraries written in my lab. I'm getting wrong (and somewhat random) results, which are caused by floating-po

PowerShell - Import-CSV - How can I keep leading zeros on all decimal numbers being imported

I am trying to perform changes to a existing CSV, such as keeping specific columns (and removing the rest). However when I use Import-CSV, the leading zeros on

Angular input field type number should allow only numbers from 0-9

Having an input field where the user will enter the amount in it. i do want to restrict the users from entering decimal points. Eg : if user tries to enter 121.

Decimal module in Python inaccurate

from decimal import * Pi=Decimal(3.141592653589793238462643383279502884197169399373) print(Pi) Actual output: 3.14159265358979311599796346854418516159057617187

Minimal decimal number in pandas dataframe

I'm trying to make a dataframe in pandas where all columns have at least 6 decimals. I've tried splitting the decimal numbers on their . and look at the decimal

What does this error mean, and how do I rectify it?

system.overflow exception: value too small or too large I'm busy with a loan calculator app. In the code below, I'm trying to calculate the loan payment (paymen

Ho to convert base 10 floating point input to base 2 in MIPS?

I have been tasked with writing a program in MIPS that converts a user-inputted base 10 floating point number to base 2. I am a relatively inexperienced program

Decimal quantity step for specific product categories in WooCommerce

I would like to adjust quantity step for specific product categories to allow decimal numbers (0.5 steps specifically). A bit like in Set quantity minimum, maxi

How to get org.apache.kafka.connect.data.Decimal value from Kafka JSON message [duplicate]

I use debizium to stream postgresql data to Kafka, and use Java to subscribe Kafka topic. I receive Kafka message and get a JSON string, but

Manage independently the decimal number of the price of each product [duplicate]

I develop an online store with woocommerce and I would like to display the price of the product with 3 decimals when the price contains 3 (exa

How to avoid failing with Decimal function when 0/0 occurs?

I have a Python 2.7 script and it uses two lists and divides the numbers to each other then creates a new list with the results and it is working fine but it er

Set output size in bc library

I'm using the bash bc library to perform inter-base conversions. Does anyone know if it is possible to set the output size (number of bits/bytes)? I need his ou

Counting number of digits of input using python

I am trying to count the number of digits of an input. However, whenever I input 10 or 11 or any two digit number, the output is 325. Why doesn't it work? inpu