Mono Floating Errors

This forum is for topics dealing with problems with software specifically in the ARMv7h repo.

Mono Floating Errors

Postby dan64 » Tue Oct 29, 2013 10:39 pm

I have installed mono, but on my TrimSlice all the floating point calculation are wrong, here a sample:

$this->bbcode_second_pass_code('', '
#csharp
Mono C# Shell, type "help;" for help

Enter statements below.
csharp> System.Math.Floor(10.5);
1
csharp> System.Math.Pow(2.0,2.0);
1.44836235046387
csharp> System.Math.Sqrt(9.0);
9
')

Do you know if there is some workaround for this BIG problem ?

Thanks
dan64
 
Posts: 75
Joined: Mon Jan 31, 2011 8:52 pm

Re: Mono Floating Errors

Postby WarheadsSE » Wed Oct 30, 2013 12:32 am

It's a mono problem.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Mono Floating Errors

Postby dan64 » Wed Oct 30, 2013 6:52 pm

I have read about this problem, is related to the implementation of hard-float in mono. It seems that about a week ago has been released a working version of mono with hard-float working for armv6.

See this post: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=34&t=37174&start=125

I think that by compiling the source should be possible get a working version also for armv7h.

Regards.
dan64
 
Posts: 75
Joined: Mon Jan 31, 2011 8:52 pm

Re: Mono Floating Errors

Postby kmihelich » Wed Oct 30, 2013 8:21 pm

Feel free to pull request the patches and relevant changes to the mono package in our github. All I see on that page is retards passing around binaries, where is the patch that fixes the current version?
Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1133
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinuxarm

Re: Mono Floating Errors

Postby dan64 » Thu Oct 31, 2013 6:16 am

Actually the sources are here: http://reign-studios-tools.com/share/share.html

It seems that are built using the following patch:
https://github.com/directhex/mono-1/commit/3a28afb60e21428dc6a773aaed5153f0dbef4f28

I will try to compile this w.e.
dan64
 
Posts: 75
Joined: Mon Jan 31, 2011 8:52 pm

Re: Mono Floating Errors

Postby kmihelich » Thu Oct 31, 2013 6:18 am

That patch is for mono version 1.x.x, and doesn't apply cleanly to 2.x, let alone 3.x.
Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1133
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinuxarm

Re: Mono Floating Errors

Postby hultqvist » Wed Nov 27, 2013 9:20 am

There is a new fix coming up.
https://github.com/alexrp/mono/commit/5 ... 98a2ddcb7c

It was announced here by an Xamarin employee
https://bugzilla.xamarin.com/show_bug.cgi?id=7938#c16
hultqvist
 
Posts: 2
Joined: Wed Nov 27, 2013 9:12 am

Re: Mono Floating Errors

Postby dan64 » Sun Dec 15, 2013 4:28 pm

Now the git master version of mono is able also to use hard-float ARM distros.

see: https://bugzilla.xamarin.com/show_bug.cgi?id=7938
dan64
 
Posts: 75
Joined: Mon Jan 31, 2011 8:52 pm

Re: Mono Floating Errors

Postby WarheadsSE » Sun Dec 15, 2013 4:40 pm

Looks promising.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Mono Floating Errors

Postby dan64 » Sun Dec 15, 2013 9:54 pm

I have compiled the last git version (it took about 3h on Trimslice).

This is the output of "mono -V"

$this->bbcode_second_pass_code('', '
root@Arch Linux ARM install bin $ ./mono -V
Mono Runtime Engine version 3.2.7 (master/32861b7 Sun Dec 15 18:14:00 CET 2013)
Copyright (C) 2002-2013 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: normal
Notifications: epoll
Architecture: armel,vfp+hard
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen
')

Now the math tests give the correct results:

$this->bbcode_second_pass_code('', '
root@Arch Linux ARM install mono-armv7h $ csharp
Mono C# Shell, type "help;" for help

Enter statements below.
csharp> System.Math.Floor(10.5);
10
csharp> System.Math.Pow(2.0,2.0);
4
csharp> System.Math.Sqrt(9.0);
3
')

The build can be downloaded here:
https://danilo.homenet.org/shares/U/armv7h/mono-3.2.7-1-armv7h.pkg.tar.xz
Last edited by dan64 on Mon Dec 16, 2013 6:18 am, edited 1 time in total.
dan64
 
Posts: 75
Joined: Mon Jan 31, 2011 8:52 pm

Next

Return to ARMv7h

Who is online

Users browsing this forum: No registered users and 15 guests