Real Vim ninjas count every keystroke - do you?

Pick a challenge, fire up Vim, and show us what you got.

Changelog, Rules & FAQ, updates: @vimgolf, RSS.

Your VimGolf key: please sign in

$ gem install vimgolf
$ vimgolf setup
$ vimgolf put 9v0064a68333000000000254

Find fix point of cos

Write a function to find the fix point of cos. It is not a good code; It is just to use vim. Inspired by the excellent https://mvanier.livejournal.com/2897.html about the Y combinator.

Start file
from math import cos


def find_cos_fix_point(j):
    a = 12.216
    for i in range(j):
        a = cos(a)

    print(a)


find_cos_fix_point(1)
End file
from math import cos


def find_cos_fix_point(j):
    a = 12.216
    for i in range(j):
        a = cos(a)

    print(a)


find_cos_fix_point(1)
find_cos_fix_point(10)
find_cos_fix_point(100)
find_cos_fix_point(1000)
find_cos_fix_point(10000)
find_cos_fix_point(100000)
find_cos_fix_point(1000000)
find_cos_fix_point(10000000)
find_cos_fix_point(100000000)

View Diff

12a13,20
> find_cos_fix_point(10)
> find_cos_fix_point(100)
> find_cos_fix_point(1000)
> find_cos_fix_point(10000)
> find_cos_fix_point(100000)
> find_cos_fix_point(1000000)
> find_cos_fix_point(10000000)
> find_cos_fix_point(100000000)

Solutions by @221300034gzx:

Unlock 16 remaining solutions by signing in and submitting your own entry
Created by: @zmf_tim

365 active golfers, 1204 entries

Solutions by @221300034gzx:
15
#190 - 221300034gzx / @221300034gzx

02/03/2024 at 02:44PM

17
#>258 - 221300034gzx / @221300034gzx

02/03/2024 at 02:43PM

18
#>266 - 221300034gzx / @221300034gzx

02/03/2024 at 02:42PM

21
#>283 - 221300034gzx / @221300034gzx

02/03/2024 at 02:40PM

23
#>290 - 221300034gzx / @221300034gzx

02/03/2024 at 02:35PM

27
#>299 - 221300034gzx / @221300034gzx

02/03/2024 at 02:34PM

31
#>305 - 221300034gzx / @221300034gzx

02/03/2024 at 02:33PM

34
#>312 - 221300034gzx / @221300034gzx

02/03/2024 at 02:32PM

35
#>312 - 221300034gzx / @221300034gzx

02/03/2024 at 02:29PM

37
#>319 - 221300034gzx / @221300034gzx

02/03/2024 at 02:26PM

38
#>321 - 221300034gzx / @221300034gzx

02/03/2024 at 02:18PM

47
#>329 - 221300034gzx / @221300034gzx

02/03/2024 at 02:15PM

48
#>331 - 221300034gzx / @221300034gzx

02/03/2024 at 02:07PM

49
#>333 - 221300034gzx / @221300034gzx

02/03/2024 at 02:06PM

59
#>337 - 221300034gzx / @221300034gzx

02/03/2024 at 02:03PM

72
#>346 - 221300034gzx / @221300034gzx

02/03/2024 at 02:00PM