a bug and a question

View: New views
2 Messages — Rating Filter:   Alert me  

a bug and a question

by Ingo Thon-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

If I do
:-X is 1/100000000000000000000000000000000000,format('~400f ~n',[X]).
Yap crashes.
with
*** stack smashing detected ***: /home/ingo/yap-cvs/yap terminated

That leads also to my question how can I ouput a number withall  
significant ditgits?

Ingo


---------------------------------------------------
Ingo Thon <ingo.thon@...>
Dept. of Computer Science
Katholieke Universiteit Leuven
Phone: +32 16 32 7823
skype: ingo_thon
---------------------------------------------------



Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
Yap-users mailing list
Yap-users@...
https://lists.sourceforge.net/lists/listinfo/yap-users

Re: a bug and a question

by Vitor Santos Costa-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Ingo

On Tue, May 26, 2009 at 3:27 AM, Ingo Thon <ingo.thon@...> wrote:
> If I do
> :-X is 1/100000000000000000000000000000000000,format('~400f ~n',[X]).
> Yap crashes.
> with
> *** stack smashing detected ***: /home/ingo/yap-cvs/yap terminated
>

Yes, the problem was the 400, I had at most 256 bytes. What you did
crashed the stack. I commited a patch for that in yap-6.

> That leads also to my question how can I ouput a number withall
> significant ditgits?
>

I am not sure you can, because floating point numbers are base 2, and
you are trying to output in base 10. The only way to make sure you
didn't lose precision would be converting it to an integer.

> Ingo
>

Sorry for the delay,

Cheers

Vitor

>
> ---------------------------------------------------
> Ingo Thon <ingo.thon@...>
> Dept. of Computer Science
> Katholieke Universiteit Leuven
> Phone: +32 16 32 7823
> skype: ingo_thon
> ---------------------------------------------------
>
>
>
> Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
>
> ------------------------------------------------------------------------------
> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
> is a gathering of tech-side developers & brand creativity professionals. Meet
> the minds behind Google Creative Lab, Visual Complexity, Processing, &
> iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
> Group, R/GA, & Big Spaceship. http://www.creativitycat.com
> _______________________________________________
> Yap-users mailing list
> Yap-users@...
> https://lists.sourceforge.net/lists/listinfo/yap-users
>

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
Yap-users mailing list
Yap-users@...
https://lists.sourceforge.net/lists/listinfo/yap-users