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 @hebreux34582:

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

350 active golfers, 1158 entries

Solutions by @hebreux34582:
14
#13 - Dany L'Hebreux / @hebreux34582

08/06/2023 at 06:19PM

15
#>107 - Dany L'Hebreux / @hebreux34582

08/06/2023 at 06:17PM

16
#>225 - Dany L'Hebreux / @hebreux34582

08/06/2023 at 06:16PM

17
#>238 - Dany L'Hebreux / @hebreux34582

08/06/2023 at 06:15PM

17
#>238 - Dany L'Hebreux / @hebreux34582

08/06/2023 at 06:17PM

19
#>260 - Dany L'Hebreux / @hebreux34582

08/06/2023 at 06:14PM

22
#>275 - Dany L'Hebreux / @hebreux34582

08/06/2023 at 06:11PM

25
#>282 - Dany L'Hebreux / @hebreux34582

08/06/2023 at 06:06PM

28
#>287 - Dany L'Hebreux / @hebreux34582

08/06/2023 at 06:14PM

36
#>299 - Dany L'Hebreux / @hebreux34582

08/06/2023 at 05:32PM

36
#>299 - Dany L'Hebreux / @hebreux34582

08/06/2023 at 06:02PM

38
#>307 - Dany L'Hebreux / @hebreux34582

08/06/2023 at 05:21PM

39
#>310 - Dany L'Hebreux / @hebreux34582

08/06/2023 at 05:19PM