Search found 375 matches

by Luis Babboni
Apr 04, 2021 1:47
Forum: Beginners
Topic: Problem adding Ulongint numbers
Replies: 30
Views: 2517

Re: Problem adding Ulongint numbers

Any suggestion to how avoid this problem?
by Luis Babboni
Apr 04, 2021 1:46
Forum: Beginners
Topic: Problem adding Ulongint numbers
Replies: 30
Views: 2517

Re: Problem adding Ulongint numbers

Maybe the additional variable (the assignment to it) solves the possible rounding issue ... Read Operators/Arithmetic/^ in the FB-documentation. "... Note: this operation is not guaranteed to be fully accurate, and there may be some inaccuracy in the least significant bits of the number. This ...
by Luis Babboni
Apr 04, 2021 1:33
Forum: Beginners
Topic: Problem adding Ulongint numbers
Replies: 30
Views: 2517

Re: Problem adding Ulongint numbers

Is for the diagonal where bishops attacks when is in H8 position in a chessboard:

Image
by Luis Babboni
Apr 04, 2021 1:23
Forum: Beginners
Topic: Problem adding Ulongint numbers
Replies: 30
Views: 2517

Re: Problem adding Ulongint numbers

Introducing another Ulongint variable, pivote, it works right... but Im a little scared :-D For f=1 To 8 For c=1 To 8 fa=f ca=c While (fa>1 And ca>1) fa=fa-1 ca=ca-1 pivote=2^(8*(fa-1)+(ca-1)) AtaquesAlfilesSO(8*(f-1)+(c-1))=AtaquesAlfilesSO(8*(f-1)+(c-1))+pivote Wend Print 8*(f-1)+(c-1),AtaquesAlfi...
by Luis Babboni
Apr 04, 2021 1:22
Forum: Beginners
Topic: Problem adding Ulongint numbers
Replies: 30
Views: 2517

Re: Problem adding Ulongint numbers

Look at this! I hope is just a fool thing I´m doing. Well, the 2^(0+0) part of code looks definitly weird (makes no sense). I show it like this to be simplier to understand. This is the real code: For f=1 To 8 For c=1 To 8 fa=f ca=c While (fa>1 And ca>1) fa=fa-1 ca=ca-1 AtaquesAlfilesSO(8*(f-1)+(c-...
by Luis Babboni
Apr 04, 2021 1:16
Forum: Beginners
Topic: Problem adding Ulongint numbers
Replies: 30
Views: 2517

Re: Problem adding Ulongint numbers

badidea wrote:I cannot test at the moment, but is ^ a floating point operation that introduces a rounding error?
Mmmm, I cant say. Im working with integers.... or not?
What i could use instead of "^"?
by Luis Babboni
Apr 04, 2021 1:12
Forum: Beginners
Topic: Problem adding Ulongint numbers
Replies: 30
Views: 2517

Re: Problem adding Ulongint numbers

Here waht I said:

viewtopic.php?f=2&t=25019&p=224080#p224080

It seems a similar bug was in FB versions previous from 1.04.
Now i´m using the FreeBASIC-1.07.1-win64 version
by Luis Babboni
Apr 04, 2021 0:58
Forum: Beginners
Topic: Problem adding Ulongint numbers
Replies: 30
Views: 2517

Problem adding Ulongint numbers

Look at this! I need it for the bitboard version of my chess engine. https://i.ibb.co/m4brxNn/sumamal.png I think I saw something similar to this before and I think it was a FreeBasic bug. Could be? I hope is just a fool thing I´m doing. Dim a As ULongInt a=18049651735527936 Print 2^(0+0) Print a+1 ...
by Luis Babboni
Mar 22, 2021 14:20
Forum: Beginners
Topic: Function or subroutine?
Replies: 11
Views: 1673

Re: Function or subroutine?

This is your parser for extract data from the FEN? It's a parser as well as a generator. The advantage is that you don't have to care about the conversion. Just read or write either the FEN or any of its values as a variable. The example I've posted won't work as standalone, because it's linked wit...
by Luis Babboni
Feb 25, 2021 12:20
Forum: Beginners
Topic: Function or subroutine?
Replies: 11
Views: 1673

Re: Function or subroutine?

UDT is a user-defined type. It's a structure that can encapsulate multiple pieces of data together, optionally with methods for manipulating that data, including properties. An instance of a UDT can be passed around and manipulated. Putting methods (functions and subs) inside a UDT is called object...
by Luis Babboni
Feb 25, 2021 3:16
Forum: Beginners
Topic: Function or subroutine?
Replies: 11
Views: 1673

Re: Function or subroutine?

Thanks to all!
I understand that a function is not a good idea. But not see you said a subroutine is. :-O

What is UDT grindstone?
This is your parser for extract data from the FEN?
by Luis Babboni
Feb 24, 2021 13:35
Forum: Beginners
Topic: Function or subroutine?
Replies: 11
Views: 1673

Function or subroutine?

Hi people, I bother you again after some time! :-) For the new version of my chess engine Soberango, I need to read an string (the inicital FEN to whos knows what it is) and return 35 values. 32 of them are ULongInt values and 3 are Int values. Is better to use a Sub or a Function (If it is possible...
by Luis Babboni
Dec 23, 2019 18:32
Forum: General
Topic: Cant make FB Help start from FBEdit
Replies: 5
Views: 1025

Re: Cant make FB Help start from FBEdit

Thanks guys!

Now working nice.... just a little problem... :-D In the first attempt I pointed wrongly win32 Help path to FB Help! :-D
I never needed the win32 Help, in fact I do not know what it is? Where I must point it?

PS: 1.05 is the last version of the Help?
by Luis Babboni
Dec 23, 2019 14:50
Forum: General
Topic: Cant make FB Help start from FBEdit
Replies: 5
Views: 1025

Cant make FB Help start from FBEdit

Hi people! I´m stalling FB in my new computer. I want to solve a problema I had other times I installed Free Basic to use it with FBEdit, I cant make FreeBASIC Help, not FBEdit Help, could be start from FBEdit. I set Path options to where FBHelp is (I cant find FBHelp in las 1.07.1 version, I use an...
by Luis Babboni
Sep 29, 2019 23:47
Forum: General
Topic: Cumulative Standard Normal Distribution
Replies: 0
Views: 4644

Cumulative Standard Normal Distribution

Hi all! Sorry, I´m not sure if this could be usefull and neither where to post it but I think that after do it, may be it could be a help for someone. I need the values of the Cumulative Standard Normal Distribution so I made it using Excel (it has this as a function) and export it to be usable in F...