electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
Live streaming at radio.electro-music.com

  host / artist show at your time
<on air> Faux Pas Quartet and friends Music From Last Thursday
Please visit the chat
 Forum index » DIY Hardware and Software » ChucK programming language
[Ubuntu 13.10] Unable to operate with floats...
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [3 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
aluph3d



Joined: Mar 26, 2014
Posts: 2
Location: barcelona

PostPosted: Wed Mar 26, 2014 4:11 am    Post subject: [Ubuntu 13.10] Unable to operate with floats...
Subject description: Weird behavior when adding or multplying floats
Reply with quote  Mark this post and the followings unread

I usually use miniAudicle on Mac OSX, now i decided to move on Ubuntu and suddenly found a weird float behavior.

1.1 + 2.2 prints 3.00000
1.1 * 2.2 prints 2.0000

can anybody help me????
Back to top
View user's profile Send private message
aluph3d



Joined: Mar 26, 2014
Posts: 2
Location: barcelona

PostPosted: Wed Mar 26, 2014 4:43 am    Post subject: Reply with quote  Mark this post and the followings unread

i found also that the float assignment is messed up.

Code:
    2.2 => float a;
    <<<a>>>;


output: 2.000000
Back to top
View user's profile Send private message
antanas



Joined: Jul 20, 2007
Posts: 1
Location: Lithuania

PostPosted: Sun Apr 06, 2014 11:50 am    Post subject: Reply with quote  Mark this post and the followings unread

aluph3d wrote:
i found also that the float assignment is messed up.

Code:
    2.2 => float a;
    <<<a>>>;


output: 2.000000


This is known a locale issue. Some locales interprets comma (,) other locales - dot (.) as the decimal separator for floating point literals.
As temporary workaround you should set locale to "C" before starting miniAudicle:

$ export LC_ALL="C"
$ miniAudicle

Spencer (developer of the miniA) promises a fix in the near future.
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [3 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » ChucK programming language
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
e-m mkii

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use