Skip to main content
-2 votes
0 answers
119 views

Boost or C++ standard library for special mathematical functions [closed]

I want to use spherical Bessel function and associated Legendre functions. There are two options: Boost library C++ standard library https://en.cppreference.com/w/cpp/numeric/special_functions/...
Srikumar Sandeep's user avatar
4 votes
1 answer
118 views

In Haskell, why toRational (1/0) == infinity is False?

I couldn't find documentation for this behaviour and it looks like a bug ([Edit] it is indeed : gitlab.haskell.org/ghc/ghc/-/issues/10387). Am I missing something ? In GHCi : > import GHC.Real ...
141592653's user avatar
  • 764
-3 votes
1 answer
62 views

sort json object numerically by key

I have the following json format. It's basically a representation of the calendar: {"month1": {"day1":{...}, "day2": {...}}, "month2": {...}} I'd like to sort ...
Gavriel's user avatar
  • 19.2k
0 votes
0 answers
50 views

Apache Calcite with PostgreSQL: “DECIMAL precision 0 must be between 1 and 19” Exception

I am using Apache Calcite 1.38.0 along with the PostgreSQL JDBC driver version 42.7.2. When executing an SQL query through a JdbcSchema connection to my PostgreSQL database, I encountered an exception....
Eric's user avatar
  • 1
0 votes
0 answers
17 views

The number of derivatives returned by func() (x) must equal the length of the initial conditions vector (y)

I'm trying to define a parameter in my mathematical model "z", where my model is a system of ordinary differential equations, which is then solved using the function "ode" of the ...
Jacopo Rolfi's user avatar
0 votes
0 answers
35 views

Jacobi method converges faster than Gauss-Seidel in case of Laplace equation

It is need to solve the problem using the Jacobi method: d^T/dx^2 + d^2T/dy^2 = 0 with conditions at the boundaries of the square: T(0, y) = 1, T(x, 1) = 1, dT/dx(1, y) = 1 - y, dT/dy(x, 0) = x. ...
ulyannaaa's user avatar
0 votes
1 answer
136 views

How to find the index of the minimum cumulative sum in the face of floating-point rounding errors?

Call arr an array of float64 between −1 and 1. I want to find the index of the minimum of the cumulative sums of arr. My problem is that I cannot do this easily as the numbers in arr are of very ...
Simd's user avatar
  • 21.4k
0 votes
0 answers
26 views

Adding a NumericUpDown to a menu?

Windows Forms has a control NumericUpDown that allows the user to choose a number by clicking tiny up and down arrows, or entering a number via keys. Is there a way to add this functionality, but ...
Anna Vahtera's user avatar
0 votes
1 answer
73 views

Problem in converting the datatype of a column in PostgreSQL

I created a whole text table to avoid problems in the import of the csv. After that I changed the data cleanup to "," in "." as number dividers to avoid problems with the delimiter....
Simone Romualdi's user avatar
0 votes
0 answers
29 views

Partial derivative of logistic function for Levenberg-Marquardt

I am trying to write code that will fit logistic function to set of data. I am using Levenberg-Marquardt routine (as given in Numerical Recipes 3rd edition) and that requires me to supply a function ...
martin's user avatar
  • 2,658
4 votes
1 answer
103 views

How to compute sign(a² - b * c) * sqrt(abs(a² - b * c)) accurately with floating point arithmetics?

Question I was wondering if there is a numerically accurate way to compute sign(a² - b * c) * sqrt(abs(a² - b * c)) with floating point arithmetics because it suffers from (ordered from most to least ...
MothNik's user avatar
  • 111
0 votes
1 answer
73 views

polynomial evaluation producing non-differentiable behavior in Python

I'm trying to evaluate a polynomial of degree 61. However, around the point sqrt(2) I get some weird behavior. The graph of the polynomial becomes erratic. What could be the reason for this. The ...
Olof R's user avatar
  • 113
0 votes
1 answer
37 views

How to prevent non-numeric characters being put inside an input box

I am new to TypeScript and currently I am designing a BMR calculator. I have created a handleNumericInput function that only allows numbers to be accepted inside an input box but the problem is when I ...
ryanl's user avatar
  • 75
0 votes
2 answers
153 views

Why 5.0 / 2 returns 2.5000000000000000 (scale of 16) instead of 2.5 (scale of 1)?

Fiddle select 5.0 / 2 , pg_typeof(5.0 / 2); pg_typeof 2.5000000000000000 numeric Why the result is 2.5000000000000000? When we insert 2.5 into a numeric column or select 2.5 from a numeric column ...
Bek's user avatar
  • 31
0 votes
3 answers
73 views

How can I extract the numeric portion before the first letter in a FileMaker calculation?

I have a field called Serial Number in FileMaker, and I need to extract the numeric portion of the string that appears before the first letter (A-Z), after removing the first 6 characters. Here's the ...
Ken's user avatar
  • 3

15 30 50 per page
1
2 3 4 5
178