Changes

Jump to navigation Jump to search
1,054 bytes added ,  20:37, July 28, 2021
Reply to RobS
Line 1: Line 1:  
If you keep welcoming yourself, you'll go blind. [[User:RobSmith|RobS]]<sup>[[User talk:RobSmith|Free Kyle!]]</sup> 16:34, July 27, 2021 (EDT)
 
If you keep welcoming yourself, you'll go blind. [[User:RobSmith|RobS]]<sup>[[User talk:RobSmith|Free Kyle!]]</sup> 16:34, July 27, 2021 (EDT)
 +
:Hell, is that what's happening, @[[User:RobSmith|RobS]]?  Dang!  I thought that was only with guys: don't I feel like a freaking idiot?  -J [[User:Psircleback|Psircleback]] ([[User talk:Psircleback|talk]]) 16:37, July 28, 2021 (EDT)  PS: I wrote my first  'Go' program today.  Totally random choice: I came across a 'playground' (ie sandbox) and I remembered I hadn't tested my second prime series on [[User_talk:Aschlafly#Does_pi_contain_.22every_other_number.22.3F|Andy S's talk page]] so, an hour and some later, I had:-
 +
 +
// Print some early values of Nilakantha's series for Pi
 +
// Tested at <https://play.golang.org/> on July 28th 2021
 +
 +
package main
 +
 +
import "fmt"
 +
import "math"
 +
 +
func f(x int) float64 {
 +
  if (x <= 0) {} else {
 +
    t:= f(x-1)
 +
    y:= 2*x; y= y*y; y= y*(4*y - 5) + 1
 +
    z:= float64(y); z= 6.0/z
 +
    fmt.Println(t, y, z, -math.Ceil(math.Log10(z))) // Show my working
 +
    return t+z
 +
  }
 +
  return 3.0
 +
}
 +
 +
func main() {
 +
  fmt.Println("Hello, Jane Doe!  Here are some approximations of Pi:")
 +
  fmt.Println(f(10))
 +
}
SkipCaptcha
67

edits

Navigation menu