diff options
| author | Julian Weigt <juw@posteo.de> | 2025-12-28 15:40:34 +0000 |
|---|---|---|
| committer | Julian Weigt <juw@posteo.de> | 2026-02-04 15:55:49 +0100 |
| commit | 3cff2acc8eec95183fe4cd3dcc3a3bf30b37ce66 (patch) | |
| tree | d2f3627b2d6c1a0a65c3713ab9bb687ea2c1d1b0 /double.c | |
| parent | 634f01454f1c0f1a33adc50b5f584e39748ff832 (diff) | |
Add root_to_string function to enable printing of roots.
Diffstat (limited to 'double.c')
| -rw-r--r-- | double.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -31,3 +31,8 @@ bool to_string(char* s, double d){ sprintf(s,"%f",d); return true; } + +bool root_to_string(char* s, double d, double p){ + to_string(s,pow(d,1/p)); + return true; +} |
