Le lundi 02 novembre 2015 à 00:58 -0800, Jeffrey Sarnoff a écrit :
> I have many values like
>  0.6584871727288045313850172023417636020375045372547107712468813403
> that come from Maple and I would like to avoid doing this by
> copy/paste for each one:
> Float128(parse(BigFloat,"0.658487172728804531385017202341763602037504
> 5372547107712468813403"))
> 
> I tried writing a macro that would put quotes around the value and
> then affix the rest -- without good result.
> julia>@fromMaple
> 0.6584871727288045313850172023417636020375045372547107712468813403
> Float128(parse(BigFloat,"0.658487172728804531385017202341763602037504
> 5372547107712468813403"))
> 
> The REPL converts  the unenquoted value to a Float64 before I get at
> it.
> 
> Help is appreciated.
I don't think you can work around this at the moment. The best you can
do is to define a non-standard string literal by creating a @f128_str
macro, so that you can type these numbers as
f128"0.6584871727288045313850172023417636020375045372547107712468813403
".

But you'd still have to add the quotes.


Regards

Reply via email to