### Google Code Jam 2008: Round 1A Question 3

At Google Code Jam 2008 round 1A, there is problem: Calculate last three digits before the decimal point for the number (3+sqrt(5))^n n can be big number up to 1000000. For example: if n = 2...

At Google Code Jam 2008 round 1A, there is problem: Calculate last three digits before the decimal point for the number (3+sqrt(5))^n n can be big number up to 1000000. For example: if n = 2...

I have a text field that needs to remain only text or decimal. Here is the code that I'm currently using to replace everything except numbers and a decimal point. Issue is, I can't figure out a...

I have a number of strings similar to Current Level: 13.4 db. and I would like to extract just the floating point number. I say floating and not decimal as it's sometimes whole. Can RegEx do this...

What I would like to have is the almost opposite of Number.prototype.toPrecision(), meaning that when i have number, how many decimals does it have? E.g. (12.3456).getDecimals() // 4

I'd like to round at most 2 decimal places, but only if necessary. Input: 10 1.7777777 9.1 Output: 10 1.78 9.1 How can I do this in JavaScript?

So I have a TextBox that only allows numbers and decimal points. I want the user to only be allowed to enter 1 decimal point. Here is the code that is triggered on the PreviewTextInput event:...

I have a newbie question about floating point numbers in PostgreSQL 9.2. Is there a function to round a floating point number directly, i.e. without having to convert the number to a numeric type...

I'm getting this exception when trying to do an SqlBulkCopy from a DataTable. Error Message: The given value of type String from the data source cannot be converted to type money of the specified...

I have a decimal number (such as 0.15625) which is stored as 32-bit floating point (fp32) number (0-01111100-01000000000000000000000 (sign-exponent-mantissa)) in memory. I want to convert that...

My dataframe has zero as the lowest value. I am trying to use the precision and include_lowest parameters of pandas.cut(), but I can't get the intervals consist of integers rather than floats with...

In Python, I need to format numbers so they align on the decimal point, like so: 4.8 49.723 456.781 -72.18 5 13 Is there a straighforward way to do this?

I am working on speeding up software from my dissertation by utilizing Rcpp and RcppEigen. I have been very impressed with Rcpp and RcppEigen as the speed of my software has increased by upwards...

Since migrating the Access data to a SQL server I am having multiple problems with the decimal values. In my SQL tables on the SQL 2012 server I am using the Decimal data type for multiple fields....

Python, version 2.7.3 on 64-bit Ubuntu 12.04 I have a floating point number between 0 and 99.99. I need to print it as a string in this format: WW_DD where WW are whole digits and DD are the...

I am having trouble interpreting the results of a logistic regression. My outcome variable is Decision and is binary (0 or 1, not take or take a product, respectively). My predictor variable is...

I'm trying to see if I can remove the trailing zeros from this phone number column. Example: 0 1 8.00735e+09 2 4.35789e+09 3 6.10644e+09 The type in this column is an object, and...

Is there an easy way with Python f-strings to fix the number of digits after the decimal point? (Specifically f-strings, not other string formatting options like .format or %) For example, let's...

Hello I am looking for help on my homework assignment! So the prompt is as follows: " Write a program that prompts the user to enter the exchange rate from currency in US dollars to Chinese RMB....

If you take a number, take its square root, drop the decimal, and then raise it to the second power, the result should always be less than or equal to the original number. This seems to hold true...

I'm having trouble making two Edit Text views that update when one is changed. To provide some context, see the following image: Also the view in action (can't have it embedded...

Need to extract value from a string, the value can contain a comma, a decimal point, both comma and decimal point, without any of comma or decimal point, with any of comma or decimal. For...

I have just started working on the flutter application and I am getting this kind of exception on pressing save button. The method 'call' was called on null. Receiver: null Tried calling:...

I want to calculate square root of numbers and print them with exactly 4 numbers after decimal point without rounding. This code rounds the numbers num="%.4f" % num and this one doesn't show...

I have a number: 466.62 as a double and can't change it to a string, how can I get rid of the decimal point and print 46662? I've managed to get 46662.0 by multiplying the value by 100, but I...

The command format short in Matlab makes all the print outs in the command window be "Short, fixed-decimal format with 4 digits after the decimal point." I know there is np.round, but I would like...

Is it recommended to use Python's native floating point implementation, or its decimal implementation for use-cases where precision is important? I thought this question would be easy to answer:...

SELECT ocr_text, bucket, REGEXP_EXTRACT('-?[0-9]+(\.[0-9]+)?', ocr_text) FROM temp I am trying to extract amounts from a string that will not have currency present. Any number that...

The Dream I'm looking for a way to copy a decimal value into a byte array buffer and then be able to read those bytes back into a decimal without any heap allocations. Ideally this wouldn't...

I already create Get Request with 3 parameter in postman I tried this in flutter but it didnt showing the data to listview I already tried with hard code its working fine. but when i input this...

Solidity returns totalSupply() as 1 trillion + the 9 decimals as 1trillion concat with 9 zeroes. So when I try to do a mocha test to check the supply is 1T, it fails because the number has 9 extra...