3,200 questions
-3
votes
0
answers
72
views
Partial derivative in scipy / python
I need to calculate the partial derivative with respect to x of a function f(x,a,b) in python but NOT using Sympy (as this derivative is to be used inside another routine). How could I do this in a ...
3
votes
2
answers
172
views
How to compare the numerical precision of two different tensors
I'm trying to compare the output of two tensors with different numerical precisions: one in float64 (fp64) and the other in float32 (fp32). Both tensors are computed from the same inputs and represent ...
0
votes
0
answers
61
views
Sum of integer data and numeric data is unexpected numeric value, R [duplicate]
Why is the sum of the iaea_mass_dat_trunc$AM_WN (integer) and iaea_mass_dat_trunc$AM_frac (numeric) 499496.6 for all results? How do I get the appropriate result (for example, the sum of the values in ...
0
votes
2
answers
121
views
.NET MAUI Numeric Entry accept dot and comma as decimal separator
Is there a way to accept dot and comma as a decimal separator in an numeric entry field?
From the keyboad it is not allowed to enter a dot in a german enviorment.
<Entry Text="{Binding LVK}&...
1
vote
1
answer
95
views
R and Desmos produce different results on the same numerical integration problem
I would like to compute the following quantity, which is the reciprocal of an integral. I first compute it on Desmos :
Then I compute the very same quantity on R using integrate :
set.seed(1234)
...
1
vote
1
answer
47
views
Reducing to Hessenberg form using Givens rotations
I'm trying to implement a function in Python that reduces a square matrix to upper Hessenberg form using Givens rotations. I know that this should be possible Wiki and sometimes preferred over ...
1
vote
1
answer
67
views
Why isn't the array that I create in R being able to convert into a raster?
I am trying to plot a Hovmoller diagram using NetCDFs from Copernicus database. I am trying to plot it for one specific point (lon,lat). When I create a database for this with all depth values and all ...
4
votes
1
answer
141
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
...
-3
votes
1
answer
149
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 ...
0
votes
0
answers
92
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....
0
votes
0
answers
21
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 ...
0
votes
0
answers
46
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.
...
0
votes
1
answer
143
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 ...
0
votes
0
answers
32
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 ...
0
votes
1
answer
102
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....