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

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

185 active golfers, 661 entries

Solutions by @number3_mlog:
14
#11 - masato@RUNTEQ43期 / @number3_mlog

07/21/2023 at 02:36AM

14
#>11 - masato@RUNTEQ43期 / @number3_mlog

07/22/2023 at 11:50AM

14
#>11 - masato@RUNTEQ43期 / @number3_mlog

07/22/2023 at 11:59AM

15
#>60 - masato@RUNTEQ43期 / @number3_mlog

07/21/2023 at 02:31AM

15
#>60 - masato@RUNTEQ43期 / @number3_mlog

07/21/2023 at 02:32AM

15
#>60 - masato@RUNTEQ43期 / @number3_mlog

07/21/2023 at 02:33AM

16
#>113 - masato@RUNTEQ43期 / @number3_mlog

07/21/2023 at 02:30AM

21
#>134 - masato@RUNTEQ43期 / @number3_mlog

07/21/2023 at 02:23AM

21
#>134 - masato@RUNTEQ43期 / @number3_mlog

07/21/2023 at 02:29AM

24
#>140 - masato@RUNTEQ43期 / @number3_mlog

07/21/2023 at 02:01AM

24
#>140 - masato@RUNTEQ43期 / @number3_mlog

07/21/2023 at 02:04AM

27
#>143 - masato@RUNTEQ43期 / @number3_mlog

07/21/2023 at 02:09AM

29
#>146 - masato@RUNTEQ43期 / @number3_mlog

07/21/2023 at 02:22AM

31
#>148 - masato@RUNTEQ43期 / @number3_mlog

07/22/2023 at 11:57AM

35
#>151 - masato@RUNTEQ43期 / @number3_mlog

07/21/2023 at 01:57AM

35
#>151 - masato@RUNTEQ43期 / @number3_mlog

07/21/2023 at 02:00AM

42
#>159 - masato@RUNTEQ43期 / @number3_mlog

07/21/2023 at 01:54AM

42
#>159 - masato@RUNTEQ43期 / @number3_mlog

07/21/2023 at 01:56AM

49
#>162 - masato@RUNTEQ43期 / @number3_mlog

07/21/2023 at 01:47AM

52
#>163 - masato@RUNTEQ43期 / @number3_mlog

07/22/2023 at 11:55AM

53
#>164 - masato@RUNTEQ43期 / @number3_mlog

07/22/2023 at 11:52AM

53
#>164 - masato@RUNTEQ43期 / @number3_mlog

07/22/2023 at 11:53AM

57
#>165 - masato@RUNTEQ43期 / @number3_mlog

07/21/2023 at 02:20AM

58
#>165 - masato@RUNTEQ43期 / @number3_mlog

07/21/2023 at 01:39AM

61
#>166 - masato@RUNTEQ43期 / @number3_mlog

07/21/2023 at 01:46AM

65
#>167 - masato@RUNTEQ43期 / @number3_mlog

07/21/2023 at 01:44AM

68
#>169 - masato@RUNTEQ43期 / @number3_mlog

07/21/2023 at 01:35AM

75
#>173 - masato@RUNTEQ43期 / @number3_mlog

07/21/2023 at 01:38AM

89
#>178 - masato@RUNTEQ43期 / @number3_mlog

07/21/2023 at 01:34AM