| Bytes | Lang | Time | Link |
|---|---|---|---|
| 028 | Charcoal | 250322T132523Z | Neil |
| 056 | Maple | 250320T232939Z | dharr |
| 024 | APLNARS | 250319T222509Z | Rosario |
| 051 | Google Sheets | 250319T222654Z | doubleun |
Charcoal, 28 bytes
W⌈﹪↔θ¹≦⊗θ≦⌊θ≔E⊕Lθ↨…θκ¹θI⌕θ⌊θ
Attempt This Online! Link is to verbose version of code. Explanation:
W⌈﹪↔θ¹≦⊗θ
Double each value until all of them are integers.
≦⌊θ
Convert them from floats to arbitrary precision integers.
≔E⊕Lθ↨…θκ¹θ
Find the cumulative sum.
I⌕θ⌊θ
Output the index of the minimum.
Maple, 56 bytes
Digits:=99;f:=s->min[index]([(S:=0),seq((S+=i),i=s)])-1;
Input s is a list. All calculations to 99 digits precision (changing to 5000 makes no difference).
Answers to test cases are: 7,10,5,7,9,10,2,4,10,8.
Earlier answer deliberately doing everything in 64 bit floats:
proc(s)S:=0;min[index]([seq((S+=i),i=s)])end;
Input s is an Array with datatype=float[8], i.e., 8-byte IEEE/754 hardware floats.
The test case starting [-9.85558899e-01, -1.18805947e-18 gives 8 not 9, and the (2nd-to-last) test case starting [-4.75110368e-203, 1.02005497e-284 gives 7 not 9. In both these cases the last 3 or 4 (respectively) entries of the cumulative sum are identical. This is because of the loss-of-significance arising from the precision issue. So both answers are equal minima and by @sind's comment are both acceptable.
To get these results one needs to first set the environment to use the right floats by UseHardwareFloats:=true; so perhaps I should add another 24 bytes.
APL(NARS), 24 chars
{⎕ct←0⋄¯1+↑⍸a=⌊/a←0,+\⍵}
0,\⍵ would be the array of partial sums, from that calculate the min, and return
the first base 0 index where it is. For the number proposed on test here it is not enought
one number float of 64 bits, but a float of 128 bits (as NARS default here),
and make sys variable ⎕ct=0 that I presume build ranges for = numbers if it is set
not 0. I say errors could be too, but this is true almost always
some test:
{⎕ct←0⋄¯1+↑⍸a=⌊/a←0,+\⍵} 9.20131294e¯9, ¯1.14642378e¯2, 8.76758258e¯10, 2.24754955e¯12, ¯4.98204294e¯01, ¯8.27729005e¯13, ¯1.61108821e¯20, 4.41858056e¯3, 7.97824928e¯6, ¯9.04718754e¯12v
7
{⎕ct←0⋄¯1+↑⍸a=⌊/a←0,+\⍵}¯2.48038255e¯12, 6.42890672e¯17, 8.57058084e¯08, ¯3.92178008e¯01, ¯1.12017550e¯20, 8.17973856e¯01, ¯6.85909934e¯17, 6.71793290e¯09, 6.88781521e¯04, 3.60301990e¯03v
5
{⎕ct←0⋄¯1+↑⍸a=⌊/a←0,+\⍵}1.05270211e¯04, ¯5.64364194e¯08, 2.43262585e¯19, ¯4.36773037e¯09,¯4.82114922e¯01, ¯3.65842457e¯02, ¯1.87536618e¯20, 8.81533003e¯20, 4.08686917e¯02, 1.97236499e¯18v
7
{⎕ct←0⋄¯1+↑⍸a=⌊/a←0,+\⍵}¯9.85558899e¯01, ¯1.18805947e¯18, ¯6.01832197e¯11, 2.23013439e¯02,¯4.82985910e¯01, ¯4.67513770e¯17, ¯4.07790711e¯02, ¯7.91679702e¯04,3.99267831e¯19, ¯4.57447850e¯19v
10
{⎕ct←0⋄¯1+↑⍸a=⌊/a←0,+\⍵}¯4.75110368e¯203, 1.02005497e¯284, ¯1.26501095e¯213, 3.05297355e¯261, 2.50315890e¯226, ¯2.92734511e¯215,¯7.73205321e¯209, 1.71728306e¯283, ¯4.01406541e¯295,¯2.40473879e¯239v
10
Google Sheets, 51 bytes
=let(s,scan(,A:A,lambda(a,c,a+c)),match(min(s),s,))

Google Sheets uses IEEE 754 double-precision with a significand of 15.95 decimal digits and an exponent of 11 bits.