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

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

415 active golfers, 1402 entries

Solutions by @nickandbro:
14
#73 - nickGPT / @nickandbro

08/26/2024 at 07:40PM

15
#>237 - nickGPT / @nickandbro

08/26/2024 at 07:40PM

16
#>276 - nickGPT / @nickandbro

08/26/2024 at 07:40PM

17
#>296 - nickGPT / @nickandbro

08/26/2024 at 07:40PM

18
#>308 - nickGPT / @nickandbro

08/26/2024 at 07:40PM

19
#>316 - nickGPT / @nickandbro

08/26/2024 at 07:40PM

20
#>321 - nickGPT / @nickandbro

08/26/2024 at 07:40PM

21
#>323 - nickGPT / @nickandbro

08/26/2024 at 07:40PM

22
#>328 - nickGPT / @nickandbro

08/26/2024 at 07:39PM

23
#>331 - nickGPT / @nickandbro

08/26/2024 at 07:39PM

24
#>333 - nickGPT / @nickandbro

08/26/2024 at 07:39PM

25
#>336 - nickGPT / @nickandbro

08/26/2024 at 07:39PM

26
#>337 - nickGPT / @nickandbro

08/26/2024 at 07:39PM

27
#>341 - nickGPT / @nickandbro

08/26/2024 at 07:39PM

29
#>343 - nickGPT / @nickandbro

08/26/2024 at 07:39PM

30
#>346 - nickGPT / @nickandbro

08/26/2024 at 07:39PM

31
#>350 - nickGPT / @nickandbro

08/26/2024 at 07:39PM

32
#>353 - nickGPT / @nickandbro

08/26/2024 at 07:39PM

33
#>355 - nickGPT / @nickandbro

08/26/2024 at 07:39PM

34
#>357 - nickGPT / @nickandbro

08/26/2024 at 07:39PM

36
#>364 - nickGPT / @nickandbro

08/26/2024 at 07:39PM

37
#>365 - nickGPT / @nickandbro

08/26/2024 at 07:39PM

38
#>368 - nickGPT / @nickandbro

08/26/2024 at 07:38PM

39
#>370 - nickGPT / @nickandbro

08/26/2024 at 07:38PM

42
#>375 - nickGPT / @nickandbro

08/26/2024 at 07:38PM

47
#>377 - nickGPT / @nickandbro

08/26/2024 at 07:38PM

48
#>379 - nickGPT / @nickandbro

08/26/2024 at 07:38PM

50
#>381 - nickGPT / @nickandbro

08/26/2024 at 07:38PM

52
#>383 - nickGPT / @nickandbro

08/26/2024 at 07:38PM

54
#>384 - nickGPT / @nickandbro

08/26/2024 at 07:38PM

59
#>386 - nickGPT / @nickandbro

08/26/2024 at 07:38PM

60
#>387 - nickGPT / @nickandbro

08/26/2024 at 07:38PM

62
#>388 - nickGPT / @nickandbro

08/26/2024 at 07:38PM

64
#>389 - nickGPT / @nickandbro

08/26/2024 at 07:38PM

66
#>392 - nickGPT / @nickandbro

08/26/2024 at 07:38PM

69
#>393 - nickGPT / @nickandbro

08/26/2024 at 07:38PM

71
#>395 - nickGPT / @nickandbro

08/26/2024 at 07:37PM

72
#>395 - nickGPT / @nickandbro

08/26/2024 at 07:37PM

74
#>398 - nickGPT / @nickandbro

08/26/2024 at 07:37PM

75
#>399 - nickGPT / @nickandbro

08/26/2024 at 07:37PM

78
#>400 - nickGPT / @nickandbro

08/26/2024 at 07:37PM

82
#>401 - nickGPT / @nickandbro

08/26/2024 at 07:37PM

83
#>402 - nickGPT / @nickandbro

08/26/2024 at 07:37PM

86
#>404 - nickGPT / @nickandbro

08/26/2024 at 07:37PM

101
#>405 - nickGPT / @nickandbro

08/26/2024 at 07:37PM

109
#>406 - nickGPT / @nickandbro

08/26/2024 at 07:37PM

114
#>408 - nickGPT / @nickandbro

08/26/2024 at 07:37PM

115
#>409 - nickGPT / @nickandbro

08/26/2024 at 07:37PM

140
#>410 - nickGPT / @nickandbro

08/26/2024 at 07:36PM

147
#>411 - nickGPT / @nickandbro

08/26/2024 at 07:36PM

159
#>412 - nickGPT / @nickandbro

08/23/2024 at 06:32AM

182
#>413 - nickGPT / @nickandbro

08/23/2024 at 03:56AM

227
#>414 - nickGPT / @nickandbro

08/23/2024 at 03:55AM

240
#>415 - nickGPT / @nickandbro

08/23/2024 at 03:55AM