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

350 active golfers, 1158 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
#>95 - masato@RUNTEQ43期 / @number3_mlog

07/21/2023 at 02:31AM

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

07/21/2023 at 02:32AM

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

07/21/2023 at 02:33AM

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

07/21/2023 at 02:30AM

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

07/21/2023 at 02:23AM

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

07/21/2023 at 02:29AM

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

07/21/2023 at 02:01AM

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

07/21/2023 at 02:04AM

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

07/21/2023 at 02:09AM

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

07/21/2023 at 02:22AM

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

07/22/2023 at 11:57AM

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

07/21/2023 at 01:57AM

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

07/21/2023 at 02:00AM

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

07/21/2023 at 01:54AM

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

07/21/2023 at 01:56AM

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

07/21/2023 at 01:47AM

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

07/22/2023 at 11:55AM

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

07/22/2023 at 11:52AM

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

07/22/2023 at 11:53AM

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

07/21/2023 at 02:20AM

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

07/21/2023 at 01:39AM

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

07/21/2023 at 01:46AM

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

07/21/2023 at 01:44AM

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

07/21/2023 at 01:35AM

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

07/21/2023 at 01:38AM

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

07/21/2023 at 01:34AM