Hacker News new | ask | show | jobs
by sfpotter 618 days ago
For instance, maybe I want to define an array of these coefficients in C.

I could do:

    print('double coef[] = {')
    for c in p.coef:
        print(f'    {c:0.16g},')
    print('};')
and copy-paste it wherever I need.