Re: [go-nuts] why math.Pow gives different results depending on exp type

2024-04-19 Thread Kurtis Rader
This has nothing to do with the math.Pow function. Dividing two ints (1/13) is not the same as dividing a float by an int (1.0/13). Replace your two `fmt.Printf()` calls with println(1 / 13) println(1.0 / 13) and observe the difference. The fact that both `math.Pow` arguments are of type `f

Re: [go-nuts] why math.Pow gives different results depending on exp type

2024-04-19 Thread 'Dan Kortschak' via golang-nuts
On Fri, 2024-04-19 at 22:51 -0700, DrGo wrote: > ``` > package main > > import ( > "fmt" > "math" > ) > > func main() { > fmt.Printf("%g\n", 1-(math.Pow(0.6, 1/13)))   //result=0 > fmt.Printf("%g\n", 1-(math.Pow(0.6, 1.0/13))) // > result=0.038532272011602364 > } > ``` 1/

[go-nuts] why math.Pow gives different results depending on exp type

2024-04-19 Thread DrGo
``` package main import ( "fmt" "math" ) func main() { fmt.Printf("%g\n", 1-(math.Pow(0.6, 1/13))) //result=0 fmt.Printf("%g\n", 1-(math.Pow(0.6, 1.0/13))) // result=0.038532272011602364 } ``` https://go.dev/play/p/oIKGb_uyLb3 -- You received this message because you are subscribed to the Goo

Re: [go-nuts] Re: Concurrent queries in a single transaction

2024-04-19 Thread Robert Engels
As you state, the driver (and db) need to support this. The synchronization for something like this is internal. But, if the operations are modifying the same tables you may end up with serialized operations anyway in order to ensure consistency while avoiding deadlocks. On Apr 20, 2024, at 12:11 A

[go-nuts] Re: Concurrent queries in a single transaction

2024-04-19 Thread nilsocket
Does any solution exist for this problem? I'm facing similar problem, want to run bunch of queries inside a transaction, but want to run them concurrently, as running sequential is taking more than 1 second. On Friday, June 29, 2018 at 6:32:40 PM UTC+5:30 Space A. wrote: > Hi, > > DB in common